forked from defineEditor/editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
38 lines (38 loc) · 1.18 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
module.exports = {
extends: ['eslint:recommended', 'standard', 'plugin:react/recommended'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 9,
ecmaFeatures: {
jsx: true,
es6: true,
modules: true
}
},
settings: {
react: {
createClass: 'createReactClass', // Regex for Component Factory to use,
// default to 'createReactClass'
pragma: 'React', // Pragma to use, default to 'React'
version: 'detect'
},
propWrapperFunctions: ['forbidExtraProps'] // 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.
},
plugins: ['react', 'standard', 'react-hooks'],
rules: {
// enable additional rules
indent: ['error', 4, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
semi: ['error', 'always'],
'react/no-string-refs': 0,
'react/prop-types': 0,
'comma-dangle': 0,
'no-console': 0,
'no-prototype-builtins': 0,
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn' // Checks effect dependencies
}
};