This repository has been archived by the owner on May 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy path.eslintrc
259 lines (208 loc) · 5.55 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
/*
* ENVIRONMENTS
* =================
*/
"env": {
// Define globals exposed by modern browsers.
"browser": true,
// Allow CommonJS writing
"node": true,
// es2015
"es6":true,
// mocha test framework
"mocha":true
},
"globals": {
},
"rules": {
/*
* ENFORCING OPTIONS
* =================
*/
// Prohibits use of == and != in favor of === and !==.
"eqeqeq": 2,
// Requires all for in loops to filter object's items.
"guard-for-in": 2,
// Prohibits overwriting prototypes of native objects such as Array, Date and so on.
"no-extend-native": 2,
// Prohibits use of a variable before it is defined.
"no-use-before-define": 2,
// Prohibits the use of arguments.caller and arguments.callee.
"no-caller": 2,
// Prohibits the use of the comma operator.
"no-sequences": 2,
// Warns about "non-breaking whitespace" characters.
"no-irregular-whitespace": 2,
// Prohibits the use of constructor functions for side-effects.
"no-new": 2,
// Nope, thanks to strict-loader for webpack & use-strict module for node
"strict": 0,
// Prohibits use of explicitly undeclared variables.
"no-undef": 2,
// Warns when variables are defined but never used.
"no-unused-vars": 2,
// requireCurlyBraces
"curly": [
2,
"multi-line",
"consistent"
],
"keyword-spacing": [
2,
{
"before": true,
//requireSpaceAfterKeywords
"after": true
}
],
//requireSpaceBeforeBlockStatements
"space-before-blocks": [
2,
{
//requireSpacesInFunctionExpression
//requireSpacesInAnonymousFunctionExpression
"functions": "always",
"keywords": "always",
"classes": "always"
}
],
//requireParenthesesAroundIIFE
"wrap-iife": 2,
"space-before-function-paren": [
2,
{
//disallowSpacesInAnonymousFunctionExpression
"anonymous": "never",
//disallowSpacesInFunctionExpression
"named": "never"
}
],
//disallowEmptyBlocks
"no-empty": 2,
//disallowSpacesInsideArrayBrackets
"array-bracket-spacing": [
2,
"never"
],
//disallowSpacesInsideParentheses
"space-in-parens": [
2,
"never"
],
//disallowQuotedKeysInObjects
"quote-props": [
2,
"as-needed",
{
"keywords": true
}
],
//disallowSpaceAfterObjectKeys
"key-spacing": [
2,
{
"beforeColon": false,
"afterColon": true
}
],
//requireCommaBeforeLineBreak
"comma-style": [
2,
"last"
],
//requireOperatorBeforeLineBreak
"operator-linebreak": [
2,
"after"
],
//disallowSpaceBeforePostfixUnaryOperators
"space-unary-ops": [
2,
{
"words": false,
"nonwords": false,
//requireSpaceBeforeBinaryOperators
//requireSpaceAfterBinaryOperators
"overrides" :{
"=":true,
"==":true,
"===":true,
"!=":true,
"!==":true,
"||":true,
"&&":true
}
}
],
//requireSpaceAfterBinaryOperators ","
"comma-spacing":[
2,
{
"before": false,
"after": true
}
],
//requireSpacesInConditionalExpression
"space-infix-ops": 2,
//requireCamelCaseOrUpperCaseIdentifiers
"camelcase": [
2,
{
"properties": "always"
}
],
//disallowKeywords
"no-with": 2,
//disallowMultipleLineStrings
"no-multi-str": 2,
//validateQuoteMarks
"quotes": [
2,
"single",
"avoid-escape"
],
//validateIndentation
"indent": [
2,
4,
{
"SwitchCase": 1,
"VariableDeclarator": 1
}
],
//disallowMixedSpacesAndTabs
"no-mixed-spaces-and-tabs": 2,
//disallowTrailingWhitespace
"no-trailing-spaces": 2,
//disallowTrailingComma
"comma-dangle": [
2,
"never"
],
//disallowKeywordsOnNewLine
"brace-style": 2,
//requireCapitalizedConstructors
"new-cap": 2,
//safeContextKeyword
"consistent-this": [
2,
"that"
],
//requireDotNotation
"dot-notation": 2,
//jsDoc
"valid-jsdoc": 2,
//requireSpaceAfterLineComment
"spaced-comment": [
2,
"always"
],
//requireLineFeedAtFileEnd
"eol-last": 2
}
}