-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
73 lines (73 loc) · 1.67 KB
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
plugins: ['react', '@typescript-eslint', 'import', 'simple-import-sort'],
extends: [
'plugin:react/recommended',
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:storybook/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json',
},
},
},
rules: {
'consistent-return': 'off',
'import/no-unresolved': 'error',
'import/prefer-default-export': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'react/function-component-definition': 'off',
'react/jsx-filename-extension': [
1,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
'react/jsx-no-useless-fragment': 'off',
'react/jsx-props-no-spreading': 'off',
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': [
'error',
{
groups: [
// Side effect imports
['^\\u0000'],
// Packages (global imports)
['^@?\\w'],
// Relative imports
['^\\.'],
],
},
],
},
overrides: [
{
files: ['vite.config.ts'],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
],
};