-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
84 lines (84 loc) · 1.91 KB
/
.eslintrc.js
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
74
75
76
77
78
79
80
81
82
83
84
module.exports = {
extends: [
'airbnb/hooks',
'airbnb-typescript',
'eslint:recommended',
'prettier',
'plugin:@typescript-eslint/recommended',
],
rules: {
'arrow-body-style': ['warn', 'as-needed'],
'consistent-return': 'warn',
'import/no-extraneous-dependencies': 'off',
'import/newline-after-import': 'error',
'import/order': [
'error',
{
groups: [['builtin', 'external', 'internal']],
},
],
'import/prefer-default-export': 0,
'no-console': [
'warn',
{
allow: ['warn', 'error'],
},
],
'no-var': 'warn',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'object-shorthand': 'warn',
'prefer-arrow-callback': 'warn',
'prefer-const': 'warn',
'prefer-spread': 'warn',
'react/forbid-prop-types': [
'error',
{
forbid: ['any'],
},
],
'react/jsx-props-no-spreading': 'off',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
],
'react-hooks/rules-of-hooks': 'error',
'react/default-props-match-prop-types': 'warn',
'react/no-unused-prop-types': 'warn',
'react/prefer-stateless-function': 'warn',
'react/prop-types': 'warn',
'react/require-default-props': 'off',
},
plugins: [
'prettier',
'react-hooks',
'@typescript-eslint',
'react',
'jsx-a11y',
'import',
],
env: {
browser: true,
jest: true,
node: true,
es2020: true,
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
node: {
moduleDirectory: ['node_modules/', 'src/'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
parserOptions: {
project: ["tsconfig.json","examples/example-react-vite/tsconfig.json"]
}
};