-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
executable file
·78 lines (78 loc) · 2.28 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
module.exports = {
root: true,
extends: [
'airbnb',
'plugin:prettier/recommended',
'prettier/react',
'plugin:react/recommended',
],
plugins: ['react-hooks'],
env: {
es6: true,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 7,
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
jsx: true,
},
rules: {
'import/no-webpack-loader-syntax': 'off',
'import/prefer-default-export': 'off',
'prettier/prettier': 'error',
'react/jsx-boolean-value': 0,
'react/jsx-filename-extension': 0,
'react/jsx-fragments': ['error', 'syntax'],
'react/jsx-max-depth': [1, { max: 4 }],
'react/jsx-no-useless-fragment': 'error',
'react/jsx-props-no-spreading': 0,
'no-shadow': 'warn',
'react/require-default-props': 'warn',
'no-undef': 'warn',
'no-param-reassign': 'warn',
'react/forbid-prop-types': 'warn',
'react/prop-types': 'warn',
'react/destructuring-assignment': 'warn',
'import/no-extraneous-dependencies': 'warn',
'jsx-a11y/label-has-associated-control': 'warn',
'no-return-assign': 'warn',
'react/static-property-placement': 'warn',
'react/no-unused-prop-types': 'warn',
'react/sort-comp': 'warn',
'class-methods-use-this': 'warn',
'react/state-in-constructor': 'warn',
'consistent-return': 'warn',
'react/no-access-state-in-setstate': 'warn',
radix: 'warn',
'react/no-did-update-set-state': 'warn',
'import/no-cycle': 'warn',
'import/named': 'warn',
'no-prototype-builtins': 'warn',
'import/order': 'warn',
'no-unused-expressions': 'warn',
'import/no-unresolved': 'warn',
'react/default-props-match-prop-types': 'warn',
'react/forbid-component-props': 'warn',
},
settings: {
'import/resolver': {
webpack: {
config: 'config/webpack.config.js',
},
},
react: {
version: 'detect',
},
},
overrides: [
{
files: ['*test.js*'],
env: {
jest: true,
},
},
],
};