Skip to content

Commit 4d9c508

Browse files
committed
feat: upgrade to eslint 9
1 parent 371bb15 commit 4d9c508

File tree

5 files changed

+1487
-1873
lines changed

5 files changed

+1487
-1873
lines changed

.babelrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 88 deletions
This file was deleted.

eslint.config.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import ts from 'typescript-eslint'
4+
import react from 'eslint-plugin-react'
5+
import reactHooks from 'eslint-plugin-react-hooks'
6+
import reactRefresh from 'eslint-plugin-react-refresh'
7+
import cypress from 'eslint-plugin-cypress/flat'
8+
9+
export default ts.config(
10+
{ ignores: ['build'] },
11+
{
12+
extends: [cypress.configs.recommended, js.configs.recommended, ts.configs.recommended],
13+
files: ['**/*.{js,jsx,ts,tsx}'],
14+
languageOptions: {
15+
ecmaVersion: 2022,
16+
globals: {
17+
...globals.browser,
18+
...globals.node,
19+
}
20+
},
21+
settings: { react: { version: '18.3' } },
22+
plugins: {
23+
react,
24+
'react-hooks': reactHooks,
25+
'react-refresh': reactRefresh,
26+
},
27+
rules: {
28+
...js.configs.recommended.rules,
29+
...react.configs.recommended.rules,
30+
...reactHooks.configs.recommended.rules,
31+
'react-refresh/only-export-components': [
32+
'warn',
33+
{ allowConstantExport: true },
34+
],
35+
'no-unused-vars': 'off',
36+
'@typescript-eslint/no-unused-vars': [
37+
"error",
38+
{
39+
"args": "all",
40+
"argsIgnorePattern": "^_",
41+
"caughtErrors": "all",
42+
"caughtErrorsIgnorePattern": "^_",
43+
"destructuredArrayIgnorePattern": "^_",
44+
"varsIgnorePattern": "^_",
45+
"ignoreRestSiblings": true
46+
}
47+
],
48+
'react/prop-types': 'off',
49+
},
50+
},
51+
)

0 commit comments

Comments
 (0)