-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc
42 lines (42 loc) · 1.31 KB
/
.eslintrc
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
{
"env": {
"es6": true,
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"airbnb-base"
],
// reference: http://eslint.org/docs/rules/
"rules": {
// set "indent" space to 4
"indent": [
"error",
4,
{ "SwitchCase": 1 }
],
// show warning when writing console in code
"no-console": 1,
// arrow function is not forced to use in callback
"prefer-arrow-callback": 0,
// not force to naming function all the time
"func-names": 0,
// disable "global-require" restriction
"global-require": 0,
// disable "no-underscore-dangle"
"no-underscore-dangle": 0,
// disable "object-shorthand" for better readability
"object-shorthand": ["error", "never"],
// disable "newline-per-chained-call" for promise chain style
"newline-per-chained-call": 0,
// due to the indent space, it is 4, please check the above setting, overwrite the original 100 limitation
"max-len": ["error", 120, 2, {
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}]
}
}