UNPKG

13.5 kBTypeScriptView Raw
1import { Linter } from "../index";
2
3export interface PossibleErrors extends Linter.RulesRecord {
4 /**
5 * Rule to enforce `for` loop update clause moving the counter in the right direction.
6 *
7 * @remarks
8 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
9 *
10 * @since 4.0.0-beta.0
11 * @see https://eslint.org/docs/rules/for-direction
12 */
13 "for-direction": Linter.RuleEntry<[]>;
14
15 /**
16 * Rule to enforce `return` statements in getters.
17 *
18 * @remarks
19 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
20 *
21 * @since 4.2.0
22 * @see https://eslint.org/docs/rules/getter-return
23 */
24 "getter-return": Linter.RuleEntry<
25 [
26 Partial<{
27 /**
28 * @default false
29 */
30 allowImplicit: boolean;
31 }>,
32 ]
33 >;
34
35 /**
36 * Rule to disallow using an async function as a `Promise` executor.
37 *
38 * @remarks
39 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
40 *
41 * @since 5.3.0
42 * @see https://eslint.org/docs/rules/no-async-promise-executor
43 */
44 "no-async-promise-executor": Linter.RuleEntry<[]>;
45
46 /**
47 * Rule to disallow `await` inside of loops.
48 *
49 * @since 3.12.0
50 * @see https://eslint.org/docs/rules/no-await-in-loop
51 */
52 "no-await-in-loop": Linter.RuleEntry<[]>;
53
54 /**
55 * Rule to disallow comparing against `-0`.
56 *
57 * @remarks
58 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
59 *
60 * @since 3.17.0
61 * @see https://eslint.org/docs/rules/no-compare-neg-zero
62 */
63 "no-compare-neg-zero": Linter.RuleEntry<[]>;
64
65 /**
66 * Rule to disallow assignment operators in conditional statements.
67 *
68 * @remarks
69 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
70 *
71 * @since 0.0.9
72 * @see https://eslint.org/docs/rules/no-cond-assign
73 */
74 "no-cond-assign": Linter.RuleEntry<["except-parens" | "always"]>;
75
76 /**
77 * Rule to disallow the use of `console`.
78 *
79 * @since 0.0.2
80 * @see https://eslint.org/docs/rules/no-console
81 */
82 "no-console": Linter.RuleEntry<
83 [
84 Partial<{
85 allow: Array<keyof Console>;
86 }>,
87 ]
88 >;
89
90 /**
91 * Rule to disallow constant expressions in conditions.
92 *
93 * @remarks
94 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
95 *
96 * @since 0.4.1
97 * @see https://eslint.org/docs/rules/no-constant-condition
98 */
99 "no-constant-condition": Linter.RuleEntry<
100 [
101 {
102 /**
103 * @default true
104 */
105 checkLoops: boolean;
106 },
107 ]
108 >;
109
110 /**
111 * Rule to disallow control characters in regular expressions.
112 *
113 * @remarks
114 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
115 *
116 * @since 0.1.0
117 * @see https://eslint.org/docs/rules/no-control-regex
118 */
119 "no-control-regex": Linter.RuleEntry<[]>;
120
121 /**
122 * Rule to disallow the use of `debugger`.
123 *
124 * @remarks
125 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
126 *
127 * @since 0.0.2
128 * @see https://eslint.org/docs/rules/no-debugger
129 */
130 "no-debugger": Linter.RuleEntry<[]>;
131
132 /**
133 * Rule to disallow duplicate arguments in `function` definitions.
134 *
135 * @remarks
136 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
137 *
138 * @since 0.16.0
139 * @see https://eslint.org/docs/rules/no-dupe-args
140 */
141 "no-dupe-args": Linter.RuleEntry<[]>;
142
143 /**
144 * Rule to disallow duplicate keys in object literals.
145 *
146 * @remarks
147 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
148 *
149 * @since 0.0.9
150 * @see https://eslint.org/docs/rules/no-dupe-keys
151 */
152 "no-dupe-keys": Linter.RuleEntry<[]>;
153
154 /**
155 * Rule to disallow a duplicate case label.
156 *
157 * @remarks
158 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
159 *
160 * @since 0.17.0
161 * @see https://eslint.org/docs/rules/no-duplicate-case
162 */
163 "no-duplicate-case": Linter.RuleEntry<[]>;
164
165 /**
166 * Rule to disallow empty block statements.
167 *
168 * @remarks
169 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
170 *
171 * @since 0.0.2
172 * @see https://eslint.org/docs/rules/no-empty
173 */
174 "no-empty": Linter.RuleEntry<
175 [
176 Partial<{
177 /**
178 * @default false
179 */
180 allowEmptyCatch: boolean;
181 }>,
182 ]
183 >;
184
185 /**
186 * Rule to disallow empty character classes in regular expressions.
187 *
188 * @remarks
189 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
190 *
191 * @since 0.22.0
192 * @see https://eslint.org/docs/rules/no-empty-character-class
193 */
194 "no-empty-character-class": Linter.RuleEntry<[]>;
195
196 /**
197 * Rule to disallow reassigning exceptions in `catch` clauses.
198 *
199 * @remarks
200 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
201 *
202 * @since 0.0.9
203 * @see https://eslint.org/docs/rules/no-ex-assign
204 */
205 "no-ex-assign": Linter.RuleEntry<[]>;
206
207 /**
208 * Rule to disallow unnecessary boolean casts.
209 *
210 * @remarks
211 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
212 *
213 * @since 0.4.0
214 * @see https://eslint.org/docs/rules/no-extra-boolean-cast
215 */
216 "no-extra-boolean-cast": Linter.RuleEntry<[]>;
217
218 /**
219 * Rule to disallow unnecessary parentheses.
220 *
221 * @since 0.1.4
222 * @see https://eslint.org/docs/rules/no-extra-parens
223 */
224 "no-extra-parens":
225 | Linter.RuleEntry<
226 [
227 "all",
228 Partial<{
229 /**
230 * @default true,
231 */
232 conditionalAssign: boolean;
233 /**
234 * @default true
235 */
236 returnAssign: boolean;
237 /**
238 * @default true
239 */
240 nestedBinaryExpressions: boolean;
241 /**
242 * @default 'none'
243 */
244 ignoreJSX: "none" | "all" | "multi-line" | "single-line";
245 /**
246 * @default true
247 */
248 enforceForArrowConditionals: boolean;
249 }>,
250 ]
251 >
252 | Linter.RuleEntry<["functions"]>;
253
254 /**
255 * Rule to disallow unnecessary semicolons.
256 *
257 * @remarks
258 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
259 *
260 * @since 0.0.9
261 * @see https://eslint.org/docs/rules/no-extra-semi
262 */
263 "no-extra-semi": Linter.RuleEntry<[]>;
264
265 /**
266 * Rule to disallow reassigning `function` declarations.
267 *
268 * @remarks
269 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
270 *
271 * @since 0.0.9
272 * @see https://eslint.org/docs/rules/no-func-assign
273 */
274 "no-func-assign": Linter.RuleEntry<[]>;
275
276 /**
277 * Rule to disallow variable or `function` declarations in nested blocks.
278 *
279 * @remarks
280 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
281 *
282 * @since 0.6.0
283 * @see https://eslint.org/docs/rules/no-inner-declarations
284 */
285 "no-inner-declarations": Linter.RuleEntry<["functions" | "both"]>;
286
287 /**
288 * Rule to disallow invalid regular expression strings in `RegExp` constructors.
289 *
290 * @remarks
291 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
292 *
293 * @since 0.1.4
294 * @see https://eslint.org/docs/rules/no-invalid-regexp
295 */
296 "no-invalid-regexp": Linter.RuleEntry<
297 [
298 Partial<{
299 allowConstructorFlags: string[];
300 }>,
301 ]
302 >;
303
304 /**
305 * Rule to disallow irregular whitespace.
306 *
307 * @remarks
308 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
309 *
310 * @since 0.9.0
311 * @see https://eslint.org/docs/rules/no-irregular-whitespace
312 */
313 "no-irregular-whitespace": Linter.RuleEntry<
314 [
315 Partial<{
316 /**
317 * @default true
318 */
319 skipStrings: boolean;
320 /**
321 * @default false
322 */
323 skipComments: boolean;
324 /**
325 * @default false
326 */
327 skipRegExps: boolean;
328 /**
329 * @default false
330 */
331 skipTemplates: boolean;
332 }>,
333 ]
334 >;
335
336 /**
337 * Rule to disallow characters which are made with multiple code points in character class syntax.
338 *
339 * @remarks
340 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
341 *
342 * @since 5.3.0
343 * @see https://eslint.org/docs/rules/no-misleading-character-class
344 */
345 "no-misleading-character-class": Linter.RuleEntry<[]>;
346
347 /**
348 * Rule to disallow calling global object properties as functions.
349 *
350 * @remarks
351 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
352 *
353 * @since 0.0.9
354 * @see https://eslint.org/docs/rules/no-obj-calls
355 */
356 "no-obj-calls": Linter.RuleEntry<[]>;
357
358 /**
359 * Rule to disallow use of `Object.prototypes` builtins directly.
360 *
361 * @remarks
362 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
363 *
364 * @since 2.11.0
365 * @see https://eslint.org/docs/rules/no-prototype-builtins
366 */
367 "no-prototype-builtins": Linter.RuleEntry<[]>;
368
369 /**
370 * Rule to disallow multiple spaces in regular expressions.
371 *
372 * @remarks
373 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
374 *
375 * @since 0.4.0
376 * @see https://eslint.org/docs/rules/no-regex-spaces
377 */
378 "no-regex-spaces": Linter.RuleEntry<[]>;
379
380 /**
381 * Rule to disallow sparse arrays.
382 *
383 * @remarks
384 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
385 *
386 * @since 0.4.0
387 * @see https://eslint.org/docs/rules/no-sparse-arrays
388 */
389 "no-sparse-arrays": Linter.RuleEntry<[]>;
390
391 /**
392 * Rule to disallow template literal placeholder syntax in regular strings.
393 *
394 * @since 3.3.0
395 * @see https://eslint.org/docs/rules/no-template-curly-in-string
396 */
397 "no-template-curly-in-string": Linter.RuleEntry<[]>;
398
399 /**
400 * Rule to disallow confusing multiline expressions.
401 *
402 * @remarks
403 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
404 *
405 * @since 0.24.0
406 * @see https://eslint.org/docs/rules/no-unexpected-multiline
407 */
408 "no-unexpected-multiline": Linter.RuleEntry<[]>;
409
410 /**
411 * Rule to disallow unreachable code after `return`, `throw`, `continue`, and `break` statements.
412 *
413 * @remarks
414 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
415 *
416 * @since 0.0.6
417 * @see https://eslint.org/docs/rules/no-unreachable
418 */
419 "no-unreachable": Linter.RuleEntry<[]>;
420
421 /**
422 * Rule to disallow control flow statements in `finally` blocks.
423 *
424 * @remarks
425 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
426 *
427 * @since 2.9.0
428 * @see https://eslint.org/docs/rules/no-unsafe-finally
429 */
430 "no-unsafe-finally": Linter.RuleEntry<[]>;
431
432 /**
433 * Rule to disallow negating the left operand of relational operators.
434 *
435 * @remarks
436 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
437 *
438 * @since 3.3.0
439 * @see https://eslint.org/docs/rules/no-unsafe-negation
440 */
441 "no-unsafe-negation": Linter.RuleEntry<[]>;
442
443 /**
444 * Rule to disallow assignments that can lead to race conditions due to usage of `await` or `yield`.
445 *
446 * @remarks
447 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
448 *
449 * @since 5.3.0
450 * @see https://eslint.org/docs/rules/require-atomic-updates
451 */
452 "require-atomic-updates": Linter.RuleEntry<[]>;
453
454 /**
455 * Rule to require calls to `isNaN()` when checking for `NaN`.
456 *
457 * @remarks
458 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
459 *
460 * @since 0.0.6
461 * @see https://eslint.org/docs/rules/use-isnan
462 */
463 "use-isnan": Linter.RuleEntry<[]>;
464
465 /**
466 * Rule to enforce comparing `typeof` expressions against valid strings.
467 *
468 * @remarks
469 * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
470 *
471 * @since 0.5.0
472 * @see https://eslint.org/docs/rules/valid-typeof
473 */
474 "valid-typeof": Linter.RuleEntry<
475 [
476 Partial<{
477 /**
478 * @default false
479 */
480 requireStringLiterals: boolean;
481 }>,
482 ]
483 >;
484}