-
Notifications
You must be signed in to change notification settings - Fork 3
/
react.js
45 lines (45 loc) · 1.22 KB
/
react.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
module.exports = {
extends: ['./index.js'],
plugins: ['react', 'react-hooks'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-curly-brace-presence': 'error',
'react/jsx-key': 'error',
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-sort-props': 'off',
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/no-array-index-key': 'error',
'react/no-children-prop': 'error',
'react/no-did-mount-set-state': 'error',
'react/no-did-update-set-state': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-unescaped-entities': 'error',
'react/no-unknown-property': 'error',
'react/no-unused-prop-types': 'error',
'react/no-will-update-set-state': 'error',
'react/prop-types': 'error',
'react/react-in-jsx-scope': 'error',
'react/sort-prop-types': 'off',
},
overrides: [
{
files: ['*.js', '*.jsx'],
},
],
};