-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
68 lines (65 loc) · 1.58 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
57
58
59
60
61
62
63
64
65
66
67
68
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true
},
},
env: {
browser: true,
},
extends: ['airbnb-base'],
// use the 'ellint-plugin-react' plugin
plugins: [
'react',
'import'
],
settings: {
'import/resolver': {
'node': {
'extensions': [
'.js',
'.jsx'
]
}
}
},
rules: {
'class-methods-use-this': 0,
// don't require .js .jsx extension when importing
'import/extensions': 0,
'import/no-dynamic-require': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
"no-use-before-define": ["error", { "functions": false,}],
"no-unused-vars": 0,
"no-console": 0,
"no-underscore-dangle": 0,
"arrow-parens": 0,
"no-param-reassign": 0,
"no-unused-expressions": 0,
"padded-blocks": 0,
"prefer-const": 1,
"linebreak-style": 0,
"max-len": 0,
"arrow-body-style": ["off"],
"no-lonely-if": 0,
"no-useless-return": 0,
"no-invalid-v-for": 0,
'import/prefer-default-export': 0,
'no-restricted-syntax': [
'error',
{
selector: 'LabeledStatement',
message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
},
{
selector: 'WithStatement',
message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
},
],
}
}