Skip to content

Commit

Permalink
chore: use flat config (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Jul 2, 2024
1 parent d68aec9 commit 057c16a
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 46 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

32 changes: 0 additions & 32 deletions .eslintrc.cjs

This file was deleted.

35 changes: 35 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// @ts-check

import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import vitest from 'eslint-plugin-vitest'
import eslintConfigPrettier from 'eslint-config-prettier'

export default tseslint.config(
{
languageOptions: {
sourceType: 'module'
},
linterOptions: {
reportUnusedDisableDirectives: 'error'
}
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
{
rules: {
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'type']
}
},
{
files: ['test/**'],
...vitest.configs.recommended
},
eslintConfigPrettier,
{
ignores: ['dist/**', 'test/fixtures/**']
}
)
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@eslint/js": "^9.1.1",
"@polka/url": "^1.0.0-next.25",
"@types/eslint-config-prettier": "^6.11.3",
"@types/eslint__js": "^8.42.3",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.12.7",
"@types/throttle-debounce": "^5.0.2",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vitest": "^0.5.4",
Expand All @@ -58,6 +59,7 @@
"throttle-debounce": "^5.0.0",
"tsup": "^8.0.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.8.0",
"vite": "^5.2.10",
"vitest": "^1.5.3",
"vitest-github-actions-reporter": "^0.11.1"
Expand Down
70 changes: 61 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 057c16a

Please sign in to comment.