@spscommerce/eslint-config-typescript 0.0.2 β 0.0.3
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/lib/index.js +11 -15
- package/lib/rules/bestPractices.js +487 -309
- package/lib/rules/es6.js +181 -110
- package/lib/rules/imports/helpfulWarnings.js +28 -14
- package/lib/rules/imports/moduleSystems.js +20 -10
- package/lib/rules/imports/staticAnalysis.js +56 -28
- package/lib/rules/imports/styleGuide.js +64 -32
- package/lib/rules/possibleErrors.js +231 -142
- package/lib/rules/strictMode.js +6 -3
- package/lib/rules/stylisticIssues.js +525 -327
- package/lib/rules/typescript.js +431 -250
- package/lib/rules/variables.js +74 -49
- package/package.json +10 -6
package/lib/rules/typescript.js
CHANGED
|
@@ -3,254 +3,435 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.typescript = void 0;
|
|
4
4
|
// β
= recommended, π§ = fixable, π = requires type information
|
|
5
5
|
exports.typescript = {
|
|
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
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Require that member overloads be consecutive β
|
|
8
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md
|
|
9
|
+
*/
|
|
10
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
11
|
+
/**
|
|
12
|
+
* Requires using either `T[]` or `Array<T>` for arrays π§
|
|
13
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/array-type.md
|
|
14
|
+
*/
|
|
15
|
+
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
|
|
16
|
+
/**
|
|
17
|
+
* Disallows awaiting a value that is not a Thenable β
π
|
|
18
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/await-thenable.md
|
|
19
|
+
*/
|
|
20
|
+
"@typescript-eslint/await-thenable": "error",
|
|
21
|
+
/**
|
|
22
|
+
* Bans `@ts-<directive>` comments from being used or requires descriptions after directive β
|
|
23
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-ts-comment.md
|
|
24
|
+
*/
|
|
25
|
+
"@typescript-eslint/ban-ts-comment": "error",
|
|
26
|
+
/**
|
|
27
|
+
* Bans // tslint:<rule-flag> comments from being used π§
|
|
28
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-tslint-comment.md
|
|
29
|
+
*/
|
|
30
|
+
"@typescript-eslint/ban-tslint-comment": "off",
|
|
31
|
+
/**
|
|
32
|
+
* Bans specific types from being used β
π§
|
|
33
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md
|
|
34
|
+
* The default config you get if you enable this recommended rule without specifying your own
|
|
35
|
+
* should be reviewed.
|
|
36
|
+
*/
|
|
37
|
+
"@typescript-eslint/ban-types": "error",
|
|
38
|
+
/**
|
|
39
|
+
* Ensures that literals on classes are exposed in a consistent style π§
|
|
40
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/class-literal-property-style.md
|
|
41
|
+
*/
|
|
42
|
+
"@typescript-eslint/class-literal-property-style": ["error", "fields"],
|
|
43
|
+
/**
|
|
44
|
+
* Enforce or disallow the use of the record type π§
|
|
45
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md
|
|
46
|
+
*/
|
|
47
|
+
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
|
|
48
|
+
/**
|
|
49
|
+
* Enforces consistent usage of type assertions
|
|
50
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/consistent-type-assertions.md
|
|
51
|
+
*/
|
|
52
|
+
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
|
|
53
|
+
/**
|
|
54
|
+
* Consistent with type definition either `interface` or `type` π§
|
|
55
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/consistent-type-definitions.md
|
|
56
|
+
*/
|
|
57
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
58
|
+
/**
|
|
59
|
+
* Enforces consistent usage of type imports π§
|
|
60
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/consistent-type-imports.md
|
|
61
|
+
*/
|
|
62
|
+
"@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports" }],
|
|
63
|
+
/**
|
|
64
|
+
* Require explicit return types on functions and class methods
|
|
65
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
|
|
66
|
+
*/
|
|
67
|
+
"@typescript-eslint/explicit-function-return-type": "error",
|
|
68
|
+
/**
|
|
69
|
+
* Require explicit accessibility modifiers on class properties and methods π§
|
|
70
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md
|
|
71
|
+
*/
|
|
72
|
+
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
73
|
+
/**
|
|
74
|
+
* Require explicit return and argument types on exported
|
|
75
|
+
* functions' and classes' public class methods β
|
|
76
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
|
|
77
|
+
*/
|
|
78
|
+
"@typescript-eslint/explicit-module-boundary-types": "error",
|
|
79
|
+
/**
|
|
80
|
+
* Require a specific member delimiter style for interfaces and type literals π§
|
|
81
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md
|
|
82
|
+
*/
|
|
83
|
+
"@typescript-eslint/member-delimiter-style": "error",
|
|
84
|
+
/**
|
|
85
|
+
* Require a consistent member declaration order
|
|
86
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-ordering.md
|
|
87
|
+
*/
|
|
88
|
+
"@typescript-eslint/member-ordering": "error",
|
|
89
|
+
/**
|
|
90
|
+
* Enforces using a particular method signature syntax π§
|
|
91
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/method-signature-style.md
|
|
92
|
+
*/
|
|
93
|
+
"@typescript-eslint/method-signature-style": "error",
|
|
94
|
+
/**
|
|
95
|
+
* Enforces naming conventions for everything across a codebase π
|
|
96
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md
|
|
97
|
+
*/
|
|
98
|
+
"@typescript-eslint/naming-convention": "off",
|
|
99
|
+
/**
|
|
100
|
+
* Requires that `.toString()` is only called on objects
|
|
101
|
+
* which provide useful information when stringified π
|
|
102
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-base-to-string.md
|
|
103
|
+
*/
|
|
104
|
+
"@typescript-eslint/no-base-to-string": "error",
|
|
105
|
+
/**
|
|
106
|
+
* Disallow non-null assertion in locations that may be confusing π§
|
|
107
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
|
|
108
|
+
*/
|
|
109
|
+
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
110
|
+
/**
|
|
111
|
+
* Requires expressions of type void to appear in statement position π§ π
|
|
112
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md
|
|
113
|
+
*/
|
|
114
|
+
"@typescript-eslint/no-confusing-void-expression": [
|
|
115
|
+
"error",
|
|
116
|
+
{ "ignoreArrowShorthand": true }
|
|
117
|
+
],
|
|
118
|
+
/**
|
|
119
|
+
* Disallow the delete operator with computed key expressions π§
|
|
120
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dynamic-delete.md
|
|
121
|
+
*/
|
|
122
|
+
"@typescript-eslint/no-dynamic-delete": "error",
|
|
123
|
+
/**
|
|
124
|
+
* Disallow the declaration of empty interfaces β
π§
|
|
125
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-interface.md
|
|
126
|
+
*/
|
|
127
|
+
"@typescript-eslint/no-empty-interface": "error",
|
|
128
|
+
/**
|
|
129
|
+
* Disallow usage of the `any` type β
π§
|
|
130
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md
|
|
131
|
+
*/
|
|
132
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
133
|
+
/**
|
|
134
|
+
* Disallow extra non-null assertion β
π§
|
|
135
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
|
|
136
|
+
*/
|
|
137
|
+
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
138
|
+
/**
|
|
139
|
+
* Forbids the use of classes as namespaces
|
|
140
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extraneous-class.md
|
|
141
|
+
*/
|
|
142
|
+
"@typescript-eslint/no-extraneous-class": "error",
|
|
143
|
+
/**
|
|
144
|
+
* Requires Promise-like values to be handled appropriately β
π
|
|
145
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-floating-promises.md
|
|
146
|
+
*/
|
|
147
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
148
|
+
/**
|
|
149
|
+
* Disallow iterating over an array with a for-in loop β
π
|
|
150
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-for-in-array.md
|
|
151
|
+
*/
|
|
152
|
+
"@typescript-eslint/no-for-in-array": "error",
|
|
153
|
+
/**
|
|
154
|
+
* Disallow usage of the implicit `any` type in catch clauses π§
|
|
155
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md
|
|
156
|
+
*/
|
|
157
|
+
"@typescript-eslint/no-implicit-any-catch": "warn",
|
|
158
|
+
/**
|
|
159
|
+
* Disallows explicit type declarations for variables or
|
|
160
|
+
* parameters initialized to a number, string, or boolean β
π§
|
|
161
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md
|
|
162
|
+
*/
|
|
163
|
+
"@typescript-eslint/no-inferrable-types": "error",
|
|
164
|
+
/**
|
|
165
|
+
* Disallows usage of `void` type outside of generic or return types
|
|
166
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-invalid-void-type.md
|
|
167
|
+
*/
|
|
168
|
+
"@typescript-eslint/no-invalid-void-type": "warn",
|
|
169
|
+
/**
|
|
170
|
+
* Disallow the `void` operator except when used to discard a value π§ π
|
|
171
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md
|
|
172
|
+
*/
|
|
173
|
+
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
174
|
+
/**
|
|
175
|
+
* Enforce valid definition of `new` and `constructor` β
|
|
176
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-misused-new.md
|
|
177
|
+
*/
|
|
178
|
+
"@typescript-eslint/no-misused-new": "error",
|
|
179
|
+
/**
|
|
180
|
+
* Avoid using promises in places not designed to handle them β
π
|
|
181
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-misused-promises.md
|
|
182
|
+
*/
|
|
183
|
+
"@typescript-eslint/no-misused-promises": "error",
|
|
184
|
+
/**
|
|
185
|
+
* Disallow the use of custom TypeScript modules and namespaces β
|
|
186
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-namespace.md
|
|
187
|
+
*/
|
|
188
|
+
"@typescript-eslint/no-namespace": "error",
|
|
189
|
+
/**
|
|
190
|
+
* Disallows using a non-null assertion in the left operand of the nullish coalescing operator
|
|
191
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md
|
|
192
|
+
*/
|
|
193
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
194
|
+
/**
|
|
195
|
+
* Disallows using a non-null assertion after an optional chain expression β
|
|
196
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md
|
|
197
|
+
*/
|
|
198
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
199
|
+
/**
|
|
200
|
+
* Disallows non-null assertions using the `!` postfix operator β
|
|
201
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-assertion.md
|
|
202
|
+
*/
|
|
203
|
+
"@typescript-eslint/no-non-null-assertion": "error",
|
|
204
|
+
/**
|
|
205
|
+
* Disallow the use of parameter properties in class constructors
|
|
206
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-parameter-properties.md
|
|
207
|
+
*/
|
|
208
|
+
"@typescript-eslint/no-parameter-properties": "off",
|
|
209
|
+
/**
|
|
210
|
+
* Disallows invocation of `require()`
|
|
211
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-require-imports.md
|
|
212
|
+
*/
|
|
213
|
+
"@typescript-eslint/no-require-imports": "error",
|
|
214
|
+
/**
|
|
215
|
+
* Disallow aliasing `this` β
|
|
216
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-this-alias.md
|
|
217
|
+
*/
|
|
218
|
+
"@typescript-eslint/no-this-alias": "error",
|
|
219
|
+
/**
|
|
220
|
+
* Disallow the use of type aliases
|
|
221
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-type-alias.md
|
|
222
|
+
*/
|
|
223
|
+
"@typescript-eslint/no-type-alias": "off",
|
|
224
|
+
/**
|
|
225
|
+
* Flags unnecessary equality comparisons against boolean literals π§ π
|
|
226
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
|
|
227
|
+
*/
|
|
228
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
|
|
229
|
+
/**
|
|
230
|
+
* Prevents conditionals where the type is always truthy or always falsy π§ π
|
|
231
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md
|
|
232
|
+
*/
|
|
233
|
+
"@typescript-eslint/no-unnecessary-condition": "off",
|
|
234
|
+
/**
|
|
235
|
+
* Warns when a namespace qualifier is unnecessary π§ π
|
|
236
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md
|
|
237
|
+
*/
|
|
238
|
+
"@typescript-eslint/no-unnecessary-qualifier": "off",
|
|
239
|
+
/**
|
|
240
|
+
* Enforces that type arguments will not be used if not required π§ π
|
|
241
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md
|
|
242
|
+
*/
|
|
243
|
+
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
244
|
+
/**
|
|
245
|
+
* Warns if a type assertion does not change the type of an expression β
π§ π
|
|
246
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
|
|
247
|
+
*/
|
|
248
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
249
|
+
/**
|
|
250
|
+
* Disallows unnecessary constraints on generic types π§
|
|
251
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md
|
|
252
|
+
*/
|
|
253
|
+
"@typescript-eslint/no-unnecessary-type-constraint": "off",
|
|
254
|
+
/**
|
|
255
|
+
* Disallows calling an function with an `any` type value π
|
|
256
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-argument.md
|
|
257
|
+
*/
|
|
258
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
259
|
+
/**
|
|
260
|
+
* Disallows assigning `any` to variables and properties β
π
|
|
261
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md
|
|
262
|
+
*/
|
|
263
|
+
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
264
|
+
/**
|
|
265
|
+
* Disallows calling an `any` type value β
π
|
|
266
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-call.md
|
|
267
|
+
*/
|
|
268
|
+
"@typescript-eslint/no-unsafe-call": "error",
|
|
269
|
+
/**
|
|
270
|
+
* Disallows member access on `any` typed variables β
π
|
|
271
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md
|
|
272
|
+
*/
|
|
273
|
+
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
274
|
+
/**
|
|
275
|
+
* Disallows returning any from a function β
π
|
|
276
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-return.md
|
|
277
|
+
*/
|
|
278
|
+
"@typescript-eslint/no-unsafe-return": "error",
|
|
279
|
+
/**
|
|
280
|
+
* Disallows the use of require statements except in import statements β
|
|
281
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-var-requires.md
|
|
282
|
+
*/
|
|
283
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
284
|
+
/**
|
|
285
|
+
* Prefers a non-null assertion over explicit type cast when possible π§ π
|
|
286
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md
|
|
287
|
+
*/
|
|
288
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
289
|
+
/**
|
|
290
|
+
* Prefer usage of as const over literal type β
π§
|
|
291
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-as-const.md
|
|
292
|
+
*/
|
|
293
|
+
"@typescript-eslint/prefer-as-const": "error",
|
|
294
|
+
/**
|
|
295
|
+
* Prefer initializing each enums member value
|
|
296
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md
|
|
297
|
+
*/
|
|
298
|
+
"@typescript-eslint/prefer-enum-initializers": "off",
|
|
299
|
+
/**
|
|
300
|
+
* Prefer a βfor-ofβ loop over a standard βforβ loop if the
|
|
301
|
+
* index is only used to access the array being iterated
|
|
302
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-for-of.md
|
|
303
|
+
*/
|
|
304
|
+
"@typescript-eslint/prefer-for-of": "off",
|
|
305
|
+
/**
|
|
306
|
+
* Use function types instead of interfaces with call signatures π§
|
|
307
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-function-type.md
|
|
308
|
+
*/
|
|
309
|
+
"@typescript-eslint/prefer-function-type": "off",
|
|
310
|
+
/**
|
|
311
|
+
* Enforce includes method over indexOf method π§ π
|
|
312
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-includes.md
|
|
313
|
+
*/
|
|
314
|
+
"@typescript-eslint/prefer-includes": "off",
|
|
315
|
+
/**
|
|
316
|
+
* Require that all enum members be literal values to
|
|
317
|
+
* prevent unintended enum member name shadow issues
|
|
318
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md
|
|
319
|
+
*/
|
|
320
|
+
"@typescript-eslint/prefer-literal-enum-member": "off",
|
|
321
|
+
/**
|
|
322
|
+
* Require the use of the `namespace` keyword instead of the
|
|
323
|
+
* `module` keyword to declare custom TypeScript modules β
π§
|
|
324
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md
|
|
325
|
+
*/
|
|
326
|
+
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
327
|
+
/**
|
|
328
|
+
* Enforce the usage of the nullish coalescing operator instead of logical chaining π
|
|
329
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md
|
|
330
|
+
*/
|
|
331
|
+
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
332
|
+
/**
|
|
333
|
+
* Prefer using concise optional chain expressions instead of chained logical ands
|
|
334
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-optional-chain.md
|
|
335
|
+
*/
|
|
336
|
+
"@typescript-eslint/prefer-optional-chain": "off",
|
|
337
|
+
/**
|
|
338
|
+
* Requires that private members are marked as `readonly` if
|
|
339
|
+
* they're never modified outside of the constructor π§ π
|
|
340
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-readonly.md
|
|
341
|
+
*/
|
|
342
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
343
|
+
/**
|
|
344
|
+
* Requires that function parameters are typed as `readonly`
|
|
345
|
+
* to prevent accidental mutation of inputs π
|
|
346
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md
|
|
347
|
+
*/
|
|
348
|
+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
349
|
+
/**
|
|
350
|
+
* Prefer using type parameter when calling `Array#reduce` instead of casting π§ π
|
|
351
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md
|
|
352
|
+
*/
|
|
353
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
|
354
|
+
/**
|
|
355
|
+
* Enforce that `RegExp#exec` is used instead of `String#match`
|
|
356
|
+
* if no global flag is provided β
π§ π
|
|
357
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md
|
|
358
|
+
*/
|
|
359
|
+
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
360
|
+
/**
|
|
361
|
+
* Enforce that `this` is used when only `this` type is returned π§ π
|
|
362
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-return-this-type.md
|
|
363
|
+
*/
|
|
364
|
+
"@typescript-eslint/prefer-return-this-type": "off",
|
|
365
|
+
/**
|
|
366
|
+
* Enforce the use of `String#startsWith` and `String#endsWith` instead
|
|
367
|
+
* of other equivalent methods of checking substrings π§ π
|
|
368
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md
|
|
369
|
+
*/
|
|
370
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "off",
|
|
371
|
+
/**
|
|
372
|
+
* Recommends using `@ts-expect-error` over `@ts-ignore` π§
|
|
373
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md
|
|
374
|
+
*/
|
|
375
|
+
"@typescript-eslint/prefer-ts-expect-error": "off",
|
|
376
|
+
/**
|
|
377
|
+
* Requires any function or method that returns a Promise to be marked async π§ π
|
|
378
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/promise-function-async.md
|
|
379
|
+
*/
|
|
380
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
381
|
+
/**
|
|
382
|
+
* Requires `Array#sort` calls to always provide a `compareFunction` π
|
|
383
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-array-sort-compare.md
|
|
384
|
+
*/
|
|
385
|
+
"@typescript-eslint/require-array-sort-compare": "off",
|
|
386
|
+
/**
|
|
387
|
+
* When adding two variables, operands must both be of type number or of type string β
π
|
|
388
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/restrict-plus-operands.md
|
|
389
|
+
*/
|
|
390
|
+
"@typescript-eslint/restrict-plus-operands": "error",
|
|
391
|
+
/**
|
|
392
|
+
* Enforce template literal expressions to be of string type β
π
|
|
393
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/restrict-template-expressions.md
|
|
394
|
+
*/
|
|
395
|
+
"@typescript-eslint/restrict-template-expressions": "error",
|
|
396
|
+
/**
|
|
397
|
+
* Enforces that members of a type union/intersection are sorted alphabetically π§
|
|
398
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md
|
|
399
|
+
*/
|
|
400
|
+
"@typescript-eslint/sort-type-union-intersection-members": "off",
|
|
401
|
+
/**
|
|
402
|
+
* Restricts the types allowed in boolean expressions π§ π
|
|
403
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
|
|
404
|
+
*/
|
|
405
|
+
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
406
|
+
/**
|
|
407
|
+
* Exhaustiveness checking in switch with union type π
|
|
408
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md
|
|
409
|
+
*/
|
|
410
|
+
"@typescript-eslint/switch-exhaustiveness-check": "off",
|
|
411
|
+
/**
|
|
412
|
+
* Sets preference level for triple slash directives versus ES6-style import declarations β
|
|
413
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/triple-slash-reference.md
|
|
414
|
+
*/
|
|
415
|
+
"@typescript-eslint/triple-slash-reference": "error",
|
|
416
|
+
/**
|
|
417
|
+
* Require consistent spacing around type annotations π§
|
|
418
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/type-annotation-spacing.md
|
|
419
|
+
*/
|
|
420
|
+
"@typescript-eslint/type-annotation-spacing": "off",
|
|
421
|
+
/**
|
|
422
|
+
* Requires type annotations to exist
|
|
423
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/typedef.md
|
|
424
|
+
*/
|
|
425
|
+
"@typescript-eslint/typedef": "off",
|
|
426
|
+
/**
|
|
427
|
+
* Enforces unbound methods are called with their expected scope β
π
|
|
428
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/unbound-method.md
|
|
429
|
+
*/
|
|
430
|
+
"@typescript-eslint/unbound-method": "off",
|
|
431
|
+
/**
|
|
432
|
+
* Warns for any two overloads that could be unified into
|
|
433
|
+
* one by using a union or an optional/rest parameter
|
|
434
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/unified-signatures.md
|
|
435
|
+
*/
|
|
436
|
+
"@typescript-eslint/unified-signatures": "off",
|
|
256
437
|
};
|