Skip to content

Commit

Permalink
chore(devDeps): migrate to eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
ddecrulle committed Aug 13, 2024
1 parent 8a79189 commit f8c3712
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 178 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

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

This file was deleted.

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

export default tseslint.config(
{ ignores: ['src/model/api/'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
project: './tsconfig.json',
},
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-namespace': ['off'],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
)
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev": "vite",
"check": "tsc --noEmit",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint ./src",
"preview": "vite preview",
"_format": "prettier '**/*.{ts,tsx,json,md}'",
"format": "npm run _format -- --write",
Expand Down Expand Up @@ -41,21 +41,22 @@
},
"devDependencies": {
"@apidevtools/json-schema-ref-parser": "^11.7.0",
"@eslint/js": "^9.9.0",
"@types/he": "^1.2.3",
"@types/node": "^22.2.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint": "^9.9.0",
"eslint-plugin-react-hooks": "^5.1.0-beta-26f2496093-20240514",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"husky": "^9.1.4",
"orval": "^7.0.1",
"prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^4.0.0",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.0",
"vite-envs": "^4.3.2",
"vite-tsconfig-paths": "^5.0.1"
Expand Down
Loading

0 comments on commit f8c3712

Please sign in to comment.