-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.json
81 lines (81 loc) · 2.04 KB
/
.eslintrc.json
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
71
72
73
74
75
76
77
78
79
80
81
{
"env": {
"node": true,
"es6": false
},
"extends": "eslint:recommended",
"globals": {
"describe": true,
"it": true,
"before": true,
"beforeEach": true,
"after": true,
"afterEach": true
},
"rules": {
// indent 4 spaces
"indent": [
2,
4,
{
"SwitchCase": 1
}
],
// use unix lf - and warn if not
"linebreak-style": [
1,
"unix"
],
// prefer single quote
"quotes": [
1,
"single"
],
// prefer semi-colon at the end of the line
"semi": 1,
// prefer comma at the end of the line in objects, arrays, etc
"comma-dangle": [
1,
"only-multiline"
],
// if then else on new lines
"brace-style": [
"error",
"1tbs"
],
// prefer spaces around the keywords
"keyword-spacing": [
1
],
// don't disallow console statements
"no-console": "off",
// enforce curly braces
"curly": 2,
// prefer comments with space
"spaced-comment": 1,
// don't disallow var keyword
"no-var": 0,
// warn on capitalized function names
"new-cap": 1,
// space before blocks mandatory
"space-before-blocks": 2,
// prefer space before function param parenthisis only when anonymous
"space-before-function-paren": [
1,
{
"anonymous": "always",
"named": "never"
}
],
// require end-of-file newline
"eol-last": 2,
// warn unnecessary escapes
"no-useless-escape": 1,
// disallow padding within blocks
"padded-blocks": [2, "never"],
// no spaces in brackets
"array-bracket-spacing": 1,
// yes to spaces in braces
"object-curly-spacing": [1, "always"]
}
}