-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
31 lines (31 loc) · 1.03 KB
/
index.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
module.exports = {
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
plugins: ['react'],
rules: {
'react/button-has-type': 1,
'react/destructuring-assignment': 1,
'react/function-component-definition': [
1,
{ namedComponents: 'function-declaration', unnamedComponents: 'arrow-function' },
],
'react/hook-use-state': 1,
'react/jsx-boolean-value': 1,
'react/jsx-fragments': 1,
'react/jsx-no-constructed-context-values': 2,
'react/jsx-no-script-url': 2,
'react/jsx-no-useless-fragment': 1,
'react/jsx-pascal-case': [1, { allowNamespace: true, allowLeadingUnderscore: true }],
'react/jsx-sort-props': [1, { callbacksLast: true, reservedFirst: true, shorthandFirst: true }],
'react/jsx-tag-spacing': [1, { beforeClosing: 'never' }],
'react/no-access-state-in-setstate': 2,
'react/prop-types': 0,
'react/react-in-jsx-scope': 0,
'react/self-closing-comp': 1,
'react/sort-prop-types': [1, { callbacksLast: true, requiredFirst: true }],
},
settings: {
react: {
version: 'detect',
},
},
};