-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreact.js
51 lines (51 loc) · 1.42 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
46
47
48
49
50
51
module.exports = {
extends: [
'airbnb',
'airbnb/hooks',
'./base.js',
'plugin:react/recommended',
],
globals: {
fetch: true,
window: true,
},
plugins: [
'react',
'jsx-a11y',
'react-hooks',
],
rules: {
'react-hooks/exhaustive-deps': 'error',
'react-hooks/rules-of-hooks': 'error',
'react/boolean-prop-naming': [1, { propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'], rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+' }],
'react/display-name': 0,
'react/function-component-definition': 0,
'react/jsx-closing-tag-location': 0,
'react/jsx-filename-extension': [2, { extensions: ['.jsx', '.tsx'] }],
'react/jsx-props-no-spreading': 0,
'react/no-multi-comp': [1, { ignoreStateless: true }],
'react/no-unstable-nested-components': 1,
'react/no-unused-prop-types': 1,
'react/no-unused-state': 0,
'react/prefer-stateless-function': [1, { ignorePureComponents: true }],
'react/prop-types': 0,
'react/react-in-jsx-scope': 0, // suppress errors for missing 'import React' in files
'react/require-default-props': 0,
'react/sort-comp': 0,
},
settings: {
'import/resolver': { // to allow for libraries with only .ios.js and .android.js exports without plain .js export
node: {
extensions: [
'.js',
'.jsx',
'.ts',
'.tsx',
],
},
},
'react': {
version: 'detect',
},
},
}