possible-errors.d.ts
12.6 KB
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
import { Linter } from '../index';
export interface PossibleErrors extends Linter.RulesRecord {
/**
* Rule to enforce `for` loop update clause moving the counter in the right direction.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 4.0.0-beta.0
* @see https://eslint.org/docs/rules/for-direction
*/
'for-direction': Linter.RuleEntry<[]>;
/**
* Rule to enforce `return` statements in getters.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 4.2.0
* @see https://eslint.org/docs/rules/getter-return
*/
'getter-return': Linter.RuleEntry<[
Partial<{
/**
* @default false
*/
allowImplicit: boolean;
}>
]>;
/**
* Rule to disallow using an async function as a `Promise` executor.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 5.3.0
* @see https://eslint.org/docs/rules/no-async-promise-executor
*/
'no-async-promise-executor': Linter.RuleEntry<[]>;
/**
* Rule to disallow `await` inside of loops.
*
* @since 3.12.0
* @see https://eslint.org/docs/rules/no-await-in-loop
*/
'no-await-in-loop': Linter.RuleEntry<[]>;
/**
* Rule to disallow comparing against `-0`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 3.17.0
* @see https://eslint.org/docs/rules/no-compare-neg-zero
*/
'no-compare-neg-zero': Linter.RuleEntry<[]>;
/**
* Rule to disallow assignment operators in conditional statements.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-cond-assign
*/
'no-cond-assign': Linter.RuleEntry<[
'except-parens' | 'always'
]>;
/**
* Rule to disallow the use of `console`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/no-console
*/
'no-console': Linter.RuleEntry<[
Partial<{
allow: Array<keyof Console>;
}>
]>;
/**
* Rule to disallow constant expressions in conditions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.4.1
* @see https://eslint.org/docs/rules/no-constant-condition
*/
'no-constant-condition': Linter.RuleEntry<[
{
/**
* @default true
*/
checkLoops: boolean;
}
]>;
/**
* Rule to disallow control characters in regular expressions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.1.0
* @see https://eslint.org/docs/rules/no-control-regex
*/
'no-control-regex': Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `debugger`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/no-debugger
*/
'no-debugger': Linter.RuleEntry<[]>;
/**
* Rule to disallow duplicate arguments in `function` definitions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.16.0
* @see https://eslint.org/docs/rules/no-dupe-args
*/
'no-dupe-args': Linter.RuleEntry<[]>;
/**
* Rule to disallow duplicate keys in object literals.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-dupe-keys
*/
'no-dupe-keys': Linter.RuleEntry<[]>;
/**
* Rule to disallow a duplicate case label.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.17.0
* @see https://eslint.org/docs/rules/no-duplicate-case
*/
'no-duplicate-case': Linter.RuleEntry<[]>;
/**
* Rule to disallow empty block statements.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.2
* @see https://eslint.org/docs/rules/no-empty
*/
'no-empty': Linter.RuleEntry<[
Partial<{
/**
* @default false
*/
allowEmptyCatch: boolean;
}>
]>;
/**
* Rule to disallow empty character classes in regular expressions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.22.0
* @see https://eslint.org/docs/rules/no-empty-character-class
*/
'no-empty-character-class': Linter.RuleEntry<[]>;
/**
* Rule to disallow reassigning exceptions in `catch` clauses.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-ex-assign
*/
'no-ex-assign': Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary boolean casts.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-extra-boolean-cast
*/
'no-extra-boolean-cast': Linter.RuleEntry<[]>;
/**
* Rule to disallow unnecessary parentheses.
*
* @since 0.1.4
* @see https://eslint.org/docs/rules/no-extra-parens
*/
'no-extra-parens': Linter.RuleEntry<[
'all',
Partial<{
/**
* @default true,
*/
conditionalAssign: boolean;
/**
* @default true
*/
returnAssign: boolean;
/**
* @default true
*/
nestedBinaryExpressions: boolean;
/**
* @default 'none'
*/
ignoreJSX: 'none' | 'all' | 'multi-line' | 'single-line';
/**
* @default true
*/
enforceForArrowConditionals: boolean;
}>
]> | Linter.RuleEntry<[
'functions'
]>;
/**
* Rule to disallow unnecessary semicolons.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-extra-semi
*/
'no-extra-semi': Linter.RuleEntry<[]>;
/**
* Rule to disallow reassigning `function` declarations.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-func-assign
*/
'no-func-assign': Linter.RuleEntry<[]>;
/**
* Rule to disallow variable or `function` declarations in nested blocks.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.6.0
* @see https://eslint.org/docs/rules/no-inner-declarations
*/
'no-inner-declarations': Linter.RuleEntry<[
'functions' | 'both'
]>;
/**
* Rule to disallow invalid regular expression strings in `RegExp` constructors.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.1.4
* @see https://eslint.org/docs/rules/no-invalid-regexp
*/
'no-invalid-regexp': Linter.RuleEntry<[
Partial<{
allowConstructorFlags: string[];
}>
]>;
/**
* Rule to disallow irregular whitespace.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.9.0
* @see https://eslint.org/docs/rules/no-irregular-whitespace
*/
'no-irregular-whitespace': Linter.RuleEntry<[
Partial<{
/**
* @default true
*/
skipStrings: boolean;
/**
* @default false
*/
skipComments: boolean;
/**
* @default false
*/
skipRegExps: boolean;
/**
* @default false
*/
skipTemplates: boolean;
}>
]>;
/**
* Rule to disallow characters which are made with multiple code points in character class syntax.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 5.3.0
* @see https://eslint.org/docs/rules/no-misleading-character-class
*/
'no-misleading-character-class': Linter.RuleEntry<[]>;
/**
* Rule to disallow calling global object properties as functions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-obj-calls
*/
'no-obj-calls': Linter.RuleEntry<[]>;
/**
* Rule to disallow use of `Object.prototypes` builtins directly.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 2.11.0
* @see https://eslint.org/docs/rules/no-prototype-builtins
*/
'no-prototype-builtins': Linter.RuleEntry<[]>;
/**
* Rule to disallow multiple spaces in regular expressions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-regex-spaces
*/
'no-regex-spaces': Linter.RuleEntry<[]>;
/**
* Rule to disallow sparse arrays.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.4.0
* @see https://eslint.org/docs/rules/no-sparse-arrays
*/
'no-sparse-arrays': Linter.RuleEntry<[]>;
/**
* Rule to disallow template literal placeholder syntax in regular strings.
*
* @since 3.3.0
* @see https://eslint.org/docs/rules/no-template-curly-in-string
*/
'no-template-curly-in-string': Linter.RuleEntry<[]>;
/**
* Rule to disallow confusing multiline expressions.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.24.0
* @see https://eslint.org/docs/rules/no-unexpected-multiline
*/
'no-unexpected-multiline': Linter.RuleEntry<[]>;
/**
* Rule to disallow unreachable code after `return`, `throw`, `continue`, and `break` statements.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/no-unreachable
*/
'no-unreachable': Linter.RuleEntry<[]>;
/**
* Rule to disallow control flow statements in `finally` blocks.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 2.9.0
* @see https://eslint.org/docs/rules/no-unsafe-finally
*/
'no-unsafe-finally': Linter.RuleEntry<[]>;
/**
* Rule to disallow negating the left operand of relational operators.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 3.3.0
* @see https://eslint.org/docs/rules/no-unsafe-negation
*/
'no-unsafe-negation': Linter.RuleEntry<[]>;
/**
* Rule to disallow assignments that can lead to race conditions due to usage of `await` or `yield`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 5.3.0
* @see https://eslint.org/docs/rules/require-atomic-updates
*/
'require-atomic-updates': Linter.RuleEntry<[]>;
/**
* Rule to require calls to `isNaN()` when checking for `NaN`.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/use-isnan
*/
'use-isnan': Linter.RuleEntry<[]>;
/**
* Rule to enforce comparing `typeof` expressions against valid strings.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.5.0
* @see https://eslint.org/docs/rules/valid-typeof
*/
'valid-typeof': Linter.RuleEntry<[
Partial<{
/**
* @default false
*/
requireStringLiterals: boolean;
}>
]>;
}