Skip to content

Commit e23ef8a

Browse files
committed
Migrate to new ESLint configuration with Wonse React plugin
1 parent 927f39e commit e23ef8a

File tree

5 files changed

+968
-66
lines changed

5 files changed

+968
-66
lines changed

.eslintignore

-1
This file was deleted.

.eslintrc.json

-44
This file was deleted.

eslint.config.js

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import wonseReact from '@wonse/eslint-react';
2+
3+
export default [
4+
{
5+
ignores: ['**/node_modules/**', '.next/**', 'dist/**', 'build/**'],
6+
},
7+
...wonseReact(),
8+
{
9+
files: ['**/*.{js,jsx,ts,tsx}'],
10+
rules: {
11+
'no-restricted-exports': 'off',
12+
'@typescript-eslint/consistent-type-imports': 'error',
13+
'react/function-component-definition': [
14+
'error',
15+
{ namedComponents: ['arrow-function', 'function-declaration'] },
16+
],
17+
},
18+
},
19+
{
20+
files: ['**/components/ui/**/*.tsx'],
21+
rules: {
22+
'@typescript-eslint/no-shadow': 'off',
23+
'react/prop-types': [
24+
'error',
25+
{
26+
ignore: [
27+
'className',
28+
'size',
29+
'variant',
30+
'sideOffset',
31+
'checked',
32+
'decorative',
33+
'orientation',
34+
],
35+
},
36+
],
37+
'react-refresh/only-export-components': 'off',
38+
'react/jsx-no-constructed-context-values': 'off',
39+
'consistent-return': 'off',
40+
'jsx-a11y/heading-has-content': 'off',
41+
'jsx-a11y/anchor-has-content': 'off',
42+
},
43+
},
44+
];

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"unist-util-visit": "^5.0.0"
7979
},
8080
"optionalDependencies": {
81+
"@wonse/eslint-react": "^4.0.1",
8182
"eslint": "^9.20.1",
8283
"eslint-config-next": "^15.1.7",
8384
"eslint-plugin-tailwindcss": "^3.18.0",

0 commit comments

Comments
 (0)