eslint-config-isaacscript 3.7.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -30
- package/base-eslint-comments.js +59 -0
- package/base-eslint.js +715 -284
- package/base-import.js +224 -0
- package/base-jsdoc.js +140 -150
- package/base-n.js +146 -0
- package/base-no-autofix.js +18 -0
- package/base-typescript-eslint.js +365 -210
- package/base-unicorn.js +227 -0
- package/base.js +23 -340
- package/mod.js +112 -98
- package/monorepo.js +12 -27
- package/package.json +5 -2
package/base-eslint.js
CHANGED
|
@@ -1,291 +1,722 @@
|
|
|
1
|
-
// This
|
|
2
|
-
// https://eslint.org/docs/latest/user-guide/configuring
|
|
3
|
-
// This config only contains modifications to the built-in rules from the ESLint tool.
|
|
1
|
+
// This ESLint config only contains built-in rules from ESLint itself:
|
|
4
2
|
// https://eslint.org/docs/latest/rules/
|
|
5
|
-
module.exports = {
|
|
6
|
-
rules: {
|
|
7
|
-
// -----------------
|
|
8
|
-
// Possible Problems
|
|
9
|
-
// -----------------
|
|
10
|
-
|
|
11
|
-
// https://eslint.org/docs/latest/rules/array-callback-return
|
|
12
|
-
// - Using "checkForEach" makes the rule stricter.
|
|
13
|
-
"array-callback-return": [
|
|
14
|
-
"warn",
|
|
15
|
-
{
|
|
16
|
-
checkForEach: true,
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
|
|
20
|
-
// TODO
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Documentation:
|
|
24
|
-
* https://eslint.org/docs/latest/rules/consistent-return
|
|
25
|
-
*
|
|
26
|
-
* Defined at:
|
|
27
|
-
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js
|
|
28
|
-
*
|
|
29
|
-
* We prefer the "noImplicitReturns" compiler flag over the "consistent-return" ESLint rule,
|
|
30
|
-
* since it is type-aware:
|
|
31
|
-
* https://github.com/typescript-eslint/typescript-eslint/issues/5254
|
|
32
|
-
*/
|
|
33
|
-
"consistent-return": ["off"],
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Documentation:
|
|
37
|
-
* https://eslint.org/docs/latest/rules/curly
|
|
38
|
-
*
|
|
39
|
-
* Defined at:
|
|
40
|
-
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js
|
|
41
|
-
*
|
|
42
|
-
* Always requiring curly braces can partially ward against Apple-style if statement bugs:
|
|
43
|
-
* https://www.imperialviolet.org/2014/02/22/applebug.html
|
|
44
|
-
*
|
|
45
|
-
* Additionally, this rule needs to be set to "all" to work properly with
|
|
46
|
-
* `eslint-prettier-config`:
|
|
47
|
-
* https://github.com/prettier/eslint-config-prettier#curly
|
|
48
|
-
*/
|
|
49
|
-
curly: ["warn", "all"],
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Documentation:
|
|
53
|
-
* https://eslint.org/docs/latest/rules/default-case
|
|
54
|
-
*
|
|
55
|
-
* Defined at:
|
|
56
|
-
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js
|
|
57
|
-
*
|
|
58
|
-
* This rule is generally bad to have on in TypeScript projects:
|
|
59
|
-
* https://github.com/typescript-eslint/typescript-eslint/issues/5254
|
|
60
|
-
*/
|
|
61
|
-
"default-case": "off",
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Documentation:
|
|
65
|
-
* https://eslint.org/docs/latest/rules/no-console
|
|
66
|
-
*
|
|
67
|
-
* Defined at:
|
|
68
|
-
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/errors.js
|
|
69
|
-
*
|
|
70
|
-
* Command-line programs commonly write to standard out and standard error.
|
|
71
|
-
*/
|
|
72
|
-
"no-console": "off",
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Documentation:
|
|
76
|
-
* https://eslint.org/docs/latest/rules/no-constant-binary-expression
|
|
77
|
-
*
|
|
78
|
-
* Not defined in parent configs.
|
|
79
|
-
*
|
|
80
|
-
* This rule was released in 2022 and is known to catch many subtle bugs:
|
|
81
|
-
* https://github.com/eslint/eslint.org/pull/240/files
|
|
82
|
-
*/
|
|
83
|
-
"no-constant-binary-expression": "warn",
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Documentation:
|
|
87
|
-
* https://eslint.org/docs/latest/rules/no-continue
|
|
88
|
-
*
|
|
89
|
-
* Defined at:
|
|
90
|
-
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
91
|
-
*
|
|
92
|
-
* Proper use of continues can reduce indentation for long blocks of code.
|
|
93
|
-
*/
|
|
94
|
-
"no-continue": "off",
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Documentation:
|
|
98
|
-
* https://eslint.org/docs/latest/rules/no-plusplus
|
|
99
|
-
*
|
|
100
|
-
* Defined at:
|
|
101
|
-
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
102
|
-
*
|
|
103
|
-
* Airbnb disallows these because it can lead to errors with minified code. When using Prettier,
|
|
104
|
-
* it adds semi-colons everywhere, so we don't have to worry about this.
|
|
105
|
-
*/
|
|
106
|
-
"no-plusplus": "off",
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Documentation:
|
|
110
|
-
* https://eslint.org/docs/latest/rules/no-restricted-syntax
|
|
111
|
-
*
|
|
112
|
-
* Defined at:
|
|
113
|
-
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
114
|
-
*
|
|
115
|
-
* - We remove the `ForOfStatement` selector, since they are commonly used.
|
|
116
|
-
*/
|
|
117
|
-
"no-restricted-syntax": [
|
|
118
|
-
"warn",
|
|
119
|
-
{
|
|
120
|
-
selector: "ForInStatement",
|
|
121
|
-
message:
|
|
122
|
-
"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
selector: "LabeledStatement",
|
|
126
|
-
message:
|
|
127
|
-
"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
selector: "WithStatement",
|
|
131
|
-
message:
|
|
132
|
-
"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",
|
|
133
|
-
},
|
|
134
|
-
],
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Documentation:
|
|
138
|
-
* https://eslint.org/docs/latest/rules/no-unused-expressions
|
|
139
|
-
*
|
|
140
|
-
* Not defined in parent configs.
|
|
141
|
-
*
|
|
142
|
-
* An unused expression which has no effect on the state of the program indicates a logic error.
|
|
143
|
-
*/
|
|
144
|
-
"no-unused-expressions": "warn",
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Documentation:
|
|
148
|
-
* https://eslint.org/docs/latest/rules/prefer-destructuring
|
|
149
|
-
*
|
|
150
|
-
* Defined at:
|
|
151
|
-
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js
|
|
152
|
-
*
|
|
153
|
-
* Array destructuring can result in non-intuitive code.
|
|
154
|
-
*/
|
|
155
|
-
"prefer-destructuring": [
|
|
156
|
-
"warn",
|
|
157
|
-
{
|
|
158
|
-
VariableDeclarator: {
|
|
159
|
-
array: false,
|
|
160
|
-
object: true,
|
|
161
|
-
},
|
|
162
|
-
AssignmentExpression: {
|
|
163
|
-
array: false,
|
|
164
|
-
object: false,
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
|
|
169
|
-
// "constructor-super" is disabled due to conflicting with the TypeScript compiler:
|
|
170
|
-
// https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
171
|
-
|
|
172
|
-
// "for-direction" is enabled here:
|
|
173
|
-
// https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/errors.js
|
|
174
|
-
|
|
175
|
-
// "getter-return" is disabled due to conflicting with the TypeScript compiler:
|
|
176
|
-
// https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
177
|
-
|
|
178
|
-
// "no-async-promise-executor"
|
|
179
|
-
|
|
180
|
-
// "no-await-in-loop"
|
|
181
|
-
|
|
182
|
-
// "no-class-assign"
|
|
183
|
-
|
|
184
|
-
// "no-compare-neg-zero"
|
|
185
|
-
|
|
186
|
-
// "no-cond-assign"
|
|
187
|
-
|
|
188
|
-
// "no-const-assign" is disabled due to conflicting with the TypeScript compiler:
|
|
189
|
-
// https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
190
|
-
|
|
191
|
-
// "no-constant-binary-expression"
|
|
192
|
-
|
|
193
|
-
// "no-constant-condition"
|
|
194
|
-
|
|
195
|
-
// "no-constructor-return"
|
|
196
|
-
|
|
197
|
-
// "no-control-regex"
|
|
198
|
-
|
|
199
|
-
// "no-debugger"
|
|
200
|
-
|
|
201
|
-
// "no-dupe-args" is disabled due to conflicting with the TypeScript compiler:
|
|
202
|
-
// https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
203
|
-
|
|
204
|
-
// "no-dupe-class-members" is disabled due to conflicting with the TypeScript compiler:
|
|
205
|
-
// https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
206
|
-
|
|
207
|
-
// "no-dupe-else-if"
|
|
208
|
-
|
|
209
|
-
// "no-dupe-keys" is disabled due to conflicting with the TypeScript compiler:
|
|
210
|
-
// https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
211
|
-
|
|
212
|
-
// "no-duplicate-case"
|
|
213
|
-
|
|
214
|
-
// "no-duplicate-imports"
|
|
215
|
-
|
|
216
|
-
// "no-empty-character-class"
|
|
217
|
-
|
|
218
|
-
// "no-empty-pattern"
|
|
219
|
-
|
|
220
|
-
// "no-ex-assign"
|
|
221
3
|
|
|
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
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
4
|
+
const confusingBrowserGlobals = require("confusing-browser-globals");
|
|
5
|
+
|
|
6
|
+
// Rules are separated into categories:
|
|
7
|
+
// 1) Possible Problems
|
|
8
|
+
// 2) Suggestions
|
|
9
|
+
// 3) Layout & Formatting
|
|
10
|
+
|
|
11
|
+
/** @type {import("eslint").Linter.RulesRecord} */
|
|
12
|
+
const POSSIBLE_PROBLEMS = {
|
|
13
|
+
/** The `checkForEach` option is enabled to make the rule stricter. */
|
|
14
|
+
"array-callback-return": [
|
|
15
|
+
"error",
|
|
16
|
+
{
|
|
17
|
+
checkForEach: true,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
|
|
21
|
+
"constructor-super": "off", // @typescript-eslint/eslint-recommended
|
|
22
|
+
"for-direction": "error",
|
|
23
|
+
"getter-return": "off", // @typescript-eslint/eslint-recommended
|
|
24
|
+
"no-async-promise-executor": "error",
|
|
25
|
+
"no-await-in-loop": "error",
|
|
26
|
+
"no-class-assign": "error",
|
|
27
|
+
"no-compare-neg-zero": "error",
|
|
28
|
+
"no-cond-assign": "error",
|
|
29
|
+
"no-const-assign": "off", // @typescript-eslint/eslint-recommended
|
|
30
|
+
"no-constant-binary-expression": "error",
|
|
31
|
+
"no-constant-condition": "error",
|
|
32
|
+
"no-constructor-return": "error",
|
|
33
|
+
"no-control-regex": "error",
|
|
34
|
+
"no-debugger": "error",
|
|
35
|
+
"no-dupe-args": "off", // @typescript-eslint/eslint-recommended
|
|
36
|
+
"no-dupe-class-members": "off", // @typescript-eslint/eslint-recommended
|
|
37
|
+
"no-dupe-else-if": "error",
|
|
38
|
+
"no-dupe-keys": "off", // @typescript-eslint/eslint-recommended
|
|
39
|
+
"no-duplicate-case": "error",
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Superseded by the `import/no-duplicates` rule (which is provided by the `import/recommended`
|
|
43
|
+
* config).
|
|
44
|
+
*/
|
|
45
|
+
"no-duplicate-imports": "off",
|
|
46
|
+
|
|
47
|
+
"no-empty-character-class": "error",
|
|
48
|
+
"no-empty-pattern": "error",
|
|
49
|
+
"no-ex-assign": "error",
|
|
50
|
+
"no-fallthrough": "error",
|
|
51
|
+
"no-func-assign": "off", // @typescript-eslint/eslint-recommended
|
|
52
|
+
"no-import-assign": "off", // @typescript-eslint/eslint-recommended
|
|
53
|
+
"no-inner-declarations": "error",
|
|
54
|
+
"no-invalid-regexp": "error",
|
|
55
|
+
"no-irregular-whitespace": "error",
|
|
56
|
+
|
|
57
|
+
/** Superseded by the `@typescript-eslint/no-loss-of-precision` rule. */
|
|
58
|
+
"no-loss-of-precision": "off",
|
|
59
|
+
|
|
60
|
+
"no-misleading-character-class": "error",
|
|
61
|
+
"no-new-native-nonconstructor": "error",
|
|
62
|
+
"no-new-symbol": "off", // @typescript-eslint/eslint-recommended
|
|
63
|
+
"no-obj-calls": "off", // @typescript-eslint/eslint-recommended`
|
|
64
|
+
"no-promise-executor-return": "error",
|
|
65
|
+
"no-prototype-builtins": "error",
|
|
66
|
+
"no-self-assign": "error",
|
|
67
|
+
"no-self-compare": "error",
|
|
68
|
+
"no-setter-return": "off", // @typescript-eslint/eslint-recommended
|
|
69
|
+
"no-sparse-arrays": "error",
|
|
70
|
+
"no-template-curly-in-string": "error",
|
|
71
|
+
"no-this-before-super": "off", // @typescript-eslint/eslint-recommended`
|
|
72
|
+
"no-undef": "off", // @typescript-eslint/eslint-recommended
|
|
73
|
+
"no-unexpected-multiline": "off", // eslint-config-prettier
|
|
74
|
+
"no-unmodified-loop-condition": "error",
|
|
75
|
+
"no-unreachable": "off", // @typescript-eslint/eslint-recommended
|
|
76
|
+
"no-unreachable-loop": "error",
|
|
77
|
+
"no-unsafe-finally": "error",
|
|
78
|
+
"no-unsafe-negation": "off", // @typescript-eslint/eslint-recommended
|
|
79
|
+
"no-unsafe-optional-chaining": "error",
|
|
80
|
+
"no-unused-private-class-members": "error",
|
|
81
|
+
|
|
82
|
+
/** Superseded by the `@typescript-eslint/no-unused-vars` rule. */
|
|
83
|
+
"no-unused-vars": "off",
|
|
84
|
+
|
|
85
|
+
/** Superseded by the `@typescript-eslint/no-use-before-define` rule. */
|
|
86
|
+
"no-use-before-define": "off",
|
|
87
|
+
|
|
88
|
+
"no-useless-backreference": "error",
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Disabled since [Airbnb reports that the rule is "very
|
|
92
|
+
* buggy"](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/errors.js).
|
|
93
|
+
*/
|
|
94
|
+
"require-atomic-updates": "off",
|
|
95
|
+
|
|
96
|
+
"use-isnan": "error",
|
|
97
|
+
"valid-typeof": "error",
|
|
98
|
+
};
|
|
276
99
|
|
|
277
|
-
|
|
278
|
-
|
|
100
|
+
/** @type {import("eslint").Linter.RulesRecord} */
|
|
101
|
+
const SUGGESTIONS = {
|
|
102
|
+
"accessor-pairs": "error",
|
|
103
|
+
"arrow-body-style": "error",
|
|
104
|
+
"block-scoped-var": "error",
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Superseded by the `@typescript-eslint/naming-convention` rule. (`camelcase` is used to enforce
|
|
108
|
+
* naming conventions.)
|
|
109
|
+
*/
|
|
110
|
+
camelcase: "off",
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Superseded by the `isaacscript/complete-sentences-jsdoc` and
|
|
114
|
+
* `isaacscript/complete-sentences-line-comments` rules.
|
|
115
|
+
*/
|
|
116
|
+
"capitalized-comments": "off",
|
|
117
|
+
|
|
118
|
+
/** Superseded by the `@typescript-eslint/class-methods-use-this` rule. */
|
|
119
|
+
"class-methods-use-this": "off",
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Disabled since cyclomatic complexity is not a good enough general indicator of code complexity.
|
|
123
|
+
*/
|
|
124
|
+
complexity: "off",
|
|
125
|
+
|
|
126
|
+
/** Disabled since this is handled by the `noImplicitReturns` TypeScript compiler flag. */
|
|
127
|
+
"consistent-return": "off",
|
|
128
|
+
|
|
129
|
+
/** Disabled since capturing `this` is largely obviated by using modern arrow functions. */
|
|
130
|
+
"consistent-this": "off",
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Always requiring curly braces can partially ward against [Apple-style if statement
|
|
134
|
+
* bugs](https://www.imperialviolet.org/2014/02/22/applebug.html). Additionally, this rule needs
|
|
135
|
+
* to be set to "all" to [work properly with
|
|
136
|
+
* `eslint-prettier-config`](https://github.com/prettier/eslint-config-prettier#curly).
|
|
137
|
+
*/
|
|
138
|
+
curly: ["error", "all"],
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Disabled since it is [generally bad in TypeScript
|
|
142
|
+
* projects](https://github.com/typescript-eslint/typescript-eslint/issues/5254#issuecomment-1168992749).
|
|
143
|
+
*/
|
|
144
|
+
"default-case": "off",
|
|
145
|
+
|
|
146
|
+
"default-case-last": "error",
|
|
147
|
+
|
|
148
|
+
/** Superseded by the `@typescript-eslint/default-param-last` rule. */
|
|
149
|
+
"default-param-last": "off",
|
|
150
|
+
|
|
151
|
+
/** Superseded by the `@typescript-eslint/dot-notation` rule. */
|
|
152
|
+
"dot-notation": "off",
|
|
153
|
+
|
|
154
|
+
/** Superseded by the `isaacscript/eqeqeq-fix` rule. */
|
|
155
|
+
eqeqeq: "off",
|
|
156
|
+
|
|
157
|
+
"func-name-matching": "error",
|
|
158
|
+
"func-names": "error",
|
|
159
|
+
|
|
160
|
+
/** Disabled since it is common to use both function forms, depending on the situation. */
|
|
161
|
+
"func-style": "off",
|
|
162
|
+
|
|
163
|
+
"grouped-accessor-pairs": "error",
|
|
164
|
+
"guard-for-in": "error",
|
|
165
|
+
|
|
166
|
+
/** Disabled since it is expected to be configured with project-specific keywords. */
|
|
167
|
+
"id-denylist": "off",
|
|
168
|
+
|
|
169
|
+
/** Disabled because short variable names are understandable in many contexts. */
|
|
170
|
+
"id-length": "off",
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Superseded by the `@typescript-eslint/naming-convention` rule. (`id-match` is used to enforce
|
|
174
|
+
* naming conventions.)
|
|
175
|
+
*/
|
|
176
|
+
"id-match": "off",
|
|
177
|
+
|
|
178
|
+
/** Superseded by the `@typescript-eslint/init-declarations` rule. */
|
|
179
|
+
"init-declarations": "off",
|
|
180
|
+
|
|
181
|
+
/** The `enforceForIfStatements` option is enabled to make the rule stricter. */
|
|
182
|
+
"logical-assignment-operators": [
|
|
183
|
+
"error",
|
|
184
|
+
"always",
|
|
185
|
+
{
|
|
186
|
+
enforceForIfStatements: true,
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
|
|
190
|
+
"max-classes-per-file": "error",
|
|
191
|
+
"max-depth": "error",
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Disabled because enforcing an arbitrary line threshold for every file in a project does not
|
|
195
|
+
* provide much value.
|
|
196
|
+
*/
|
|
197
|
+
"max-lines": "off",
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Disabled because enforcing an arbitrary line threshold for every function in a project does not
|
|
201
|
+
* provide much value.
|
|
202
|
+
*/
|
|
203
|
+
"max-lines-per-function": "off",
|
|
204
|
+
|
|
205
|
+
"max-nested-callbacks": "error",
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Disabled because enforcing an arbitrary parameter number threshold for every function in a
|
|
209
|
+
* project does not provide much value. (Additionally, using TypeScript reduces the value of such
|
|
210
|
+
* a check.)
|
|
211
|
+
*/
|
|
212
|
+
"max-params": "off",
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Disabled because enforcing an arbitrary statement threshold for every function in a project
|
|
216
|
+
* does not provide much value.
|
|
217
|
+
*/
|
|
218
|
+
"max-statements": "off",
|
|
219
|
+
|
|
220
|
+
/** Disabled because it is conventional to use both kinds of comments in TypeScript projects. */
|
|
221
|
+
"multiline-comment-style": "off",
|
|
222
|
+
|
|
223
|
+
"new-cap": "error",
|
|
224
|
+
"no-alert": "error",
|
|
225
|
+
|
|
226
|
+
/** Superseded by the `@typescript-eslint/no-array-constructor` rule. */
|
|
227
|
+
"no-array-constructor": "off",
|
|
228
|
+
|
|
229
|
+
"no-bitwise": "error",
|
|
230
|
+
"no-caller": "error",
|
|
231
|
+
"no-case-declarations": "error",
|
|
232
|
+
"no-confusing-arrow": "off", // eslint-config-prettier
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Disabled because command-line programs written in TypeScript commonly write to standard out and
|
|
236
|
+
* standard error.
|
|
237
|
+
*/
|
|
238
|
+
"no-console": "off",
|
|
239
|
+
|
|
240
|
+
/** Disabled because proper use of continues can reduce indentation for long blocks of code. */
|
|
241
|
+
"no-continue": "off",
|
|
242
|
+
|
|
243
|
+
"no-delete-var": "error",
|
|
244
|
+
"no-div-regex": "error",
|
|
245
|
+
|
|
246
|
+
/** The `allowElseIf` option is disabled to make the rule stricter. */
|
|
247
|
+
"no-else-return": [
|
|
248
|
+
"error",
|
|
249
|
+
{
|
|
250
|
+
allowElseIf: false,
|
|
251
|
+
},
|
|
252
|
+
],
|
|
253
|
+
|
|
254
|
+
"no-empty": "error",
|
|
255
|
+
|
|
256
|
+
/** Superseded by the `@typescript-eslint/no-empty-function` rule. */
|
|
257
|
+
"no-empty-function": "off",
|
|
258
|
+
|
|
259
|
+
"no-empty-static-block": "error",
|
|
260
|
+
"no-eq-null": "error",
|
|
261
|
+
"no-eval": "error",
|
|
262
|
+
"no-extend-native": "error",
|
|
263
|
+
"no-extra-bind": "error",
|
|
264
|
+
"no-extra-boolean-cast": "error",
|
|
265
|
+
"no-extra-label": "error",
|
|
266
|
+
|
|
267
|
+
/** Superseded by the `@typescript-eslint/no-extra-semi` rule. */
|
|
268
|
+
"no-extra-semi": "off",
|
|
269
|
+
|
|
270
|
+
"no-floating-decimal": "off", // eslint-config-prettier
|
|
271
|
+
"no-global-assign": "error",
|
|
272
|
+
"no-implicit-coercion": "error",
|
|
273
|
+
"no-implicit-globals": "error",
|
|
274
|
+
|
|
275
|
+
/** Superseded by the `@typescript-eslint/no-implied-eval` rule. */
|
|
276
|
+
"no-implied-eval": "off",
|
|
277
|
+
|
|
278
|
+
/** Disabled because inline comments are common in the TypeScript ecosystem. */
|
|
279
|
+
"no-inline-comments": "off",
|
|
280
|
+
|
|
281
|
+
/** Superseded by the `@typescript-eslint/no-invalid-this` rule. */
|
|
282
|
+
"no-invalid-this": "off",
|
|
283
|
+
|
|
284
|
+
"no-iterator": "error",
|
|
285
|
+
"no-label-var": "error",
|
|
286
|
+
"no-labels": "error",
|
|
287
|
+
"no-lone-blocks": "error",
|
|
288
|
+
"no-lonely-if": "error",
|
|
289
|
+
|
|
290
|
+
/** Superseded by the `@typescript-eslint/no-loop-func` rule. */
|
|
291
|
+
"no-loop-func": "off",
|
|
292
|
+
|
|
293
|
+
/** Superseded by the `@typescript-eslint/no-magic-numbers` rule. */
|
|
294
|
+
"no-magic-numbers": "off",
|
|
295
|
+
|
|
296
|
+
"no-mixed-operators": "off", // eslint-config-prettier
|
|
297
|
+
"no-multi-assign": "error",
|
|
298
|
+
"no-multi-str": "error",
|
|
299
|
+
|
|
300
|
+
/** Superseded by the `unicorn/no-negated-condition` rule. */
|
|
301
|
+
"no-negated-condition": "off",
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* `unicorn/no-nested-ternary` is a modified version of this rule but that version is less strict.
|
|
305
|
+
*/
|
|
306
|
+
"no-nested-ternary": "error",
|
|
307
|
+
|
|
308
|
+
"no-new": "error",
|
|
309
|
+
"no-new-func": "error",
|
|
310
|
+
"no-new-object": "error",
|
|
311
|
+
"no-new-wrappers": "error",
|
|
312
|
+
"no-nonoctal-decimal-escape": "error",
|
|
313
|
+
"no-octal": "error",
|
|
314
|
+
"no-octal-escape": "error",
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* The options are [copied from
|
|
318
|
+
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js).
|
|
319
|
+
*/
|
|
320
|
+
"no-param-reassign": [
|
|
321
|
+
"error",
|
|
322
|
+
{
|
|
323
|
+
props: true,
|
|
324
|
+
ignorePropertyModificationsFor: [
|
|
325
|
+
"acc", // for reduce accumulators
|
|
326
|
+
"accumulator", // for reduce accumulators
|
|
327
|
+
"e", // for e.returnvalue
|
|
328
|
+
"ctx", // for Koa routing
|
|
329
|
+
"context", // for Koa routing
|
|
330
|
+
"req", // for Express requests
|
|
331
|
+
"request", // for Express requests
|
|
332
|
+
"res", // for Express responses
|
|
333
|
+
"response", // for Express responses
|
|
334
|
+
"$scope", // for Angular 1 scopes
|
|
335
|
+
"staticContext", // for ReactRouter context
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Disabled because the rule is unnecessary when using Prettier. (Unary operators can lead to
|
|
342
|
+
* errors with minified code, but Prettier adds semicolons automatically.)
|
|
343
|
+
*/
|
|
344
|
+
"no-plusplus": "off",
|
|
345
|
+
|
|
346
|
+
"no-proto": "error",
|
|
347
|
+
|
|
348
|
+
/** Superseded by the `@typescript-eslint/block-spacing` rule. */
|
|
349
|
+
"no-redeclare": "off",
|
|
350
|
+
|
|
351
|
+
"no-regex-spaces": "error",
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* The options are [copied from
|
|
355
|
+
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js).
|
|
356
|
+
*/
|
|
357
|
+
"no-restricted-exports": [
|
|
358
|
+
"error",
|
|
359
|
+
{
|
|
360
|
+
restrictedNamedExports: [
|
|
361
|
+
"default", // use `export default` to provide a default export
|
|
362
|
+
"then", // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* The options are [copied from
|
|
369
|
+
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js).
|
|
370
|
+
*/
|
|
371
|
+
"no-restricted-globals": [
|
|
372
|
+
"error",
|
|
373
|
+
{
|
|
374
|
+
name: "isFinite",
|
|
375
|
+
message:
|
|
376
|
+
"Use Number.isFinite instead: https://github.com/airbnb/javascript#standard-library--isfinite",
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
name: "isNaN",
|
|
380
|
+
message:
|
|
381
|
+
"Use Number.isNaN instead: https://github.com/airbnb/javascript#standard-library--isnan",
|
|
382
|
+
},
|
|
383
|
+
...confusingBrowserGlobals,
|
|
384
|
+
],
|
|
385
|
+
|
|
386
|
+
/** Superseded by the `@typescript-eslint/no-restricted-imports` rule. */
|
|
387
|
+
"no-restricted-imports": "off",
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* The options are [copied from
|
|
391
|
+
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js).
|
|
392
|
+
*/
|
|
393
|
+
"no-restricted-properties": [
|
|
394
|
+
"error",
|
|
395
|
+
{
|
|
396
|
+
object: "arguments",
|
|
397
|
+
property: "callee",
|
|
398
|
+
message: "arguments.callee is deprecated",
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
object: "global",
|
|
402
|
+
property: "isFinite",
|
|
403
|
+
message: "Please use Number.isFinite instead",
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
object: "self",
|
|
407
|
+
property: "isFinite",
|
|
408
|
+
message: "Please use Number.isFinite instead",
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
object: "window",
|
|
412
|
+
property: "isFinite",
|
|
413
|
+
message: "Please use Number.isFinite instead",
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
object: "global",
|
|
417
|
+
property: "isNaN",
|
|
418
|
+
message: "Please use Number.isNaN instead",
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
object: "self",
|
|
422
|
+
property: "isNaN",
|
|
423
|
+
message: "Please use Number.isNaN instead",
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
object: "window",
|
|
427
|
+
property: "isNaN",
|
|
428
|
+
message: "Please use Number.isNaN instead",
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
property: "__defineGetter__",
|
|
432
|
+
message: "Please use Object.defineProperty instead.",
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
property: "__defineSetter__",
|
|
436
|
+
message: "Please use Object.defineProperty instead.",
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
object: "Math",
|
|
440
|
+
property: "pow",
|
|
441
|
+
message: "Use the exponentiation operator (**) instead.",
|
|
442
|
+
},
|
|
443
|
+
],
|
|
444
|
+
|
|
445
|
+
/** Disabled because it is intended for disallowing specific language features per-project. */
|
|
446
|
+
"no-restricted-syntax": "off",
|
|
447
|
+
|
|
448
|
+
/** The `always` option is provided to make the rule stricter. */
|
|
449
|
+
"no-return-assign": ["error", "always"],
|
|
450
|
+
|
|
451
|
+
"no-script-url": "error",
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Disabled because [it can conflict with
|
|
455
|
+
* Prettier](https://github.com/prettier/eslint-config-prettier/tree/main#no-sequences).
|
|
456
|
+
*/
|
|
457
|
+
"no-sequences": "off",
|
|
458
|
+
|
|
459
|
+
/** Superseded by the `@typescript-eslint/no-shadow` rule. */
|
|
460
|
+
"no-shadow": "off",
|
|
461
|
+
|
|
462
|
+
"no-shadow-restricted-names": "error",
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Disabled because ternaries are common in the TypeScript ecosystem and can often lead to concise
|
|
466
|
+
* code that is easy to read.
|
|
467
|
+
*/
|
|
468
|
+
"no-ternary": "off",
|
|
469
|
+
|
|
470
|
+
/** Superseded by the `@typescript-eslint/no-throw-literal` rule. */
|
|
471
|
+
"no-throw-literal": "off",
|
|
472
|
+
|
|
473
|
+
"no-undef-init": "error",
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Disabled because in TypeScript, it is common to explicitly check for undefined for the purposes
|
|
477
|
+
* of type narrowing.
|
|
478
|
+
*/
|
|
479
|
+
"no-undefined": "off",
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Disabled since it is a common pattern to use underscores to temporarily allow unused variables
|
|
483
|
+
* during development.
|
|
484
|
+
*/
|
|
485
|
+
"no-underscore-dangle": "off",
|
|
486
|
+
|
|
487
|
+
/** The `defaultAssignment` option is disabled to make the rule stricter. */
|
|
488
|
+
"no-unneeded-ternary": [
|
|
489
|
+
"error",
|
|
490
|
+
{
|
|
491
|
+
defaultAssignment: false,
|
|
492
|
+
},
|
|
493
|
+
],
|
|
494
|
+
|
|
495
|
+
/** Superseded by the `@typescript-eslint/no-unused-expressions` rule. */
|
|
496
|
+
"no-unused-expressions": "off",
|
|
497
|
+
|
|
498
|
+
"no-unused-labels": "error",
|
|
499
|
+
"no-useless-call": "error",
|
|
500
|
+
"no-useless-catch": "error",
|
|
501
|
+
|
|
502
|
+
/** The `enforceForClassMembers` option is enabled to make the rule stricter. */
|
|
503
|
+
"no-useless-computed-key": [
|
|
504
|
+
"error",
|
|
505
|
+
{
|
|
506
|
+
enforceForClassMembers: true,
|
|
507
|
+
},
|
|
508
|
+
],
|
|
509
|
+
|
|
510
|
+
"no-useless-concat": "error",
|
|
511
|
+
|
|
512
|
+
/** Superseded by the `@typescript-eslint/no-useless-constructor` rule. */
|
|
513
|
+
"no-useless-constructor": "off",
|
|
514
|
+
|
|
515
|
+
"no-useless-escape": "error",
|
|
516
|
+
"no-useless-rename": "error",
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Superseded by the `no-autofix/no-useless-return` rule (since the autofix is usually unwanted).
|
|
520
|
+
*/
|
|
521
|
+
"no-useless-return": "off",
|
|
522
|
+
|
|
523
|
+
"no-var": "error",
|
|
524
|
+
"no-void": "error",
|
|
525
|
+
|
|
526
|
+
/** Superseded by the `unicorn/expiring-todo-comments` rule. */
|
|
527
|
+
"no-warning-comments": "off",
|
|
528
|
+
|
|
529
|
+
"no-with": "error",
|
|
530
|
+
|
|
531
|
+
/** The `ignoreConstructors` option is disabled to make the rule stricter. */
|
|
532
|
+
"object-shorthand": [
|
|
533
|
+
"error",
|
|
534
|
+
"always",
|
|
535
|
+
{
|
|
536
|
+
ignoreConstructors: false,
|
|
537
|
+
},
|
|
538
|
+
],
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* The `never` option is provided to disallow multi-variable declarations (since they can be
|
|
542
|
+
* confusing).
|
|
543
|
+
*/
|
|
544
|
+
"one-var": ["error", "never"],
|
|
545
|
+
|
|
546
|
+
"one-var-declaration-per-line": "off", // eslint-config-prettier
|
|
547
|
+
"operator-assignment": "error",
|
|
548
|
+
"prefer-arrow-callback": "error",
|
|
549
|
+
|
|
550
|
+
/** Superseded by the `no-autofix/prefer-const` rule (since the autofix is usually unwanted). */
|
|
551
|
+
"prefer-const": "off",
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Object destructuring is enforced but array destructuring is not. This matches usage in the
|
|
555
|
+
* general TypeScript ecosystem.
|
|
556
|
+
*/
|
|
557
|
+
"prefer-destructuring": [
|
|
558
|
+
"error",
|
|
559
|
+
{
|
|
560
|
+
VariableDeclarator: {
|
|
561
|
+
array: false,
|
|
562
|
+
object: true,
|
|
563
|
+
},
|
|
564
|
+
AssignmentExpression: {
|
|
565
|
+
array: false,
|
|
566
|
+
object: true,
|
|
567
|
+
},
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
// We disable this for renamed properties, this this is a valid use-case.
|
|
571
|
+
// e.g. `const collectibleUsedToShowFlight = CollectibleType.FATE;`
|
|
572
|
+
enforceForRenamedProperties: false,
|
|
573
|
+
},
|
|
574
|
+
],
|
|
575
|
+
|
|
576
|
+
"prefer-exponentiation-operator": "error",
|
|
577
|
+
"prefer-named-capture-group": "error",
|
|
578
|
+
"prefer-numeric-literals": "error",
|
|
579
|
+
"prefer-object-has-own": "error",
|
|
580
|
+
"prefer-object-spread": "error",
|
|
581
|
+
|
|
582
|
+
/** The `allowEmptyReject` option is enabled since this is a common pattern. */
|
|
583
|
+
"prefer-promise-reject-errors": [
|
|
584
|
+
"error",
|
|
585
|
+
{
|
|
586
|
+
allowEmptyReject: true,
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
|
|
590
|
+
/** The `disallowRedundantWrapping` option is enabled to make the rule stricter. */
|
|
591
|
+
"prefer-regex-literals": [
|
|
592
|
+
"error",
|
|
593
|
+
{
|
|
594
|
+
disallowRedundantWrapping: true,
|
|
595
|
+
},
|
|
596
|
+
],
|
|
597
|
+
|
|
598
|
+
"prefer-rest-params": "error",
|
|
599
|
+
"prefer-spread": "error",
|
|
600
|
+
"prefer-template": "error",
|
|
601
|
+
"quote-props": "off", // eslint-config-prettier
|
|
602
|
+
radix: "error",
|
|
603
|
+
|
|
604
|
+
/** Superseded by the `@typescript-eslint/require-await` rule. */
|
|
605
|
+
"require-await": "off",
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Disabled because requiring the `u` or the `v` flag for ASCII text is verbose and cumbersome.
|
|
609
|
+
* (Even though these flags would also enable regex strict mode, the marginal benefit is not worth
|
|
610
|
+
* the verbosity.)
|
|
611
|
+
*/
|
|
612
|
+
"require-unicode-regexp": "off",
|
|
613
|
+
|
|
614
|
+
"require-yield": "error",
|
|
615
|
+
|
|
616
|
+
/** Disabled since this is automatically handled by `prettier-plugin-organize-imports`. */
|
|
617
|
+
"sort-imports": "off",
|
|
618
|
+
|
|
619
|
+
/** Disabled because object keys are often not meant to be sorted in alphabetical order. */
|
|
620
|
+
"sort-keys": "off",
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Disabled because variable declarations are often not meant to be sorted in alphabetical order.
|
|
624
|
+
*/
|
|
625
|
+
"sort-vars": "off",
|
|
626
|
+
|
|
627
|
+
/** Superseded by `isaacscript/format-jsdoc-comments` and `isaacscript/format-line-comments`. */
|
|
628
|
+
"spaced-comment": "off",
|
|
629
|
+
|
|
630
|
+
/** The `never` option is provided to make the rule stricter. */
|
|
631
|
+
strict: ["error", "never"],
|
|
632
|
+
|
|
633
|
+
"symbol-description": "error",
|
|
634
|
+
"vars-on-top": "error",
|
|
635
|
+
yoda: "error",
|
|
636
|
+
};
|
|
279
637
|
|
|
280
|
-
|
|
281
|
-
|
|
638
|
+
/** @type {import("eslint").Linter.RulesRecord} */
|
|
639
|
+
const LAYOUT_AND_FORMATTING = {
|
|
640
|
+
"array-bracket-newline": "off", // eslint-config-prettier
|
|
641
|
+
"array-bracket-spacing": "off", // eslint-config-prettier
|
|
642
|
+
"array-element-newline": "off", // eslint-config-prettier
|
|
643
|
+
"arrow-parens": "off", // eslint-config-prettier
|
|
644
|
+
"arrow-spacing": "off", // eslint-config-prettier
|
|
645
|
+
"block-spacing": "off", // eslint-config-prettier
|
|
646
|
+
"brace-style": "off", // eslint-config-prettier
|
|
647
|
+
"comma-dangle": "off", // eslint-config-prettier
|
|
648
|
+
"comma-spacing": "off", // eslint-config-prettier
|
|
649
|
+
"comma-style": "off", // eslint-config-prettier
|
|
650
|
+
"computed-property-spacing": "off", // eslint-config-prettier
|
|
651
|
+
"dot-location": "off", // eslint-config-prettier
|
|
652
|
+
"eol-last": "off", // eslint-config-prettier
|
|
653
|
+
"func-call-spacing": "off", // eslint-config-prettier
|
|
654
|
+
"function-call-argument-newline": "off", // eslint-config-prettier
|
|
655
|
+
"function-paren-newline": "off", // eslint-config-prettier
|
|
656
|
+
"generator-star-spacing": "off", // eslint-config-prettier
|
|
657
|
+
"implicit-arrow-linebreak": "off", // eslint-config-prettier
|
|
658
|
+
indent: "off", // eslint-config-prettier
|
|
659
|
+
"jsx-quotes": "off", // eslint-config-prettier
|
|
660
|
+
"key-spacing": "off", // eslint-config-prettier
|
|
661
|
+
"keyword-spacing": "off", // eslint-config-prettier
|
|
662
|
+
|
|
663
|
+
/** Disabled since it is common in the TypeScript ecosystem to use both types of comments. */
|
|
664
|
+
"line-comment-position": "off",
|
|
665
|
+
|
|
666
|
+
"linebreak-style": "off", // eslint-config-prettier
|
|
667
|
+
"lines-around-comment": "off", // eslint-config-prettier
|
|
668
|
+
|
|
669
|
+
/** Superseded by the `@typescript-eslint/lines-between-class-members` rule. */
|
|
670
|
+
"lines-between-class-members": "off",
|
|
671
|
+
|
|
672
|
+
"max-len": "off", // eslint-config-prettier
|
|
673
|
+
"max-statements-per-line": "off", // eslint-config-prettier
|
|
674
|
+
"multiline-ternary": "off", // eslint-config-prettier
|
|
675
|
+
"new-parens": "off", // eslint-config-prettier
|
|
676
|
+
"newline-per-chained-call": "off", // eslint-config-prettier
|
|
677
|
+
"no-extra-parens": "off", // eslint-config-prettier
|
|
678
|
+
"no-mixed-spaces-and-tabs": "off", // eslint-config-prettier
|
|
679
|
+
"no-multi-spaces": "off", // eslint-config-prettier
|
|
680
|
+
"no-multiple-empty-lines": "off", // eslint-config-prettier
|
|
681
|
+
"no-tabs": "off", // eslint-config-prettier
|
|
682
|
+
"no-trailing-spaces": "off", // eslint-config-prettier
|
|
683
|
+
"no-whitespace-before-property": "off", // eslint-config-prettier
|
|
684
|
+
"nonblock-statement-body-position": "off", // eslint-config-prettier
|
|
685
|
+
"object-curly-newline": "off", // eslint-config-prettier
|
|
686
|
+
"object-curly-spacing": "off", // eslint-config-prettier
|
|
687
|
+
"object-property-newline": "off", // eslint-config-prettier
|
|
688
|
+
"operator-linebreak": "off", // eslint-config-prettier
|
|
689
|
+
"padded-blocks": "off", // eslint-config-prettier
|
|
690
|
+
|
|
691
|
+
/** Superseded by the `@typescript-eslint/padding-line-between-statements` rule. */
|
|
692
|
+
"padding-line-between-statements": "off",
|
|
693
|
+
|
|
694
|
+
quotes: "off", // eslint-config-prettier
|
|
695
|
+
"rest-spread-spacing": "off", // eslint-config-prettier
|
|
696
|
+
semi: "off", // eslint-config-prettier
|
|
697
|
+
"semi-spacing": "off", // eslint-config-prettier
|
|
698
|
+
"semi-style": "off", // eslint-config-prettier
|
|
699
|
+
"space-before-blocks": "off", // eslint-config-prettier
|
|
700
|
+
"space-before-function-paren": "off", // eslint-config-prettier
|
|
701
|
+
"space-in-parens": "off", // eslint-config-prettier
|
|
702
|
+
"space-infix-ops": "off", // eslint-config-prettier
|
|
703
|
+
"space-unary-ops": "off", // eslint-config-prettier
|
|
704
|
+
"switch-colon-spacing": "off", // eslint-config-prettier
|
|
705
|
+
"template-curly-spacing": "off", // eslint-config-prettier
|
|
706
|
+
"template-tag-spacing": "off", // eslint-config-prettier
|
|
707
|
+
"unicode-bom": "off", // eslint-config-prettier
|
|
708
|
+
"wrap-iife": "off", // eslint-config-prettier
|
|
709
|
+
"wrap-regex": "off", // eslint-config-prettier
|
|
710
|
+
"yield-star-spacing": "off", // eslint-config-prettier
|
|
711
|
+
};
|
|
282
712
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
// class-methods-use-this
|
|
713
|
+
/** @type {import("eslint").Linter.Config} */
|
|
714
|
+
const config = {
|
|
715
|
+
rules: {
|
|
716
|
+
...POSSIBLE_PROBLEMS,
|
|
717
|
+
...SUGGESTIONS,
|
|
718
|
+
...LAYOUT_AND_FORMATTING,
|
|
290
719
|
},
|
|
291
720
|
};
|
|
721
|
+
|
|
722
|
+
module.exports = config;
|