Skip to content

Commit

Permalink
Migrate to new eslint config format
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Dec 16, 2024
1 parent b9c7803 commit 7f4e59f
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 30 deletions.
22 changes: 0 additions & 22 deletions .eslintrc.cjs

This file was deleted.

41 changes: 41 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist', 'debian'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],

// Manually added rules

"no-unused-vars": ["error", {
argsIgnorePattern: "^_",
}],

"@typescript-eslint/no-unused-vars": ["error", {
argsIgnorePattern: "^_",
}],

"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "off",
},
},
)
117 changes: 111 additions & 6 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@
"standardized-audio-context": "^25.3.77"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"@vite-pwa/assets-generator": "^0.2.6",
"@vitejs/plugin-react-swc": "^3.7.2",
"eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.13.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.0",
"vite": "^6.0.3",
"vite-plugin-pwa": "^0.21.1"
}
Expand Down

0 comments on commit 7f4e59f

Please sign in to comment.