-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreact-config.js
53 lines (52 loc) · 1.58 KB
/
react-config.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
const {
globalExtensions,
globalEnv,
globalParser,
globalPlugins,
globalRules,
globalSettings,
} = require('./global-config');
module.exports = {
env: {
browser: true,
'cypress/globals': true,
...globalEnv,
},
extends: ['airbnb', ...globalExtensions],
parser: globalParser,
plugins: ['sort-imports-es6-autofix', 'cypress', 'react-hooks', 'testing-library', ...globalPlugins],
rules: {
...globalRules,
'jsx-a11y/anchor-is-valid': 'warn',
'jsx-a11y/no-static-element-interactions': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react/forbid-prop-types': 'warn',
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/jsx-fragments': 'off',
'react/jsx-no-bind': 'error',
'react/jsx-no-target-blank': 'warn',
'react/jsx-props-no-spreading': 'off',
'react/no-danger': 'warn',
'react/no-find-dom-node': 'warn',
'react/no-string-refs': 'warn',
'react/no-unused-prop-types': 'warn',
'react/prefer-stateless-function': 'warn',
'react/prop-types': 'error',
'react/require-default-props': 'warn',
'react/state-in-constructor': ['error', 'never'],
'sort-imports-es6-autofix/sort-imports-es6': [
'error',
{
ignoreCase: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
'testing-library/await-async-utils': 'error',
},
settings: {
...globalSettings,
},
};