-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact.js
33 lines (32 loc) · 859 Bytes
/
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
module.exports = {
extends: 'mw',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
plugins: ['react', 'react-hooks'],
rules: {
// React (eslint-plugin-react)
'react/jsx-key': 'warn',
'react/jsx-no-comment-textnodes': 'warn',
'react/jsx-no-duplicate-props': 'warn',
'react/jsx-no-target-blank': 'warn',
'react/jsx-no-undef': 'warn',
'react/jsx-uses-react': 'warn',
'react/jsx-uses-vars': 'warn',
'react/no-unescaped-entities': 'warn',
'react/no-unknown-property': 'warn',
'react/react-in-jsx-scope': 'error',
'react/require-render-return': 'warn',
'react/self-closing-comp': 'warn',
// React (eslint-plugin-react-hooks)
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
};