-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (56 loc) · 1.37 KB
/
.eslintrc.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
54
55
56
module.exports = {
'root': true,
'parser': 'babel-eslint',
'env': {
'browser': true
},
'extends': [
'eslint:recommended',
'plugin:react/recommended'
],
'globals': {
'require': true,
'Promise': true
},
'plugins': [
'react',
'react-hooks'
],
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
'ecmaFeatures': {
'jsx': true
}
},
'settings': {
'react': {
// Regex for Component Factory to use,
// default to "createReactClass"
'createClass': 'createReactClass',
'pragma': 'React', // Pragma to use, default to "React"
'version': '16.5' // React version, default to the latest React stable release
// 'flowVersion': '0.53' // Flow version
},
// The names of any functions used to wrap the
// propTypes object, e.g. `forbidExtraProps`.
// If this isn't set, any propTypes wrapped in
// a function will be skipped.
'propWrapperFunctions': ['forbidExtraProps']
},
'rules': {
'react-hooks/rules-of-hooks': 'error',
"react-hooks/exhaustive-deps": 'warn',
'jsx-quotes': [2, 'prefer-single'],
'react/jsx-no-undef': 0,
'quotes': [2, 'single'],
'semi': [2, 'never'],
'comma-dangle': [2, 'never'],
'prefer-const': 2,
'comma-spacing': 2,
'no-debugger': 0,
'arrow-parens': 2,
'no-undef': 0,
'no-console': 0
}
}