forked from webhintio/hint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
267 lines (264 loc) · 9.5 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
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
260
261
262
263
264
265
266
267
{
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 8,
"impliedStrict": true,
"sourceType": "module"
},
"parser": "@typescript-eslint/parser",
"plugins": [
"import",
"markdown",
"@typescript-eslint"
],
"reportUnusedDisableDirectives": true,
"rules": {
"accessor-pairs": "off",
"arrow-body-style": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"array-callback-return": "error",
"arrow-parens": ["error", "always"],
"arrow-spacing": "error",
"block-spacing": "error",
"block-scoped-var": "error",
"brace-style": ["error", "1tbs"],
"callback-return": ["error", [
"callback",
"cb",
"next"]
],
"camelcase": ["error", {
"properties": "always"
}],
"comma-dangle": "error",
"comma-spacing": ["error", {
"before": false,
"after": true
}],
"comma-style": ["error", "last"],
"complexity": ["off", 5],
"computed-property-spacing": ["error", "never"],
"consistent-this": ["error", "that"],
"consistent-return": "error",
"curly": ["error", "all"],
"default-case": "error",
"dot-location": ["error", "property"],
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "error",
"for-direction": "error",
"func-call-spacing": "error",
"func-names": "off",
"func-style": ["error", "expression"],
"guard-for-in": "error",
"handle-callback-err": "error",
"id-length": "off",
"id-match": "off",
"indent": ["error", 4, {
"SwitchCase": 1,
"VariableDeclarator": 1
}],
"init-declarations": "off",
"key-spacing": ["error", {
"beforeColon": false,
"afterColon": true
}],
"keyword-spacing": "error",
"linebreak-style": "off",
"lines-around-comment": "off",
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"max-len": "off",
"max-nested-callbacks": ["error", 5],
"max-statements-per-line": "error",
"multiline-comment-style": ["error", "starred-block"],
"new-cap": "error",
"new-parens": "error",
"newline-per-chained-call": "error",
"no-alert": "error",
"no-array-constructor": "error",
"no-buffer-constructor": "error",
"no-caller": "error",
"no-case-declarations": "error",
"no-cond-assign": "error",
"no-confusing-arrow": "error",
"no-console": "off",
"no-const-assign": "error",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-div-regex": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-else-return": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-eq-null": "error",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-parens": "off",
"no-extra-semi": "error",
"no-eval": "error",
"no-fallthrough": "error",
"no-floating-decimal": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-implicit-coercion": "off",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-inner-declarations": ["error", "functions"],
"no-invalid-regexp": "error",
"no-invalid-this": "error",
"no-irregular-whitespace": "error",
"no-iterator": "error",
"no-labels": "error",
"no-label-var": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-mixed-operators": "off",
"no-mixed-requires": [1, true],
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-multiple-empty-lines": ["error", {
"max": 2,
"maxEOF": 0,
"maxBOF": 0
}],
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-nested-ternary": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-require": "error",
"no-new-wrappers": "error",
"no-obj-calls": "error",
"no-octal-escape": "error",
"no-octal": "error",
"no-param-reassign": ["error", {
"props": false
}],
"no-path-concat": "error",
"no-plusplus": "off",
"no-proto": "error",
"no-process-env": "error",
"no-process-exit": "error",
"no-prototype-builtins": "off",
"no-redeclare": "off",
"no-regex-spaces": "error",
"no-restricted-globals": "error",
"no-restricted-modules": "error",
"no-restricted-properties": "error",
"no-restricted-syntax": "off",
"no-return-assign": "error",
"no-script-url": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-sync": "error",
"no-ternary": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unused-expressions": "error",
"no-unused-vars": "off",
"no-use-before-define": "error",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-var": "error",
"no-void": "off",
"no-warning-comments": ["warn", {
"terms": [ "fixme" ],
"location": "start"
}],
"no-with": "error",
"object-shorthand": "error",
"object-curly-newline": ["error", {
"multiline": true
}],
"object-curly-spacing": ["off", "always", {
"objectsInObjects": false,
"arraysInObjects": false
}],
"one-var": "off",
"operator-assignment": ["error", "always"],
"operator-linebreak": ["error", "after"],
"padding-line-between-statements": [ "error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"]},
{ "blankLine": "always", "prev": "directive", "next": "*" },
{ "blankLine": "any", "prev": "directive", "next": "directive" }
],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"quote-props": ["error", "as-needed"],
"radix": "off",
"require-await": "error",
"semi-spacing": ["error", {
"before": false,
"after": true
}],
"semi": ["error", "always"],
"semi-style": ["error", "last"],
"sort-keys": ["error", "asc", { "caseSensitive": false }],
"sort-vars": "off",
"spaced-comment": ["error", "always"],
"space-in-parens": ["error", "never"],
"space-unary-ops": ["error", {
"words": true,
"nonwords": false
}],
"strict": ["error", "never"], // We are using alwaysStrict=true as a compiler option of TS
"switch-colon-spacing": ["error", { "after" : true, "before" : false }],
"template-curly-spacing": "error",
"use-isnan": "error",
"unicode-bom": "error",
"valid-jsdoc": "off",
"valid-typeof": "error",
"vars-on-top": "off",
"wrap-iife": ["error", "outside"],
"wrap-regex": "error",
"yoda": ["error", "never"],
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/interface-name-prefix": [ "error", "always" ],
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/member-naming": "error",
"@typescript-eslint/no-angle-bracket-type-assertion": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-parameter-properties": "error",
"@typescript-eslint/no-triple-slash-reference": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/type-annotation-spacing": "error"
}
}