|
9 | 9 | },
|
10 | 10 | "rules": {
|
11 | 11 | // Possible errors
|
12 |
| - "comma-dangle": ["error", "never"], |
| 12 | + "for-direction": "error", |
| 13 | + "getter-return": "error", |
| 14 | + "no-await-in-loop": "error", |
| 15 | + "no-compare-neg-zero": "error", |
13 | 16 | "no-cond-assign": ["error", "except-parens"],
|
14 | 17 | "no-console": "error",
|
15 |
| - "no-constant-condition": "error", |
| 18 | + "no-constant-condition": ["error", { "checkLoops": false }], |
16 | 19 | "no-control-regex": "off",
|
17 | 20 | "no-debugger": "error",
|
18 | 21 | "no-dupe-args": "error",
|
|
28 | 31 | "no-inner-declarations": "off",
|
29 | 32 | "no-invalid-regexp": "error",
|
30 | 33 | "no-irregular-whitespace": "error",
|
31 |
| - "no-negated-in-lhs": "error", |
32 | 34 | "no-obj-calls": "error",
|
| 35 | + "no-prototype-builtins": "error", |
33 | 36 | "no-regex-spaces": "error",
|
34 | 37 | "no-sparse-arrays": "error",
|
| 38 | + "no-template-curly-in-string": "error", |
35 | 39 | "no-unexpected-multiline": "error",
|
36 | 40 | "no-unreachable": "error",
|
37 | 41 | "no-unsafe-finally": "off",
|
| 42 | + "no-unsafe-negation": "error", |
38 | 43 | "use-isnan": "error",
|
39 | 44 | "valid-jsdoc": "off",
|
40 | 45 | "valid-typeof": "error",
|
|
43 | 48 | "accessor-pairs": "error",
|
44 | 49 | "array-callback-return": "error",
|
45 | 50 | "block-scoped-var": "off",
|
| 51 | + "class-methods-use-this": "off", |
46 | 52 | "complexity": "off",
|
47 | 53 | "consistent-return": "error",
|
48 | 54 | "curly": ["error", "all"],
|
|
56 | 62 | "no-case-declarations": "error",
|
57 | 63 | "no-div-regex": "off",
|
58 | 64 | "no-else-return": "error",
|
59 |
| - "no-empty-function": "error", |
| 65 | + "no-empty-function": "off", |
60 | 66 | "no-empty-pattern": "error",
|
61 | 67 | "no-eq-null": "error",
|
62 | 68 | "no-eval": "error",
|
|
65 | 71 | "no-extra-label": "error",
|
66 | 72 | "no-fallthrough": "error",
|
67 | 73 | "no-floating-decimal": "error",
|
| 74 | + "no-global-assign": "error", |
68 | 75 | "no-implicit-coercion": "error",
|
69 | 76 | "no-implicit-globals": "error",
|
70 |
| - "no-implied-eval": "error", |
71 |
| - "no-invalid-this": "error", |
| 77 | + "no-implied-eval": "off", |
| 78 | + "no-invalid-this": "off", // meh |
72 | 79 | "no-iterator": "error",
|
73 | 80 | "no-labels": ["error", { "allowLoop": true }],
|
74 | 81 | "no-lone-blocks": "error",
|
75 | 82 | "no-loop-func": "off",
|
76 | 83 | "no-magic-numbers": "off",
|
77 | 84 | "no-multi-spaces": "error",
|
78 | 85 | "no-multi-str": "error",
|
79 |
| - "no-native-reassign": "error", |
80 | 86 | "no-new": "error",
|
81 | 87 | "no-new-func": "error",
|
82 | 88 | "no-new-wrappers": "error",
|
|
86 | 92 | "no-process-env": "error",
|
87 | 93 | "no-proto": "error",
|
88 | 94 | "no-redeclare": "error",
|
| 95 | + "no-restricted-properties": "off", |
89 | 96 | "no-return-assign": ["error", "except-parens"],
|
| 97 | + "no-return-await": "error", |
90 | 98 | "no-script-url": "off",
|
91 | 99 | "no-self-assign": "error",
|
92 | 100 | "no-self-compare": "error",
|
|
98 | 106 | "no-useless-call": "error",
|
99 | 107 | "no-useless-concat": "error",
|
100 | 108 | "no-useless-escape": "error",
|
| 109 | + "no-useless-return": "error", |
101 | 110 | "no-void": "error",
|
102 | 111 | "no-warning-comments": "off",
|
103 | 112 | "no-with": "error",
|
| 113 | + "prefer-promise-reject-errors": "error", |
104 | 114 | "radix": ["error", "as-needed"],
|
| 115 | + "require-await": "error", |
105 | 116 | "vars-on-top": "off",
|
106 | 117 | "wrap-iife": ["error", "outside"],
|
107 | 118 | "yoda": ["error", "never"],
|
|
121 | 132 | "no-undef-init": "error",
|
122 | 133 | "no-undefined": "off",
|
123 | 134 | "no-unused-vars": "error",
|
124 |
| - "no-use-before-define": ["error", "nofunc"], |
| 135 | + "no-use-before-define": "off", |
125 | 136 |
|
126 | 137 | // Node.js and CommonJS
|
127 | 138 | "callback-return": "off",
|
128 | 139 | "global-require": "error",
|
129 | 140 | "handle-callback-err": "error",
|
| 141 | + "no-buffer-constructor": "error", |
130 | 142 | "no-mixed-requires": ["error", true],
|
131 | 143 | "no-new-require": "error",
|
132 | 144 | "no-path-concat": "error",
|
133 | 145 | "no-process-exit": "error",
|
134 |
| - "no-restricted-imports": "off", |
135 | 146 | "no-restricted-modules": "off",
|
136 | 147 | "no-sync": "off",
|
137 | 148 |
|
138 | 149 | // Stylistic Issues
|
| 150 | + "array-bracket-newline": ["error", { "multiline": true }], |
139 | 151 | "array-bracket-spacing": ["error", "never"],
|
| 152 | + "array-element-newline": ["off"], |
140 | 153 | "block-spacing": ["error", "always"],
|
141 | 154 | "brace-style": ["error", "1tbs", { "allowSingleLine": false }],
|
142 | 155 | "camelcase": ["error", { "properties": "always" }],
|
| 156 | + "capitalized-comments": "off", |
| 157 | + "comma-dangle": ["error", "never"], |
143 | 158 | "comma-spacing": ["error", { "before": false, "after": true }],
|
144 | 159 | "comma-style": ["error", "last"],
|
145 | 160 | "computed-property-spacing": ["error", "never"],
|
146 | 161 | "consistent-this": "off",
|
147 | 162 | "eol-last": "error",
|
| 163 | + "func-call-spacing": ["error", "never"], |
| 164 | + "func-name-matching": ["error"], |
148 | 165 | "func-names": "off",
|
149 | 166 | "func-style": ["error", "declaration"],
|
| 167 | + "function-paren-newline": ["error", "multiline"], |
150 | 168 | "id-blacklist": "off",
|
151 | 169 | "id-length": "off",
|
152 | 170 | "id-match": "off",
|
153 |
| - "indent": ["error", 2, { "SwitchCase": 1 }], |
| 171 | + "indent": ["error", 2, { "SwitchCase": 1, "CallExpression": {"arguments": "first"}, "FunctionExpression": {"parameters": "first"}, "ignoredNodes": ["ConditionalExpression"] }], |
154 | 172 | "jsx-quotes": "off",
|
155 | 173 | "key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "strict" }],
|
156 | 174 | "keyword-spacing": ["error", { "before": true, "after": true }],
|
| 175 | + "line-comment-position": "off", |
157 | 176 | "linebreak-style": ["error", "unix"],
|
158 | 177 | "lines-around-comment": "off",
|
159 | 178 | "max-depth": "off",
|
160 | 179 | "max-len": ["error", 120, { "ignoreUrls": true }],
|
| 180 | + "max-lines": "off", |
161 | 181 | "max-nested-callbacks": "off",
|
162 | 182 | "max-params": "off",
|
163 | 183 | "max-statements": "off",
|
164 | 184 | "max-statements-per-line": ["error", { "max": 1 }],
|
165 |
| - "new-cap": ["error", { "capIsNewExceptions": ["USVString"] }], |
| 185 | + "multiline-ternary": ["error", "always-multiline"], |
| 186 | + "new-cap": ["error", { "capIsNewExceptions": ["USVString", "DOMString"] }], |
166 | 187 | "new-parens": "error",
|
167 |
| - "newline-after-var": "off", |
168 |
| - "newline-before-return": "off", |
169 | 188 | "newline-per-chained-call": "off",
|
170 | 189 | "no-array-constructor": "error",
|
171 | 190 | "no-bitwise": "off",
|
172 | 191 | "no-continue": "off",
|
173 | 192 | "no-inline-comments": "off",
|
174 | 193 | "no-lonely-if": "error",
|
| 194 | + "no-mixed-operators": [ |
| 195 | + "error", |
| 196 | + { |
| 197 | + "groups": [ |
| 198 | + ["&", "|", "^", "~", "<<", ">>", ">>>"], |
| 199 | + ["==", "!=", "===", "!==", ">", ">=", "<", "<="], |
| 200 | + ["&&", "||"], |
| 201 | + ["in", "instanceof"] |
| 202 | + ] |
| 203 | + } |
| 204 | + ], |
175 | 205 | "no-mixed-spaces-and-tabs": "error",
|
| 206 | + "no-multi-assign": "off", |
176 | 207 | "no-multiple-empty-lines": "error",
|
177 | 208 | "no-negated-condition": "off",
|
178 | 209 | "no-nested-ternary": "error",
|
179 | 210 | "no-new-object": "error",
|
180 | 211 | "no-plusplus": "off",
|
181 | 212 | "no-restricted-syntax": "off",
|
182 |
| - "no-spaced-func": "error", |
| 213 | + "no-tabs": "error", |
183 | 214 | "no-ternary": "off",
|
184 | 215 | "no-trailing-spaces": "error",
|
185 | 216 | "no-underscore-dangle": "off",
|
186 | 217 | "no-unneeded-ternary": "error",
|
187 | 218 | "no-whitespace-before-property": "error",
|
| 219 | + "nonblock-statement-body-position": "error", |
| 220 | + "object-curly-newline": ["error", { "consistent": true }], |
188 | 221 | "object-curly-spacing": ["error", "always"],
|
189 | 222 | "object-property-newline": "off",
|
190 | 223 | "one-var": ["error", "never"],
|
191 | 224 | "one-var-declaration-per-line": ["error", "initializations"],
|
192 | 225 | "operator-assignment": ["error", "always"],
|
193 | 226 | "operator-linebreak": ["error", "after"],
|
194 | 227 | "padded-blocks": ["error", "never"],
|
| 228 | + "padding-line-between-statements": "off", |
195 | 229 | "quote-props": ["error", "as-needed"],
|
196 | 230 | "quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
|
197 | 231 | "require-jsdoc": "off",
|
198 | 232 | "semi": ["error", "always"],
|
199 | 233 | "semi-spacing": "error",
|
200 |
| - "sort-imports": "off", |
| 234 | + "semi-style": "error", |
| 235 | + "sort-keys": "off", |
201 | 236 | "sort-vars": "off",
|
202 | 237 | "space-before-blocks": ["error", "always"],
|
203 | 238 | "space-before-function-paren": ["error", { "anonymous": "always", "named": "never" }],
|
204 | 239 | "space-in-parens": ["error", "never"],
|
205 | 240 | "space-infix-ops": "error",
|
206 | 241 | "space-unary-ops": ["error", { "words": true, "nonwords": false }],
|
207 | 242 | "spaced-comment": ["error", "always", { "markers": ["///"] }],
|
| 243 | + "switch-colon-spacing": "error", |
| 244 | + "template-tag-spacing": "error", |
| 245 | + "unicode-bom": "error", |
208 | 246 | "wrap-regex": "off",
|
209 | 247 |
|
210 | 248 | // ECMAScript 6
|
|
219 | 257 | "no-dupe-class-members": "error",
|
220 | 258 | "no-duplicate-imports": "error",
|
221 | 259 | "no-new-symbol": "error",
|
| 260 | + "no-restricted-imports": "off", |
222 | 261 | "no-this-before-super": "error",
|
223 | 262 | "no-useless-computed-key": "error",
|
224 | 263 | "no-useless-constructor": "error",
|
| 264 | + "no-useless-rename": "error", |
225 | 265 | "no-var": "error",
|
226 | 266 | "object-shorthand": "error",
|
227 | 267 | "prefer-arrow-callback": "error",
|
228 |
| - "prefer-const": ["error", { "ignoreReadBeforeAssign": true }], |
229 |
| - "prefer-reflect": "off", |
| 268 | + "prefer-const": ["error", { "ignoreReadBeforeAssign": true, "destructuring": "all" }], |
| 269 | + "prefer-destructuring": ["error", { "VariableDeclarator": { "array": false, "object": true }, "AssignmentExpression": { "array": false, "object": false } }, { "enforceForRenamedProperties": false }], |
| 270 | + "prefer-numeric-literals": "error", |
230 | 271 | "prefer-rest-params": "off",
|
231 |
| - "prefer-spread": "off", // TODO with new Node versions |
| 272 | + "prefer-spread": "error", |
232 | 273 | "prefer-template": "off",
|
233 | 274 | "require-yield": "error",
|
| 275 | + "rest-spread-spacing": "error", |
| 276 | + "sort-imports": "off", |
| 277 | + "symbol-description": "error", |
234 | 278 | "template-curly-spacing": ["error", "never"],
|
235 | 279 | "yield-star-spacing": ["error", "after"]
|
236 | 280 | }
|
|
0 commit comments