-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
70 lines (70 loc) · 1.66 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
module.exports = {
env: {
browser: true,
commonjs: true,
node: true,
es6: true,
},
ignorePatterns: ['node_modules', 'build', '.env', 'ios', 'android', 'dist'],
plugins: ['react', 'react-hooks', 'import'],
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:storybook/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2021,
sourceType: 'module',
},
settings: {
react: {
createClass: 'createReactClass',
pragma: 'React',
version: 'detect',
},
propWrapperFunctions: ['forbidExtraProps'],
},
rules: {
'@typescript-eslint/no-explicit-any': 0,
'import/order': [
'error',
{
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
},
],
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-unused-vars': 1,
'prefer-const': 2,
'no-var': 2,
'no-const-assign': 1,
'no-this-before-super': 1,
'no-undef': 2,
'no-unreachable': 2,
'no-unneeded-ternary': 2,
'no-debugger': 1,
'no-console': 0,
'constructor-super': 1,
'valid-typeof': 1,
'react/display-name': 0,
'react/prop-types': 0,
'react/jsx-fragments': [0, 'syntax'],
'react-hooks/rules-of-hooks': 2,
'react-hooks/exhaustive-deps': 0,
'no-useless-catch': 1,
'no-async-promise-executor': 0,
'react/react-in-jsx-scope': 0,
'react/react-in-jsx-scope': 2,
'react/jsx-uses-react': 0,
'react/jsx-no-undef': [
2,
{
allowGlobals: true,
},
],
},
}