/
.eslintrc
65 lines (60 loc) · 1.72 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
"env": {
"node": true,
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"modules": true,
"arrowFunctions": true,
"arrow-spacing": { "before": true, "after": true },
"arrow-parens": false,
"prefer-const": true,
"blockBindings": true,
"templateStrings": true,
"objectLiteralShorthandProperties": true,
"experimentalObjectRestSpread": true,
},
},
// 0 - turn rule off
// 1 - rule generates warnings
// 2 - rule generates errors
"rules": {
"comma-dangle": [1, "never"],
"quotes": [1, "single"],
"no-dupe-args": 1,
"no-duplicate-case": 1,
"no-empty": 1,
"no-extra-boolean-cast": 1,
"no-extra-semi": 1,
"no-func-assign": 1,
"no-inner-declarations": 1,
"no-obj-calls": 1,
"no-sparse-arrays": 1,
"no-unreachable": 1,
"use-isnan": 1,
"valid-typeof": 1,
"no-unexpected-multiline": 1,
//Best Practices
"consistent-return": 1,
"curly": 1,
"eqeqeq": 2,
"dot-location": [1, "property"],
"no-alert": 1,
"no-else-return": 1,
"no-extend-native": 1,
"no-loop-func": 1,
"no-redeclare": 1,
"vars-on-top": 1,
//Stylistic
"array-bracket-spacing": [1, "never"],
"brace-style": [1, "1tbs", { "allowSingleLine": true }],
"no-lonely-if": 1,
"no-mixed-spaces-and-tabs": 1,
"no-nested-ternary": 1,
"no-spaced-func": 1,
"no-trailing-spaces": 1,
"operator-linebreak": [1, "after"],
}
}