-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
56 lines (56 loc) · 1.11 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 = {
//文件名 .eslintrc.json
env: {
browser: true,
es6: true,
node: true,
commonjs: true
},
extends: 'eslint:recommended',
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
arrowFunctions: true,
classes: true,
modules: true,
defaultParams: true
},
sourceType: 'module'
},
plugins: ['react'],
rules: {
'linebreak-style': ["off", "windows"],
"semi": ["error", "never"],
'no-empty': 0,
'comma-dangle': 0,
'no-unused-vars': 0,
'no-console': 0,
'no-const-assign': 2,
'no-dupe-class-members': 2,
'no-duplicate-case': 2,
'no-extra-parens': [2, 'functions'],
'no-self-compare': 2,
'accessor-pairs': 2,
'comma-spacing': [
2,
{
before: false,
after: true
}
],
'constructor-super': 2,
'new-cap': [
2,
{
newIsCap: true,
capIsNew: false
}
],
'new-parens': 2,
'no-array-constructor': 2,
'no-class-assign': 2,
'no-cond-assign': 2,
'no-mixed-spaces-and-tabs': 0
}
}