-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
70 lines (66 loc) · 1.92 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
66
67
68
69
70
{
"root": true,
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true
}
},
"env": {
"node": true,
"es6": true
},
"extends": ["eslint:recommended"],
"rules": {
// basic rules
"semi": 1,
"semi-style": 2,
"semi-spacing": 1,
"camelcase": 2,
"quotes": ["warn", "single", {
"avoidEscape": true,
"allowTemplateLiterals": false
}],
"brace-style": 2,
// just to make sure (are defaults)
"indent": ["error", 2],
// technically required, because of CSP
"no-eval": 2,
"no-implied-eval": 2,
// great new EcmaScript features
"prefer-const": 2,
"no-var": 1,
"prefer-arrow-callback": 1,
"prefer-rest-params": 2,
"prefer-spread": 2,
"prefer-template": 1,
"template-curly-spacing": 1,
"symbol-description": 2,
"object-shorthand": 1,
"prefer-promise-reject-errors": 2,
/* "prefer-destructuring": 1, */ // https://github.com/eslint/eslint/issues/10250
// additional rules
"no-new-object": 2,
"eqeqeq": ["error", "smart"],
"curly": ["error", "all"],
"dot-notation": 2,
"no-array-constructor": 2,
"no-throw-literal": 2,
"no-self-compare": 2,
"no-useless-call": 1,
"consistent-return": 2,
"spaced-comment": 1,
"no-multi-spaces": 1,
"no-new-wrappers": 2,
"no-script-url": 2,
"no-void": 1,
"vars-on-top": 1,
"yoda": ["error", "never"],
/* "no-warning-comments": 1, */ // should be enabled later
"require-await": 1,
"wrap-iife": ["error", "inside"],
"no-loop-func": 2,
"linebreak-style": 1, // may be disabled if contributing on Windows
}
}