1 | import { Linter } from "../index";
|
---|
2 |
|
---|
3 | export interface StylisticIssues extends Linter.RulesRecord {
|
---|
4 | /**
|
---|
5 | * Rule to enforce linebreaks after opening and before closing array brackets.
|
---|
6 | *
|
---|
7 | * @since 4.0.0-alpha.1
|
---|
8 | * @see https://eslint.org/docs/rules/array-bracket-newline
|
---|
9 | */
|
---|
10 | "array-bracket-newline": Linter.RuleEntry<
|
---|
11 | [
|
---|
12 | | "always"
|
---|
13 | | "never"
|
---|
14 | | "consistent"
|
---|
15 | | Partial<{
|
---|
16 | /**
|
---|
17 | * @default true
|
---|
18 | */
|
---|
19 | multiline: boolean;
|
---|
20 | /**
|
---|
21 | * @default null
|
---|
22 | */
|
---|
23 | minItems: number | null;
|
---|
24 | }>,
|
---|
25 | ]
|
---|
26 | >;
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * Rule to enforce consistent spacing inside array brackets.
|
---|
30 | *
|
---|
31 | * @since 0.24.0
|
---|
32 | * @see https://eslint.org/docs/rules/array-bracket-spacing
|
---|
33 | */
|
---|
34 | "array-bracket-spacing":
|
---|
35 | | Linter.RuleEntry<
|
---|
36 | [
|
---|
37 | "never",
|
---|
38 | Partial<{
|
---|
39 | /**
|
---|
40 | * @default false
|
---|
41 | */
|
---|
42 | singleValue: boolean;
|
---|
43 | /**
|
---|
44 | * @default false
|
---|
45 | */
|
---|
46 | objectsInArrays: boolean;
|
---|
47 | /**
|
---|
48 | * @default false
|
---|
49 | */
|
---|
50 | arraysInArrays: boolean;
|
---|
51 | }>,
|
---|
52 | ]
|
---|
53 | >
|
---|
54 | | Linter.RuleEntry<
|
---|
55 | [
|
---|
56 | "always",
|
---|
57 | Partial<{
|
---|
58 | /**
|
---|
59 | * @default true
|
---|
60 | */
|
---|
61 | singleValue: boolean;
|
---|
62 | /**
|
---|
63 | * @default true
|
---|
64 | */
|
---|
65 | objectsInArrays: boolean;
|
---|
66 | /**
|
---|
67 | * @default true
|
---|
68 | */
|
---|
69 | arraysInArrays: boolean;
|
---|
70 | }>,
|
---|
71 | ]
|
---|
72 | >;
|
---|
73 |
|
---|
74 | /**
|
---|
75 | * Rule to enforce line breaks after each array element.
|
---|
76 | *
|
---|
77 | * @since 4.0.0-rc.0
|
---|
78 | * @see https://eslint.org/docs/rules/array-element-newline
|
---|
79 | */
|
---|
80 | "array-element-newline": Linter.RuleEntry<
|
---|
81 | [
|
---|
82 | | "always"
|
---|
83 | | "never"
|
---|
84 | | "consistent"
|
---|
85 | | Partial<{
|
---|
86 | /**
|
---|
87 | * @default true
|
---|
88 | */
|
---|
89 | multiline: boolean;
|
---|
90 | /**
|
---|
91 | * @default null
|
---|
92 | */
|
---|
93 | minItems: number | null;
|
---|
94 | }>,
|
---|
95 | ]
|
---|
96 | >;
|
---|
97 |
|
---|
98 | /**
|
---|
99 | * Rule to disallow or enforce spaces inside of blocks after opening block and before closing block.
|
---|
100 | *
|
---|
101 | * @since 1.2.0
|
---|
102 | * @see https://eslint.org/docs/rules/block-spacing
|
---|
103 | */
|
---|
104 | "block-spacing": Linter.RuleEntry<["always" | "never"]>;
|
---|
105 |
|
---|
106 | /**
|
---|
107 | * Rule to enforce consistent brace style for blocks.
|
---|
108 | *
|
---|
109 | * @since 0.0.7
|
---|
110 | * @see https://eslint.org/docs/rules/brace-style
|
---|
111 | */
|
---|
112 | "brace-style": Linter.RuleEntry<
|
---|
113 | [
|
---|
114 | "1tbs" | "stroustrup" | "allman",
|
---|
115 | Partial<{
|
---|
116 | /**
|
---|
117 | * @default false
|
---|
118 | */
|
---|
119 | allowSingleLine: boolean;
|
---|
120 | }>,
|
---|
121 | ]
|
---|
122 | >;
|
---|
123 |
|
---|
124 | /**
|
---|
125 | * Rule to enforce camelcase naming convention.
|
---|
126 | *
|
---|
127 | * @since 0.0.2
|
---|
128 | * @see https://eslint.org/docs/rules/camelcase
|
---|
129 | */
|
---|
130 | camelcase: Linter.RuleEntry<
|
---|
131 | [
|
---|
132 | Partial<{
|
---|
133 | /**
|
---|
134 | * @default 'always'
|
---|
135 | */
|
---|
136 | properties: "always" | "never";
|
---|
137 | /**
|
---|
138 | * @default false
|
---|
139 | */
|
---|
140 | ignoreDestructuring: boolean;
|
---|
141 | /**
|
---|
142 | * @remarks
|
---|
143 | * Also accept for regular expression patterns
|
---|
144 | */
|
---|
145 | allow: string[];
|
---|
146 | }>,
|
---|
147 | ]
|
---|
148 | >;
|
---|
149 |
|
---|
150 | /**
|
---|
151 | * Rule to enforce or disallow capitalization of the first letter of a comment.
|
---|
152 | *
|
---|
153 | * @since 3.11.0
|
---|
154 | * @see https://eslint.org/docs/rules/capitalized-comments
|
---|
155 | */
|
---|
156 | "capitalized-comments": Linter.RuleEntry<
|
---|
157 | [
|
---|
158 | "always" | "never",
|
---|
159 | Partial<{
|
---|
160 | ignorePattern: string;
|
---|
161 | /**
|
---|
162 | * @default false
|
---|
163 | */
|
---|
164 | ignoreInlineComments: boolean;
|
---|
165 | /**
|
---|
166 | * @default false
|
---|
167 | */
|
---|
168 | ignoreConsecutiveComments: boolean;
|
---|
169 | }>,
|
---|
170 | ]
|
---|
171 | >;
|
---|
172 |
|
---|
173 | /**
|
---|
174 | * Rule to require or disallow trailing commas.
|
---|
175 | *
|
---|
176 | * @since 0.16.0
|
---|
177 | * @see https://eslint.org/docs/rules/comma-dangle
|
---|
178 | */
|
---|
179 | "comma-dangle": Linter.RuleEntry<
|
---|
180 | [
|
---|
181 | | "never"
|
---|
182 | | "always"
|
---|
183 | | "always-multiline"
|
---|
184 | | "only-multiline"
|
---|
185 | | Partial<{
|
---|
186 | /**
|
---|
187 | * @default 'never'
|
---|
188 | */
|
---|
189 | arrays: "never" | "always" | "always-multiline" | "only-multiline";
|
---|
190 | /**
|
---|
191 | * @default 'never'
|
---|
192 | */
|
---|
193 | objects: "never" | "always" | "always-multiline" | "only-multiline";
|
---|
194 | /**
|
---|
195 | * @default 'never'
|
---|
196 | */
|
---|
197 | imports: "never" | "always" | "always-multiline" | "only-multiline";
|
---|
198 | /**
|
---|
199 | * @default 'never'
|
---|
200 | */
|
---|
201 | exports: "never" | "always" | "always-multiline" | "only-multiline";
|
---|
202 | /**
|
---|
203 | * @default 'never'
|
---|
204 | */
|
---|
205 | functions: "never" | "always" | "always-multiline" | "only-multiline";
|
---|
206 | }>,
|
---|
207 | ]
|
---|
208 | >;
|
---|
209 |
|
---|
210 | /**
|
---|
211 | * Rule to enforce consistent spacing before and after commas.
|
---|
212 | *
|
---|
213 | * @since 0.9.0
|
---|
214 | * @see https://eslint.org/docs/rules/comma-spacing
|
---|
215 | */
|
---|
216 | "comma-spacing": Linter.RuleEntry<
|
---|
217 | [
|
---|
218 | Partial<{
|
---|
219 | /**
|
---|
220 | * @default false
|
---|
221 | */
|
---|
222 | before: boolean;
|
---|
223 | /**
|
---|
224 | * @default true
|
---|
225 | */
|
---|
226 | after: boolean;
|
---|
227 | }>,
|
---|
228 | ]
|
---|
229 | >;
|
---|
230 |
|
---|
231 | /**
|
---|
232 | * Rule to enforce consistent comma style.
|
---|
233 | *
|
---|
234 | * @since 0.9.0
|
---|
235 | * @see https://eslint.org/docs/rules/comma-style
|
---|
236 | */
|
---|
237 | "comma-style": Linter.RuleEntry<
|
---|
238 | [
|
---|
239 | "last" | "first",
|
---|
240 | Partial<{
|
---|
241 | exceptions: Record<string, boolean>;
|
---|
242 | }>,
|
---|
243 | ]
|
---|
244 | >;
|
---|
245 |
|
---|
246 | /**
|
---|
247 | * Rule to enforce consistent spacing inside computed property brackets.
|
---|
248 | *
|
---|
249 | * @since 0.23.0
|
---|
250 | * @see https://eslint.org/docs/rules/computed-property-spacing
|
---|
251 | */
|
---|
252 | "computed-property-spacing": Linter.RuleEntry<["never" | "always"]>;
|
---|
253 |
|
---|
254 | /**
|
---|
255 | * Rule to enforce consistent naming when capturing the current execution context.
|
---|
256 | *
|
---|
257 | * @since 0.0.9
|
---|
258 | * @see https://eslint.org/docs/rules/consistent-this
|
---|
259 | */
|
---|
260 | "consistent-this": Linter.RuleEntry<[...string[]]>;
|
---|
261 |
|
---|
262 | /**
|
---|
263 | * Rule to require or disallow newline at the end of files.
|
---|
264 | *
|
---|
265 | * @since 0.7.1
|
---|
266 | * @see https://eslint.org/docs/rules/eol-last
|
---|
267 | */
|
---|
268 | "eol-last": Linter.RuleEntry<
|
---|
269 | [
|
---|
270 | "always" | "never", // | 'unix' | 'windows'
|
---|
271 | ]
|
---|
272 | >;
|
---|
273 |
|
---|
274 | /**
|
---|
275 | * Rule to require or disallow spacing between function identifiers and their invocations.
|
---|
276 | *
|
---|
277 | * @since 3.3.0
|
---|
278 | * @see https://eslint.org/docs/rules/func-call-spacing
|
---|
279 | */
|
---|
280 | "func-call-spacing": Linter.RuleEntry<["never" | "always"]>;
|
---|
281 |
|
---|
282 | /**
|
---|
283 | * Rule to require function names to match the name of the variable or property to which they are assigned.
|
---|
284 | *
|
---|
285 | * @since 3.8.0
|
---|
286 | * @see https://eslint.org/docs/rules/func-name-matching
|
---|
287 | */
|
---|
288 | "func-name-matching":
|
---|
289 | | Linter.RuleEntry<
|
---|
290 | [
|
---|
291 | "always" | "never",
|
---|
292 | Partial<{
|
---|
293 | /**
|
---|
294 | * @default false
|
---|
295 | */
|
---|
296 | considerPropertyDescriptor: boolean;
|
---|
297 | /**
|
---|
298 | * @default false
|
---|
299 | */
|
---|
300 | includeCommonJSModuleExports: boolean;
|
---|
301 | }>,
|
---|
302 | ]
|
---|
303 | >
|
---|
304 | | Linter.RuleEntry<
|
---|
305 | [
|
---|
306 | Partial<{
|
---|
307 | /**
|
---|
308 | * @default false
|
---|
309 | */
|
---|
310 | considerPropertyDescriptor: boolean;
|
---|
311 | /**
|
---|
312 | * @default false
|
---|
313 | */
|
---|
314 | includeCommonJSModuleExports: boolean;
|
---|
315 | }>,
|
---|
316 | ]
|
---|
317 | >;
|
---|
318 |
|
---|
319 | /**
|
---|
320 | * Rule to require or disallow named `function` expressions.
|
---|
321 | *
|
---|
322 | * @since 0.4.0
|
---|
323 | * @see https://eslint.org/docs/rules/func-names
|
---|
324 | */
|
---|
325 | "func-names": Linter.RuleEntry<
|
---|
326 | [
|
---|
327 | "always" | "as-needed" | "never",
|
---|
328 | Partial<{
|
---|
329 | generators: "always" | "as-needed" | "never";
|
---|
330 | }>,
|
---|
331 | ]
|
---|
332 | >;
|
---|
333 |
|
---|
334 | /**
|
---|
335 | * Rule to enforce the consistent use of either `function` declarations or expressions.
|
---|
336 | *
|
---|
337 | * @since 0.2.0
|
---|
338 | * @see https://eslint.org/docs/rules/func-style
|
---|
339 | */
|
---|
340 | "func-style": Linter.RuleEntry<
|
---|
341 | [
|
---|
342 | "expression" | "declaration",
|
---|
343 | Partial<{
|
---|
344 | /**
|
---|
345 | * @default false
|
---|
346 | */
|
---|
347 | allowArrowFunctions: boolean;
|
---|
348 | }>,
|
---|
349 | ]
|
---|
350 | >;
|
---|
351 |
|
---|
352 | /**
|
---|
353 | * Rule to enforce consistent line breaks inside function parentheses.
|
---|
354 | *
|
---|
355 | * @since 4.6.0
|
---|
356 | * @see https://eslint.org/docs/rules/function-paren-newline
|
---|
357 | */
|
---|
358 | "function-paren-newline": Linter.RuleEntry<
|
---|
359 | [
|
---|
360 | | "always"
|
---|
361 | | "never"
|
---|
362 | | "multiline"
|
---|
363 | | "multiline-arguments"
|
---|
364 | | "consistent"
|
---|
365 | | Partial<{
|
---|
366 | minItems: number;
|
---|
367 | }>,
|
---|
368 | ]
|
---|
369 | >;
|
---|
370 |
|
---|
371 | /**
|
---|
372 | * Rule to disallow specified identifiers.
|
---|
373 | *
|
---|
374 | * @since 2.0.0-beta.2
|
---|
375 | * @see https://eslint.org/docs/rules/id-blacklist
|
---|
376 | */
|
---|
377 | "id-blacklist": Linter.RuleEntry<[...string[]]>;
|
---|
378 |
|
---|
379 | /**
|
---|
380 | * Rule to enforce minimum and maximum identifier lengths.
|
---|
381 | *
|
---|
382 | * @since 1.0.0
|
---|
383 | * @see https://eslint.org/docs/rules/id-length
|
---|
384 | */
|
---|
385 | "id-length": Linter.RuleEntry<
|
---|
386 | [
|
---|
387 | Partial<{
|
---|
388 | /**
|
---|
389 | * @default 2
|
---|
390 | */
|
---|
391 | min: number;
|
---|
392 | /**
|
---|
393 | * @default Infinity
|
---|
394 | */
|
---|
395 | max: number;
|
---|
396 | /**
|
---|
397 | * @default 'always'
|
---|
398 | */
|
---|
399 | properties: "always" | "never";
|
---|
400 | exceptions: string[];
|
---|
401 | }>,
|
---|
402 | ]
|
---|
403 | >;
|
---|
404 |
|
---|
405 | /**
|
---|
406 | * Rule to require identifiers to match a specified regular expression.
|
---|
407 | *
|
---|
408 | * @since 1.0.0
|
---|
409 | * @see https://eslint.org/docs/rules/id-match
|
---|
410 | */
|
---|
411 | "id-match": Linter.RuleEntry<
|
---|
412 | [
|
---|
413 | string,
|
---|
414 | Partial<{
|
---|
415 | /**
|
---|
416 | * @default false
|
---|
417 | */
|
---|
418 | properties: boolean;
|
---|
419 | /**
|
---|
420 | * @default false
|
---|
421 | */
|
---|
422 | onlyDeclarations: boolean;
|
---|
423 | /**
|
---|
424 | * @default false
|
---|
425 | */
|
---|
426 | ignoreDestructuring: boolean;
|
---|
427 | }>,
|
---|
428 | ]
|
---|
429 | >;
|
---|
430 |
|
---|
431 | /**
|
---|
432 | * Rule to enforce the location of arrow function bodies.
|
---|
433 | *
|
---|
434 | * @since 4.12.0
|
---|
435 | * @see https://eslint.org/docs/rules/implicit-arrow-linebreak
|
---|
436 | */
|
---|
437 | "implicit-arrow-linebreak": Linter.RuleEntry<["beside" | "below"]>;
|
---|
438 |
|
---|
439 | /**
|
---|
440 | * Rule to enforce consistent indentation.
|
---|
441 | *
|
---|
442 | * @since 0.14.0
|
---|
443 | * @see https://eslint.org/docs/rules/indent
|
---|
444 | */
|
---|
445 | indent: Linter.RuleEntry<
|
---|
446 | [
|
---|
447 | number | "tab",
|
---|
448 | Partial<{
|
---|
449 | /**
|
---|
450 | * @default 0
|
---|
451 | */
|
---|
452 | SwitchCase: number;
|
---|
453 | /**
|
---|
454 | * @default 1
|
---|
455 | */
|
---|
456 | VariableDeclarator:
|
---|
457 | | Partial<{
|
---|
458 | /**
|
---|
459 | * @default 1
|
---|
460 | */
|
---|
461 | var: number | "first";
|
---|
462 | /**
|
---|
463 | * @default 1
|
---|
464 | */
|
---|
465 | let: number | "first";
|
---|
466 | /**
|
---|
467 | * @default 1
|
---|
468 | */
|
---|
469 | const: number | "first";
|
---|
470 | }>
|
---|
471 | | number
|
---|
472 | | "first";
|
---|
473 | /**
|
---|
474 | * @default 1
|
---|
475 | */
|
---|
476 | outerIIFEBody: number;
|
---|
477 | /**
|
---|
478 | * @default 1
|
---|
479 | */
|
---|
480 | MemberExpression: number | "off";
|
---|
481 | /**
|
---|
482 | * @default { parameters: 1, body: 1 }
|
---|
483 | */
|
---|
484 | FunctionDeclaration: Partial<{
|
---|
485 | /**
|
---|
486 | * @default 1
|
---|
487 | */
|
---|
488 | parameters: number | "first" | "off";
|
---|
489 | /**
|
---|
490 | * @default 1
|
---|
491 | */
|
---|
492 | body: number;
|
---|
493 | }>;
|
---|
494 | /**
|
---|
495 | * @default { parameters: 1, body: 1 }
|
---|
496 | */
|
---|
497 | FunctionExpression: Partial<{
|
---|
498 | /**
|
---|
499 | * @default 1
|
---|
500 | */
|
---|
501 | parameters: number | "first" | "off";
|
---|
502 | /**
|
---|
503 | * @default 1
|
---|
504 | */
|
---|
505 | body: number;
|
---|
506 | }>;
|
---|
507 | /**
|
---|
508 | * @default { arguments: 1 }
|
---|
509 | */
|
---|
510 | CallExpression: Partial<{
|
---|
511 | /**
|
---|
512 | * @default 1
|
---|
513 | */
|
---|
514 | arguments: number | "first" | "off";
|
---|
515 | }>;
|
---|
516 | /**
|
---|
517 | * @default 1
|
---|
518 | */
|
---|
519 | ArrayExpression: number | "first" | "off";
|
---|
520 | /**
|
---|
521 | * @default 1
|
---|
522 | */
|
---|
523 | ObjectExpression: number | "first" | "off";
|
---|
524 | /**
|
---|
525 | * @default 1
|
---|
526 | */
|
---|
527 | ImportDeclaration: number | "first" | "off";
|
---|
528 | /**
|
---|
529 | * @default false
|
---|
530 | */
|
---|
531 | flatTernaryExpressions: boolean;
|
---|
532 | ignoredNodes: string[];
|
---|
533 | /**
|
---|
534 | * @default false
|
---|
535 | */
|
---|
536 | ignoreComments: boolean;
|
---|
537 | }>,
|
---|
538 | ]
|
---|
539 | >;
|
---|
540 |
|
---|
541 | /**
|
---|
542 | * Rule to enforce the consistent use of either double or single quotes in JSX attributes.
|
---|
543 | *
|
---|
544 | * @since 1.4.0
|
---|
545 | * @see https://eslint.org/docs/rules/jsx-quotes
|
---|
546 | */
|
---|
547 | "jsx-quotes": Linter.RuleEntry<["prefer-double" | "prefer-single"]>;
|
---|
548 |
|
---|
549 | /**
|
---|
550 | * Rule to enforce consistent spacing between keys and values in object literal properties.
|
---|
551 | *
|
---|
552 | * @since 0.9.0
|
---|
553 | * @see https://eslint.org/docs/rules/key-spacing
|
---|
554 | */
|
---|
555 | "key-spacing": Linter.RuleEntry<
|
---|
556 | [
|
---|
557 | | Partial<
|
---|
558 | | {
|
---|
559 | /**
|
---|
560 | * @default false
|
---|
561 | */
|
---|
562 | beforeColon: boolean;
|
---|
563 | /**
|
---|
564 | * @default true
|
---|
565 | */
|
---|
566 | afterColon: boolean;
|
---|
567 | /**
|
---|
568 | * @default 'strict'
|
---|
569 | */
|
---|
570 | mode: "strict" | "minimum";
|
---|
571 | align:
|
---|
572 | | Partial<{
|
---|
573 | /**
|
---|
574 | * @default false
|
---|
575 | */
|
---|
576 | beforeColon: boolean;
|
---|
577 | /**
|
---|
578 | * @default true
|
---|
579 | */
|
---|
580 | afterColon: boolean;
|
---|
581 | /**
|
---|
582 | * @default 'colon'
|
---|
583 | */
|
---|
584 | on: "value" | "colon";
|
---|
585 | /**
|
---|
586 | * @default 'strict'
|
---|
587 | */
|
---|
588 | mode: "strict" | "minimum";
|
---|
589 | }>
|
---|
590 | | "value"
|
---|
591 | | "colon";
|
---|
592 | }
|
---|
593 | | {
|
---|
594 | singleLine?: Partial<{
|
---|
595 | /**
|
---|
596 | * @default false
|
---|
597 | */
|
---|
598 | beforeColon: boolean;
|
---|
599 | /**
|
---|
600 | * @default true
|
---|
601 | */
|
---|
602 | afterColon: boolean;
|
---|
603 | /**
|
---|
604 | * @default 'strict'
|
---|
605 | */
|
---|
606 | mode: "strict" | "minimum";
|
---|
607 | }> | undefined;
|
---|
608 | multiLine?: Partial<{
|
---|
609 | /**
|
---|
610 | * @default false
|
---|
611 | */
|
---|
612 | beforeColon: boolean;
|
---|
613 | /**
|
---|
614 | * @default true
|
---|
615 | */
|
---|
616 | afterColon: boolean;
|
---|
617 | /**
|
---|
618 | * @default 'strict'
|
---|
619 | */
|
---|
620 | mode: "strict" | "minimum";
|
---|
621 | align:
|
---|
622 | | Partial<{
|
---|
623 | /**
|
---|
624 | * @default false
|
---|
625 | */
|
---|
626 | beforeColon: boolean;
|
---|
627 | /**
|
---|
628 | * @default true
|
---|
629 | */
|
---|
630 | afterColon: boolean;
|
---|
631 | /**
|
---|
632 | * @default 'colon'
|
---|
633 | */
|
---|
634 | on: "value" | "colon";
|
---|
635 | /**
|
---|
636 | * @default 'strict'
|
---|
637 | */
|
---|
638 | mode: "strict" | "minimum";
|
---|
639 | }>
|
---|
640 | | "value"
|
---|
641 | | "colon";
|
---|
642 | }> | undefined;
|
---|
643 | }
|
---|
644 | >
|
---|
645 | | {
|
---|
646 | align: Partial<{
|
---|
647 | /**
|
---|
648 | * @default false
|
---|
649 | */
|
---|
650 | beforeColon: boolean;
|
---|
651 | /**
|
---|
652 | * @default true
|
---|
653 | */
|
---|
654 | afterColon: boolean;
|
---|
655 | /**
|
---|
656 | * @default 'colon'
|
---|
657 | */
|
---|
658 | on: "value" | "colon";
|
---|
659 | /**
|
---|
660 | * @default 'strict'
|
---|
661 | */
|
---|
662 | mode: "strict" | "minimum";
|
---|
663 | }>;
|
---|
664 | singleLine?: Partial<{
|
---|
665 | /**
|
---|
666 | * @default false
|
---|
667 | */
|
---|
668 | beforeColon: boolean;
|
---|
669 | /**
|
---|
670 | * @default true
|
---|
671 | */
|
---|
672 | afterColon: boolean;
|
---|
673 | /**
|
---|
674 | * @default 'strict'
|
---|
675 | */
|
---|
676 | mode: "strict" | "minimum";
|
---|
677 | }> | undefined;
|
---|
678 | multiLine?: Partial<{
|
---|
679 | /**
|
---|
680 | * @default false
|
---|
681 | */
|
---|
682 | beforeColon: boolean;
|
---|
683 | /**
|
---|
684 | * @default true
|
---|
685 | */
|
---|
686 | afterColon: boolean;
|
---|
687 | /**
|
---|
688 | * @default 'strict'
|
---|
689 | */
|
---|
690 | mode: "strict" | "minimum";
|
---|
691 | }> | undefined;
|
---|
692 | },
|
---|
693 | ]
|
---|
694 | >;
|
---|
695 |
|
---|
696 | /**
|
---|
697 | * Rule to enforce consistent spacing before and after keywords.
|
---|
698 | *
|
---|
699 | * @since 2.0.0-beta.1
|
---|
700 | * @see https://eslint.org/docs/rules/keyword-spacing
|
---|
701 | */
|
---|
702 | "keyword-spacing": Linter.RuleEntry<
|
---|
703 | [
|
---|
704 | Partial<{
|
---|
705 | /**
|
---|
706 | * @default true
|
---|
707 | */
|
---|
708 | before: boolean;
|
---|
709 | /**
|
---|
710 | * @default true
|
---|
711 | */
|
---|
712 | after: boolean;
|
---|
713 | overrides: Record<
|
---|
714 | string,
|
---|
715 | Partial<{
|
---|
716 | before: boolean;
|
---|
717 | after: boolean;
|
---|
718 | }>
|
---|
719 | >;
|
---|
720 | }>,
|
---|
721 | ]
|
---|
722 | >;
|
---|
723 |
|
---|
724 | /**
|
---|
725 | * Rule to enforce position of line comments.
|
---|
726 | *
|
---|
727 | * @since 3.5.0
|
---|
728 | * @see https://eslint.org/docs/rules/line-comment-position
|
---|
729 | */
|
---|
730 | "line-comment-position": Linter.RuleEntry<
|
---|
731 | [
|
---|
732 | Partial<{
|
---|
733 | /**
|
---|
734 | * @default 'above'
|
---|
735 | */
|
---|
736 | position: "above" | "beside";
|
---|
737 | ignorePattern: string;
|
---|
738 | /**
|
---|
739 | * @default true
|
---|
740 | */
|
---|
741 | applyDefaultIgnorePatterns: boolean;
|
---|
742 | }>,
|
---|
743 | ]
|
---|
744 | >;
|
---|
745 |
|
---|
746 | /**
|
---|
747 | * Rule to enforce consistent linebreak style.
|
---|
748 | *
|
---|
749 | * @since 0.21.0
|
---|
750 | * @see https://eslint.org/docs/rules/linebreak-style
|
---|
751 | */
|
---|
752 | "linebreak-style": Linter.RuleEntry<["unix" | "windows"]>;
|
---|
753 |
|
---|
754 | /**
|
---|
755 | * Rule to require empty lines around comments.
|
---|
756 | *
|
---|
757 | * @since 0.22.0
|
---|
758 | * @see https://eslint.org/docs/rules/lines-around-comment
|
---|
759 | */
|
---|
760 | "lines-around-comment": Linter.RuleEntry<
|
---|
761 | [
|
---|
762 | Partial<{
|
---|
763 | /**
|
---|
764 | * @default true
|
---|
765 | */
|
---|
766 | beforeBlockComment: boolean;
|
---|
767 | /**
|
---|
768 | * @default false
|
---|
769 | */
|
---|
770 | afterBlockComment: boolean;
|
---|
771 | /**
|
---|
772 | * @default false
|
---|
773 | */
|
---|
774 | beforeLineComment: boolean;
|
---|
775 | /**
|
---|
776 | * @default false
|
---|
777 | */
|
---|
778 | afterLineComment: boolean;
|
---|
779 | /**
|
---|
780 | * @default false
|
---|
781 | */
|
---|
782 | allowBlockStart: boolean;
|
---|
783 | /**
|
---|
784 | * @default false
|
---|
785 | */
|
---|
786 | allowBlockEnd: boolean;
|
---|
787 | /**
|
---|
788 | * @default false
|
---|
789 | */
|
---|
790 | allowObjectStart: boolean;
|
---|
791 | /**
|
---|
792 | * @default false
|
---|
793 | */
|
---|
794 | allowObjectEnd: boolean;
|
---|
795 | /**
|
---|
796 | * @default false
|
---|
797 | */
|
---|
798 | allowArrayStart: boolean;
|
---|
799 | /**
|
---|
800 | * @default false
|
---|
801 | */
|
---|
802 | allowArrayEnd: boolean;
|
---|
803 | /**
|
---|
804 | * @default false
|
---|
805 | */
|
---|
806 | allowClassStart: boolean;
|
---|
807 | /**
|
---|
808 | * @default false
|
---|
809 | */
|
---|
810 | allowClassEnd: boolean;
|
---|
811 | ignorePattern: string;
|
---|
812 | /**
|
---|
813 | * @default true
|
---|
814 | */
|
---|
815 | applyDefaultIgnorePatterns: boolean;
|
---|
816 | }>,
|
---|
817 | ]
|
---|
818 | >;
|
---|
819 |
|
---|
820 | /**
|
---|
821 | * Rule to require or disallow an empty line between class members.
|
---|
822 | *
|
---|
823 | * @since 4.9.0
|
---|
824 | * @see https://eslint.org/docs/rules/lines-between-class-members
|
---|
825 | */
|
---|
826 | "lines-between-class-members": Linter.RuleEntry<
|
---|
827 | [
|
---|
828 | "always" | "never",
|
---|
829 | Partial<{
|
---|
830 | /**
|
---|
831 | * @default false
|
---|
832 | */
|
---|
833 | exceptAfterSingleLine: boolean;
|
---|
834 | }>,
|
---|
835 | ]
|
---|
836 | >;
|
---|
837 |
|
---|
838 | /**
|
---|
839 | * Rule to enforce a maximum depth that blocks can be nested.
|
---|
840 | *
|
---|
841 | * @since 0.0.9
|
---|
842 | * @see https://eslint.org/docs/rules/max-depth
|
---|
843 | */
|
---|
844 | "max-depth": Linter.RuleEntry<
|
---|
845 | [
|
---|
846 | Partial<{
|
---|
847 | /**
|
---|
848 | * @default 4
|
---|
849 | */
|
---|
850 | max: number;
|
---|
851 | }>,
|
---|
852 | ]
|
---|
853 | >;
|
---|
854 |
|
---|
855 | /**
|
---|
856 | * Rule to enforce a maximum line length.
|
---|
857 | *
|
---|
858 | * @since 0.0.9
|
---|
859 | * @see https://eslint.org/docs/rules/max-len
|
---|
860 | */
|
---|
861 | "max-len": Linter.RuleEntry<
|
---|
862 | [
|
---|
863 | Partial<{
|
---|
864 | /**
|
---|
865 | * @default 80
|
---|
866 | */
|
---|
867 | code: number;
|
---|
868 | /**
|
---|
869 | * @default 4
|
---|
870 | */
|
---|
871 | tabWidth: number;
|
---|
872 | comments: number;
|
---|
873 | ignorePattern: string;
|
---|
874 | /**
|
---|
875 | * @default false
|
---|
876 | */
|
---|
877 | ignoreComments: boolean;
|
---|
878 | /**
|
---|
879 | * @default false
|
---|
880 | */
|
---|
881 | ignoreTrailingComments: boolean;
|
---|
882 | /**
|
---|
883 | * @default false
|
---|
884 | */
|
---|
885 | ignoreUrls: boolean;
|
---|
886 | /**
|
---|
887 | * @default false
|
---|
888 | */
|
---|
889 | ignoreStrings: boolean;
|
---|
890 | /**
|
---|
891 | * @default false
|
---|
892 | */
|
---|
893 | ignoreTemplateLiterals: boolean;
|
---|
894 | /**
|
---|
895 | * @default false
|
---|
896 | */
|
---|
897 | ignoreRegExpLiterals: boolean;
|
---|
898 | }>,
|
---|
899 | ]
|
---|
900 | >;
|
---|
901 |
|
---|
902 | /**
|
---|
903 | * Rule to enforce a maximum number of lines per file.
|
---|
904 | *
|
---|
905 | * @since 2.12.0
|
---|
906 | * @see https://eslint.org/docs/rules/max-lines
|
---|
907 | */
|
---|
908 | "max-lines": Linter.RuleEntry<
|
---|
909 | [
|
---|
910 | | Partial<{
|
---|
911 | /**
|
---|
912 | * @default 300
|
---|
913 | */
|
---|
914 | max: number;
|
---|
915 | /**
|
---|
916 | * @default false
|
---|
917 | */
|
---|
918 | skipBlankLines: boolean;
|
---|
919 | /**
|
---|
920 | * @default false
|
---|
921 | */
|
---|
922 | skipComments: boolean;
|
---|
923 | }>
|
---|
924 | | number,
|
---|
925 | ]
|
---|
926 | >;
|
---|
927 |
|
---|
928 | /**
|
---|
929 | * Rule to enforce a maximum number of line of code in a function.
|
---|
930 | *
|
---|
931 | * @since 5.0.0
|
---|
932 | * @see https://eslint.org/docs/rules/max-lines-per-function
|
---|
933 | */
|
---|
934 | "max-lines-per-function": Linter.RuleEntry<
|
---|
935 | [
|
---|
936 | Partial<{
|
---|
937 | /**
|
---|
938 | * @default 50
|
---|
939 | */
|
---|
940 | max: number;
|
---|
941 | /**
|
---|
942 | * @default false
|
---|
943 | */
|
---|
944 | skipBlankLines: boolean;
|
---|
945 | /**
|
---|
946 | * @default false
|
---|
947 | */
|
---|
948 | skipComments: boolean;
|
---|
949 | /**
|
---|
950 | * @default false
|
---|
951 | */
|
---|
952 | IIFEs: boolean;
|
---|
953 | }>,
|
---|
954 | ]
|
---|
955 | >;
|
---|
956 |
|
---|
957 | /**
|
---|
958 | * Rule to enforce a maximum depth that callbacks can be nested.
|
---|
959 | *
|
---|
960 | * @since 0.2.0
|
---|
961 | * @see https://eslint.org/docs/rules/max-nested-callbacks
|
---|
962 | */
|
---|
963 | "max-nested-callbacks": Linter.RuleEntry<
|
---|
964 | [
|
---|
965 | | Partial<{
|
---|
966 | /**
|
---|
967 | * @default 10
|
---|
968 | */
|
---|
969 | max: number;
|
---|
970 | }>
|
---|
971 | | number,
|
---|
972 | ]
|
---|
973 | >;
|
---|
974 |
|
---|
975 | /**
|
---|
976 | * Rule to enforce a maximum number of parameters in function definitions.
|
---|
977 | *
|
---|
978 | * @since 0.0.9
|
---|
979 | * @see https://eslint.org/docs/rules/max-params
|
---|
980 | */
|
---|
981 | "max-params": Linter.RuleEntry<
|
---|
982 | [
|
---|
983 | | Partial<{
|
---|
984 | /**
|
---|
985 | * @default 3
|
---|
986 | */
|
---|
987 | max: number;
|
---|
988 | }>
|
---|
989 | | number,
|
---|
990 | ]
|
---|
991 | >;
|
---|
992 |
|
---|
993 | /**
|
---|
994 | * Rule to enforce a maximum number of statements allowed in function blocks.
|
---|
995 | *
|
---|
996 | * @since 0.0.9
|
---|
997 | * @see https://eslint.org/docs/rules/max-statements
|
---|
998 | */
|
---|
999 | "max-statements": Linter.RuleEntry<
|
---|
1000 | [
|
---|
1001 | | Partial<{
|
---|
1002 | /**
|
---|
1003 | * @default 10
|
---|
1004 | */
|
---|
1005 | max: number;
|
---|
1006 | /**
|
---|
1007 | * @default false
|
---|
1008 | */
|
---|
1009 | ignoreTopLevelFunctions: boolean;
|
---|
1010 | }>
|
---|
1011 | | number,
|
---|
1012 | ]
|
---|
1013 | >;
|
---|
1014 |
|
---|
1015 | /**
|
---|
1016 | * Rule to enforce a maximum number of statements allowed per line.
|
---|
1017 | *
|
---|
1018 | * @since 2.5.0
|
---|
1019 | * @see https://eslint.org/docs/rules/max-statements-per-line
|
---|
1020 | */
|
---|
1021 | "max-statements-per-line": Linter.RuleEntry<
|
---|
1022 | [
|
---|
1023 | | Partial<{
|
---|
1024 | /**
|
---|
1025 | * @default 1
|
---|
1026 | */
|
---|
1027 | max: number;
|
---|
1028 | }>
|
---|
1029 | | number,
|
---|
1030 | ]
|
---|
1031 | >;
|
---|
1032 |
|
---|
1033 | /**
|
---|
1034 | * Rule to enforce a particular style for multiline comments.
|
---|
1035 | *
|
---|
1036 | * @since 4.10.0
|
---|
1037 | * @see https://eslint.org/docs/rules/multiline-comment-style
|
---|
1038 | */
|
---|
1039 | "multiline-comment-style": Linter.RuleEntry<["starred-block" | "bare-block" | "separate-lines"]>;
|
---|
1040 |
|
---|
1041 | /**
|
---|
1042 | * Rule to enforce newlines between operands of ternary expressions.
|
---|
1043 | *
|
---|
1044 | * @since 3.1.0
|
---|
1045 | * @see https://eslint.org/docs/rules/multiline-ternary
|
---|
1046 | */
|
---|
1047 | "multiline-ternary": Linter.RuleEntry<["always" | "always-multiline" | "never"]>;
|
---|
1048 |
|
---|
1049 | /**
|
---|
1050 | * Rule to require constructor names to begin with a capital letter.
|
---|
1051 | *
|
---|
1052 | * @since 0.0.3-0
|
---|
1053 | * @see https://eslint.org/docs/rules/new-cap
|
---|
1054 | */
|
---|
1055 | "new-cap": Linter.RuleEntry<
|
---|
1056 | [
|
---|
1057 | Partial<{
|
---|
1058 | /**
|
---|
1059 | * @default true
|
---|
1060 | */
|
---|
1061 | newIsCap: boolean;
|
---|
1062 | /**
|
---|
1063 | * @default true
|
---|
1064 | */
|
---|
1065 | capIsNew: boolean;
|
---|
1066 | newIsCapExceptions: string[];
|
---|
1067 | newIsCapExceptionPattern: string;
|
---|
1068 | capIsNewExceptions: string[];
|
---|
1069 | capIsNewExceptionPattern: string;
|
---|
1070 | /**
|
---|
1071 | * @default true
|
---|
1072 | */
|
---|
1073 | properties: boolean;
|
---|
1074 | }>,
|
---|
1075 | ]
|
---|
1076 | >;
|
---|
1077 |
|
---|
1078 | /**
|
---|
1079 | * Rule to enforce or disallow parentheses when invoking a constructor with no arguments.
|
---|
1080 | *
|
---|
1081 | * @since 0.0.6
|
---|
1082 | * @see https://eslint.org/docs/rules/new-parens
|
---|
1083 | */
|
---|
1084 | "new-parens": Linter.RuleEntry<["always" | "never"]>;
|
---|
1085 |
|
---|
1086 | /**
|
---|
1087 | * Rule to require a newline after each call in a method chain.
|
---|
1088 | *
|
---|
1089 | * @since 2.0.0-rc.0
|
---|
1090 | * @see https://eslint.org/docs/rules/newline-per-chained-call
|
---|
1091 | */
|
---|
1092 | "newline-per-chained-call": Linter.RuleEntry<
|
---|
1093 | [
|
---|
1094 | {
|
---|
1095 | /**
|
---|
1096 | * @default 2
|
---|
1097 | */
|
---|
1098 | ignoreChainWithDepth: number;
|
---|
1099 | },
|
---|
1100 | ]
|
---|
1101 | >;
|
---|
1102 |
|
---|
1103 | /**
|
---|
1104 | * Rule to disallow `Array` constructors.
|
---|
1105 | *
|
---|
1106 | * @since 0.4.0
|
---|
1107 | * @see https://eslint.org/docs/rules/no-array-constructor
|
---|
1108 | */
|
---|
1109 | "no-array-constructor": Linter.RuleEntry<[]>;
|
---|
1110 |
|
---|
1111 | /**
|
---|
1112 | * Rule to disallow bitwise operators.
|
---|
1113 | *
|
---|
1114 | * @since 0.0.2
|
---|
1115 | * @see https://eslint.org/docs/rules/no-bitwise
|
---|
1116 | */
|
---|
1117 | "no-bitwise": Linter.RuleEntry<
|
---|
1118 | [
|
---|
1119 | Partial<{
|
---|
1120 | allow: string[];
|
---|
1121 | /**
|
---|
1122 | * @default false
|
---|
1123 | */
|
---|
1124 | int32Hint: boolean;
|
---|
1125 | }>,
|
---|
1126 | ]
|
---|
1127 | >;
|
---|
1128 |
|
---|
1129 | /**
|
---|
1130 | * Rule to disallow `continue` statements.
|
---|
1131 | *
|
---|
1132 | * @since 0.19.0
|
---|
1133 | * @see https://eslint.org/docs/rules/no-continue
|
---|
1134 | */
|
---|
1135 | "no-continue": Linter.RuleEntry<[]>;
|
---|
1136 |
|
---|
1137 | /**
|
---|
1138 | * Rule to disallow inline comments after code.
|
---|
1139 | *
|
---|
1140 | * @since 0.10.0
|
---|
1141 | * @see https://eslint.org/docs/rules/no-inline-comments
|
---|
1142 | */
|
---|
1143 | "no-inline-comments": Linter.RuleEntry<[]>;
|
---|
1144 |
|
---|
1145 | /**
|
---|
1146 | * Rule to disallow `if` statements as the only statement in `else` blocks.
|
---|
1147 | *
|
---|
1148 | * @since 0.6.0
|
---|
1149 | * @see https://eslint.org/docs/rules/no-lonely-if
|
---|
1150 | */
|
---|
1151 | "no-lonely-if": Linter.RuleEntry<[]>;
|
---|
1152 |
|
---|
1153 | /**
|
---|
1154 | * Rule to disallow mixed binary operators.
|
---|
1155 | *
|
---|
1156 | * @since 2.12.0
|
---|
1157 | * @see https://eslint.org/docs/rules/no-mixed-operators
|
---|
1158 | */
|
---|
1159 | "no-mixed-operators": Linter.RuleEntry<
|
---|
1160 | [
|
---|
1161 | Partial<{
|
---|
1162 | /**
|
---|
1163 | * @default
|
---|
1164 | * [
|
---|
1165 | * ["+", "-", "*", "/", "%", "**"],
|
---|
1166 | * ["&", "|", "^", "~", "<<", ">>", ">>>"],
|
---|
1167 | * ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
---|
1168 | * ["&&", "||"],
|
---|
1169 | * ["in", "instanceof"]
|
---|
1170 | * ]
|
---|
1171 | */
|
---|
1172 | groups: string[][];
|
---|
1173 | /**
|
---|
1174 | * @default true
|
---|
1175 | */
|
---|
1176 | allowSamePrecedence: boolean;
|
---|
1177 | }>,
|
---|
1178 | ]
|
---|
1179 | >;
|
---|
1180 |
|
---|
1181 | /**
|
---|
1182 | * Rule to disallow mixed spaces and tabs for indentation.
|
---|
1183 | *
|
---|
1184 | * @remarks
|
---|
1185 | * Recommended by ESLint, the rule was enabled in `eslint:recommended`.
|
---|
1186 | *
|
---|
1187 | * @since 0.7.1
|
---|
1188 | * @see https://eslint.org/docs/rules/no-mixed-spaces-and-tabs
|
---|
1189 | */
|
---|
1190 | "no-mixed-spaces-and-tabs": Linter.RuleEntry<["smart-tabs"]>;
|
---|
1191 |
|
---|
1192 | /**
|
---|
1193 | * Rule to disallow use of chained assignment expressions.
|
---|
1194 | *
|
---|
1195 | * @since 3.14.0
|
---|
1196 | * @see https://eslint.org/docs/rules/no-multi-assign
|
---|
1197 | */
|
---|
1198 | "no-multi-assign": Linter.RuleEntry<[]>;
|
---|
1199 |
|
---|
1200 | /**
|
---|
1201 | * Rule to disallow multiple empty lines.
|
---|
1202 | *
|
---|
1203 | * @since 0.9.0
|
---|
1204 | * @see https://eslint.org/docs/rules/no-multiple-empty-lines
|
---|
1205 | */
|
---|
1206 | "no-multiple-empty-lines": Linter.RuleEntry<
|
---|
1207 | [
|
---|
1208 | | Partial<{
|
---|
1209 | /**
|
---|
1210 | * @default 2
|
---|
1211 | */
|
---|
1212 | max: number;
|
---|
1213 | maxEOF: number;
|
---|
1214 | maxBOF: number;
|
---|
1215 | }>
|
---|
1216 | | number,
|
---|
1217 | ]
|
---|
1218 | >;
|
---|
1219 |
|
---|
1220 | /**
|
---|
1221 | * Rule to disallow negated conditions.
|
---|
1222 | *
|
---|
1223 | * @since 1.6.0
|
---|
1224 | * @see https://eslint.org/docs/rules/no-negated-condition
|
---|
1225 | */
|
---|
1226 | "no-negated-condition": Linter.RuleEntry<[]>;
|
---|
1227 |
|
---|
1228 | /**
|
---|
1229 | * Rule to disallow nested ternary expressions.
|
---|
1230 | *
|
---|
1231 | * @since 0.2.0
|
---|
1232 | * @see https://eslint.org/docs/rules/no-nested-ternary
|
---|
1233 | */
|
---|
1234 | "no-nested-ternary": Linter.RuleEntry<[]>;
|
---|
1235 |
|
---|
1236 | /**
|
---|
1237 | * Rule to disallow `Object` constructors.
|
---|
1238 | *
|
---|
1239 | * @since 0.0.9
|
---|
1240 | * @see https://eslint.org/docs/rules/no-new-object
|
---|
1241 | */
|
---|
1242 | "no-new-object": Linter.RuleEntry<[]>;
|
---|
1243 |
|
---|
1244 | /**
|
---|
1245 | * Rule to disallow the unary operators `++` and `--`.
|
---|
1246 | *
|
---|
1247 | * @since 0.0.9
|
---|
1248 | * @see https://eslint.org/docs/rules/no-plusplus
|
---|
1249 | */
|
---|
1250 | "no-plusplus": Linter.RuleEntry<
|
---|
1251 | [
|
---|
1252 | Partial<{
|
---|
1253 | /**
|
---|
1254 | * @default false
|
---|
1255 | */
|
---|
1256 | allowForLoopAfterthoughts: boolean;
|
---|
1257 | }>,
|
---|
1258 | ]
|
---|
1259 | >;
|
---|
1260 |
|
---|
1261 | /**
|
---|
1262 | * Rule to disallow specified syntax.
|
---|
1263 | *
|
---|
1264 | * @since 1.4.0
|
---|
1265 | * @see https://eslint.org/docs/rules/no-restricted-syntax
|
---|
1266 | */
|
---|
1267 | "no-restricted-syntax": Linter.RuleEntry<
|
---|
1268 | [
|
---|
1269 | ...Array<
|
---|
1270 | | string
|
---|
1271 | | {
|
---|
1272 | selector: string;
|
---|
1273 | message?: string | undefined;
|
---|
1274 | }
|
---|
1275 | >
|
---|
1276 | ]
|
---|
1277 | >;
|
---|
1278 |
|
---|
1279 | /**
|
---|
1280 | * Rule to disallow all tabs.
|
---|
1281 | *
|
---|
1282 | * @since 3.2.0
|
---|
1283 | * @see https://eslint.org/docs/rules/no-tabs
|
---|
1284 | */
|
---|
1285 | "no-tabs": Linter.RuleEntry<
|
---|
1286 | [
|
---|
1287 | Partial<{
|
---|
1288 | /**
|
---|
1289 | * @default false
|
---|
1290 | */
|
---|
1291 | allowIndentationTabs: boolean;
|
---|
1292 | }>,
|
---|
1293 | ]
|
---|
1294 | >;
|
---|
1295 |
|
---|
1296 | /**
|
---|
1297 | * Rule to disallow ternary operators.
|
---|
1298 | *
|
---|
1299 | * @since 0.0.9
|
---|
1300 | * @see https://eslint.org/docs/rules/no-ternary
|
---|
1301 | */
|
---|
1302 | "no-ternary": Linter.RuleEntry<[]>;
|
---|
1303 |
|
---|
1304 | /**
|
---|
1305 | * Rule to disallow trailing whitespace at the end of lines.
|
---|
1306 | *
|
---|
1307 | * @since 0.7.1
|
---|
1308 | * @see https://eslint.org/docs/rules/no-trailing-spaces
|
---|
1309 | */
|
---|
1310 | "no-trailing-spaces": Linter.RuleEntry<
|
---|
1311 | [
|
---|
1312 | Partial<{
|
---|
1313 | /**
|
---|
1314 | * @default false
|
---|
1315 | */
|
---|
1316 | skipBlankLines: boolean;
|
---|
1317 | /**
|
---|
1318 | * @default false
|
---|
1319 | */
|
---|
1320 | ignoreComments: boolean;
|
---|
1321 | }>,
|
---|
1322 | ]
|
---|
1323 | >;
|
---|
1324 |
|
---|
1325 | /**
|
---|
1326 | * Rule to disallow dangling underscores in identifiers.
|
---|
1327 | *
|
---|
1328 | * @since 0.0.9
|
---|
1329 | * @see https://eslint.org/docs/rules/no-underscore-dangle
|
---|
1330 | */
|
---|
1331 | "no-underscore-dangle": Linter.RuleEntry<
|
---|
1332 | [
|
---|
1333 | Partial<{
|
---|
1334 | allow: string[];
|
---|
1335 | /**
|
---|
1336 | * @default false
|
---|
1337 | */
|
---|
1338 | allowAfterThis: boolean;
|
---|
1339 | /**
|
---|
1340 | * @default false
|
---|
1341 | */
|
---|
1342 | allowAfterSuper: boolean;
|
---|
1343 | /**
|
---|
1344 | * @default false
|
---|
1345 | */
|
---|
1346 | enforceInMethodNames: boolean;
|
---|
1347 | }>,
|
---|
1348 | ]
|
---|
1349 | >;
|
---|
1350 |
|
---|
1351 | /**
|
---|
1352 | * Rule to disallow ternary operators when simpler alternatives exist.
|
---|
1353 | *
|
---|
1354 | * @since 0.21.0
|
---|
1355 | * @see https://eslint.org/docs/rules/no-unneeded-ternary
|
---|
1356 | */
|
---|
1357 | "no-unneeded-ternary": Linter.RuleEntry<
|
---|
1358 | [
|
---|
1359 | Partial<{
|
---|
1360 | /**
|
---|
1361 | * @default true
|
---|
1362 | */
|
---|
1363 | defaultAssignment: boolean;
|
---|
1364 | }>,
|
---|
1365 | ]
|
---|
1366 | >;
|
---|
1367 |
|
---|
1368 | /**
|
---|
1369 | * Rule to disallow whitespace before properties.
|
---|
1370 | *
|
---|
1371 | * @since 2.0.0-beta.1
|
---|
1372 | * @see https://eslint.org/docs/rules/no-whitespace-before-property
|
---|
1373 | */
|
---|
1374 | "no-whitespace-before-property": Linter.RuleEntry<[]>;
|
---|
1375 |
|
---|
1376 | /**
|
---|
1377 | * Rule to enforce the location of single-line statements.
|
---|
1378 | *
|
---|
1379 | * @since 3.17.0
|
---|
1380 | * @see https://eslint.org/docs/rules/nonblock-statement-body-position
|
---|
1381 | */
|
---|
1382 | "nonblock-statement-body-position": Linter.RuleEntry<
|
---|
1383 | [
|
---|
1384 | "beside" | "below" | "any",
|
---|
1385 | Partial<{
|
---|
1386 | overrides: Record<string, "beside" | "below" | "any">;
|
---|
1387 | }>,
|
---|
1388 | ]
|
---|
1389 | >;
|
---|
1390 |
|
---|
1391 | /**
|
---|
1392 | * Rule to enforce consistent line breaks inside braces.
|
---|
1393 | *
|
---|
1394 | * @since 2.12.0
|
---|
1395 | * @see https://eslint.org/docs/rules/object-curly-newline
|
---|
1396 | */
|
---|
1397 | "object-curly-newline": Linter.RuleEntry<
|
---|
1398 | [
|
---|
1399 | | "always"
|
---|
1400 | | "never"
|
---|
1401 | | Partial<{
|
---|
1402 | /**
|
---|
1403 | * @default false
|
---|
1404 | */
|
---|
1405 | multiline: boolean;
|
---|
1406 | minProperties: number;
|
---|
1407 | /**
|
---|
1408 | * @default true
|
---|
1409 | */
|
---|
1410 | consistent: boolean;
|
---|
1411 | }>
|
---|
1412 | | Partial<
|
---|
1413 | Record<
|
---|
1414 | "ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportDeclaration",
|
---|
1415 | | "always"
|
---|
1416 | | "never"
|
---|
1417 | | Partial<{
|
---|
1418 | /**
|
---|
1419 | * @default false
|
---|
1420 | */
|
---|
1421 | multiline: boolean;
|
---|
1422 | minProperties: number;
|
---|
1423 | /**
|
---|
1424 | * @default true
|
---|
1425 | */
|
---|
1426 | consistent: boolean;
|
---|
1427 | }>
|
---|
1428 | >
|
---|
1429 | >,
|
---|
1430 | ]
|
---|
1431 | >;
|
---|
1432 |
|
---|
1433 | /**
|
---|
1434 | * Rule to enforce consistent spacing inside braces.
|
---|
1435 | *
|
---|
1436 | * @since 0.22.0
|
---|
1437 | * @see https://eslint.org/docs/rules/object-curly-spacing
|
---|
1438 | */
|
---|
1439 | "object-curly-spacing":
|
---|
1440 | | Linter.RuleEntry<
|
---|
1441 | [
|
---|
1442 | "never",
|
---|
1443 | {
|
---|
1444 | /**
|
---|
1445 | * @default false
|
---|
1446 | */
|
---|
1447 | arraysInObjects: boolean;
|
---|
1448 | /**
|
---|
1449 | * @default false
|
---|
1450 | */
|
---|
1451 | objectsInObjects: boolean;
|
---|
1452 | },
|
---|
1453 | ]
|
---|
1454 | >
|
---|
1455 | | Linter.RuleEntry<
|
---|
1456 | [
|
---|
1457 | "always",
|
---|
1458 | {
|
---|
1459 | /**
|
---|
1460 | * @default true
|
---|
1461 | */
|
---|
1462 | arraysInObjects: boolean;
|
---|
1463 | /**
|
---|
1464 | * @default true
|
---|
1465 | */
|
---|
1466 | objectsInObjects: boolean;
|
---|
1467 | },
|
---|
1468 | ]
|
---|
1469 | >;
|
---|
1470 |
|
---|
1471 | /**
|
---|
1472 | * Rule to enforce placing object properties on separate lines.
|
---|
1473 | *
|
---|
1474 | * @since 2.10.0
|
---|
1475 | * @see https://eslint.org/docs/rules/object-property-newline
|
---|
1476 | */
|
---|
1477 | "object-property-newline": Linter.RuleEntry<
|
---|
1478 | [
|
---|
1479 | Partial<{
|
---|
1480 | /**
|
---|
1481 | * @default false
|
---|
1482 | */
|
---|
1483 | allowAllPropertiesOnSameLine: boolean;
|
---|
1484 | }>,
|
---|
1485 | ]
|
---|
1486 | >;
|
---|
1487 |
|
---|
1488 | /**
|
---|
1489 | * Rule to enforce variables to be declared either together or separately in functions.
|
---|
1490 | *
|
---|
1491 | * @since 0.0.9
|
---|
1492 | * @see https://eslint.org/docs/rules/one-var
|
---|
1493 | */
|
---|
1494 | "one-var": Linter.RuleEntry<
|
---|
1495 | [
|
---|
1496 | | "always"
|
---|
1497 | | "never"
|
---|
1498 | | "consecutive"
|
---|
1499 | | Partial<
|
---|
1500 | {
|
---|
1501 | /**
|
---|
1502 | * @default false
|
---|
1503 | */
|
---|
1504 | separateRequires: boolean;
|
---|
1505 | } & Record<"var" | "let" | "const", "always" | "never" | "consecutive">
|
---|
1506 | >
|
---|
1507 | | Partial<Record<"initialized" | "uninitialized", "always" | "never" | "consecutive">>,
|
---|
1508 | ]
|
---|
1509 | >;
|
---|
1510 |
|
---|
1511 | /**
|
---|
1512 | * Rule to require or disallow newlines around variable declarations.
|
---|
1513 | *
|
---|
1514 | * @since 2.0.0-beta.3
|
---|
1515 | * @see https://eslint.org/docs/rules/one-var-declaration-per-line
|
---|
1516 | */
|
---|
1517 | "one-var-declaration-per-line": Linter.RuleEntry<["initializations" | "always"]>;
|
---|
1518 |
|
---|
1519 | /**
|
---|
1520 | * Rule to require or disallow assignment operator shorthand where possible.
|
---|
1521 | *
|
---|
1522 | * @since 0.10.0
|
---|
1523 | * @see https://eslint.org/docs/rules/operator-assignment
|
---|
1524 | */
|
---|
1525 | "operator-assignment": Linter.RuleEntry<["always" | "never"]>;
|
---|
1526 |
|
---|
1527 | /**
|
---|
1528 | * Rule to enforce consistent linebreak style for operators.
|
---|
1529 | *
|
---|
1530 | * @since 0.19.0
|
---|
1531 | * @see https://eslint.org/docs/rules/operator-linebreak
|
---|
1532 | */
|
---|
1533 | "operator-linebreak": Linter.RuleEntry<
|
---|
1534 | [
|
---|
1535 | "after" | "before" | "none",
|
---|
1536 | Partial<{
|
---|
1537 | overrides: Record<string, "after" | "before" | "none">;
|
---|
1538 | }>,
|
---|
1539 | ]
|
---|
1540 | >;
|
---|
1541 |
|
---|
1542 | /**
|
---|
1543 | * Rule to require or disallow padding within blocks.
|
---|
1544 | *
|
---|
1545 | * @since 0.9.0
|
---|
1546 | * @see https://eslint.org/docs/rules/padded-blocks
|
---|
1547 | */
|
---|
1548 | "padded-blocks": Linter.RuleEntry<
|
---|
1549 | [
|
---|
1550 | "always" | "never" | Partial<Record<"blocks" | "classes" | "switches", "always" | "never">>,
|
---|
1551 | {
|
---|
1552 | /**
|
---|
1553 | * @default false
|
---|
1554 | */
|
---|
1555 | allowSingleLineBlocks: boolean;
|
---|
1556 | },
|
---|
1557 | ]
|
---|
1558 | >;
|
---|
1559 |
|
---|
1560 | /**
|
---|
1561 | * Rule to require or disallow padding lines between statements.
|
---|
1562 | *
|
---|
1563 | * @since 4.0.0-beta.0
|
---|
1564 | * @see https://eslint.org/docs/rules/padding-line-between-statements
|
---|
1565 | */
|
---|
1566 | "padding-line-between-statements": Linter.RuleEntry<
|
---|
1567 | [
|
---|
1568 | ...Array<
|
---|
1569 | {
|
---|
1570 | blankLine: "any" | "never" | "always";
|
---|
1571 | } & Record<"prev" | "next", string | string[]>
|
---|
1572 | >
|
---|
1573 | ]
|
---|
1574 | >;
|
---|
1575 |
|
---|
1576 | /**
|
---|
1577 | * Rule to disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.
|
---|
1578 | *
|
---|
1579 | * @since 5.0.0-alpha.3
|
---|
1580 | * @see https://eslint.org/docs/rules/prefer-object-spread
|
---|
1581 | */
|
---|
1582 | "prefer-object-spread": Linter.RuleEntry<[]>;
|
---|
1583 |
|
---|
1584 | /**
|
---|
1585 | * Rule to require quotes around object literal property names.
|
---|
1586 | *
|
---|
1587 | * @since 0.0.6
|
---|
1588 | * @see https://eslint.org/docs/rules/quote-props
|
---|
1589 | */
|
---|
1590 | "quote-props":
|
---|
1591 | | Linter.RuleEntry<["always" | "consistent"]>
|
---|
1592 | | Linter.RuleEntry<
|
---|
1593 | [
|
---|
1594 | "as-needed",
|
---|
1595 | Partial<{
|
---|
1596 | /**
|
---|
1597 | * @default false
|
---|
1598 | */
|
---|
1599 | keywords: boolean;
|
---|
1600 | /**
|
---|
1601 | * @default true
|
---|
1602 | */
|
---|
1603 | unnecessary: boolean;
|
---|
1604 | /**
|
---|
1605 | * @default false
|
---|
1606 | */
|
---|
1607 | numbers: boolean;
|
---|
1608 | }>,
|
---|
1609 | ]
|
---|
1610 | >
|
---|
1611 | | Linter.RuleEntry<
|
---|
1612 | [
|
---|
1613 | "consistent-as-needed",
|
---|
1614 | Partial<{
|
---|
1615 | /**
|
---|
1616 | * @default false
|
---|
1617 | */
|
---|
1618 | keywords: boolean;
|
---|
1619 | }>,
|
---|
1620 | ]
|
---|
1621 | >;
|
---|
1622 |
|
---|
1623 | /**
|
---|
1624 | * Rule to enforce the consistent use of either backticks, double, or single quotes.
|
---|
1625 | *
|
---|
1626 | * @since 0.0.7
|
---|
1627 | * @see https://eslint.org/docs/rules/quotes
|
---|
1628 | */
|
---|
1629 | quotes: Linter.RuleEntry<
|
---|
1630 | [
|
---|
1631 | "double" | "single" | "backtick",
|
---|
1632 | Partial<{
|
---|
1633 | /**
|
---|
1634 | * @default false
|
---|
1635 | */
|
---|
1636 | avoidEscape: boolean;
|
---|
1637 | /**
|
---|
1638 | * @default false
|
---|
1639 | */
|
---|
1640 | allowTemplateLiterals: boolean;
|
---|
1641 | }>,
|
---|
1642 | ]
|
---|
1643 | >;
|
---|
1644 |
|
---|
1645 | /**
|
---|
1646 | * Rule to require or disallow semicolons instead of ASI.
|
---|
1647 | *
|
---|
1648 | * @since 0.0.6
|
---|
1649 | * @see https://eslint.org/docs/rules/semi
|
---|
1650 | */
|
---|
1651 | semi:
|
---|
1652 | | Linter.RuleEntry<
|
---|
1653 | [
|
---|
1654 | "always",
|
---|
1655 | Partial<{
|
---|
1656 | /**
|
---|
1657 | * @default false
|
---|
1658 | */
|
---|
1659 | omitLastInOneLineBlock: boolean;
|
---|
1660 | }>,
|
---|
1661 | ]
|
---|
1662 | >
|
---|
1663 | | Linter.RuleEntry<
|
---|
1664 | [
|
---|
1665 | "never",
|
---|
1666 | Partial<{
|
---|
1667 | /**
|
---|
1668 | * @default 'any'
|
---|
1669 | */
|
---|
1670 | beforeStatementContinuationChars: "any" | "always" | "never";
|
---|
1671 | }>,
|
---|
1672 | ]
|
---|
1673 | >;
|
---|
1674 |
|
---|
1675 | /**
|
---|
1676 | * Rule to enforce consistent spacing before and after semicolons.
|
---|
1677 | *
|
---|
1678 | * @since 0.16.0
|
---|
1679 | * @see https://eslint.org/docs/rules/semi-spacing
|
---|
1680 | */
|
---|
1681 | "semi-spacing": Linter.RuleEntry<
|
---|
1682 | [
|
---|
1683 | Partial<{
|
---|
1684 | /**
|
---|
1685 | * @default false
|
---|
1686 | */
|
---|
1687 | before: boolean;
|
---|
1688 | /**
|
---|
1689 | * @default true
|
---|
1690 | */
|
---|
1691 | after: boolean;
|
---|
1692 | }>,
|
---|
1693 | ]
|
---|
1694 | >;
|
---|
1695 |
|
---|
1696 | /**
|
---|
1697 | * Rule to enforce location of semicolons.
|
---|
1698 | *
|
---|
1699 | * @since 4.0.0-beta.0
|
---|
1700 | * @see https://eslint.org/docs/rules/semi-style
|
---|
1701 | */
|
---|
1702 | "semi-style": Linter.RuleEntry<["last" | "first"]>;
|
---|
1703 |
|
---|
1704 | /**
|
---|
1705 | * Rule to require object keys to be sorted.
|
---|
1706 | *
|
---|
1707 | * @since 3.3.0
|
---|
1708 | * @see https://eslint.org/docs/rules/sort-keys
|
---|
1709 | */
|
---|
1710 | "sort-keys": Linter.RuleEntry<
|
---|
1711 | [
|
---|
1712 | "asc" | "desc",
|
---|
1713 | Partial<{
|
---|
1714 | /**
|
---|
1715 | * @default true
|
---|
1716 | */
|
---|
1717 | caseSensitive: boolean;
|
---|
1718 | /**
|
---|
1719 | * @default 2
|
---|
1720 | */
|
---|
1721 | minKeys: number;
|
---|
1722 | /**
|
---|
1723 | * @default false
|
---|
1724 | */
|
---|
1725 | natural: boolean;
|
---|
1726 | }>,
|
---|
1727 | ]
|
---|
1728 | >;
|
---|
1729 |
|
---|
1730 | /**
|
---|
1731 | * Rule to require variables within the same declaration block to be sorted.
|
---|
1732 | *
|
---|
1733 | * @since 0.2.0
|
---|
1734 | * @see https://eslint.org/docs/rules/sort-vars
|
---|
1735 | */
|
---|
1736 | "sort-vars": Linter.RuleEntry<
|
---|
1737 | [
|
---|
1738 | Partial<{
|
---|
1739 | /**
|
---|
1740 | * @default false
|
---|
1741 | */
|
---|
1742 | ignoreCase: boolean;
|
---|
1743 | }>,
|
---|
1744 | ]
|
---|
1745 | >;
|
---|
1746 |
|
---|
1747 | /**
|
---|
1748 | * Rule to enforce consistent spacing before blocks.
|
---|
1749 | *
|
---|
1750 | * @since 0.9.0
|
---|
1751 | * @see https://eslint.org/docs/rules/space-before-blocks
|
---|
1752 | */
|
---|
1753 | "space-before-blocks": Linter.RuleEntry<
|
---|
1754 | ["always" | "never" | Partial<Record<"functions" | "keywords" | "classes", "always" | "never" | "off">>]
|
---|
1755 | >;
|
---|
1756 |
|
---|
1757 | /**
|
---|
1758 | * Rule to enforce consistent spacing before `function` definition opening parenthesis.
|
---|
1759 | *
|
---|
1760 | * @since 0.18.0
|
---|
1761 | * @see https://eslint.org/docs/rules/space-before-function-paren
|
---|
1762 | */
|
---|
1763 | "space-before-function-paren": Linter.RuleEntry<
|
---|
1764 | ["always" | "never" | Partial<Record<"anonymous" | "named" | "asyncArrow", "always" | "never" | "ignore">>]
|
---|
1765 | >;
|
---|
1766 |
|
---|
1767 | /**
|
---|
1768 | * Rule to enforce consistent spacing inside parentheses.
|
---|
1769 | *
|
---|
1770 | * @since 0.8.0
|
---|
1771 | * @see https://eslint.org/docs/rules/space-in-parens
|
---|
1772 | */
|
---|
1773 | "space-in-parens": Linter.RuleEntry<
|
---|
1774 | [
|
---|
1775 | "never" | "always",
|
---|
1776 | Partial<{
|
---|
1777 | exceptions: string[];
|
---|
1778 | }>,
|
---|
1779 | ]
|
---|
1780 | >;
|
---|
1781 |
|
---|
1782 | /**
|
---|
1783 | * Rule to require spacing around infix operators.
|
---|
1784 | *
|
---|
1785 | * @since 0.2.0
|
---|
1786 | * @see https://eslint.org/docs/rules/space-infix-ops
|
---|
1787 | */
|
---|
1788 | "space-infix-ops": Linter.RuleEntry<
|
---|
1789 | [
|
---|
1790 | Partial<{
|
---|
1791 | /**
|
---|
1792 | * @default false
|
---|
1793 | */
|
---|
1794 | int32Hint: boolean;
|
---|
1795 | }>,
|
---|
1796 | ]
|
---|
1797 | >;
|
---|
1798 |
|
---|
1799 | /**
|
---|
1800 | * Rule to enforce consistent spacing before or after unary operators.
|
---|
1801 | *
|
---|
1802 | * @since 0.10.0
|
---|
1803 | * @see https://eslint.org/docs/rules/space-unary-ops
|
---|
1804 | */
|
---|
1805 | "space-unary-ops": Linter.RuleEntry<
|
---|
1806 | [
|
---|
1807 | Partial<{
|
---|
1808 | /**
|
---|
1809 | * @default true
|
---|
1810 | */
|
---|
1811 | words: boolean;
|
---|
1812 | /**
|
---|
1813 | * @default false
|
---|
1814 | */
|
---|
1815 | nonwords: boolean;
|
---|
1816 | overrides: Record<string, boolean>;
|
---|
1817 | }>,
|
---|
1818 | ]
|
---|
1819 | >;
|
---|
1820 |
|
---|
1821 | /**
|
---|
1822 | * Rule to enforce consistent spacing after the `//` or `/*` in a comment.
|
---|
1823 | *
|
---|
1824 | * @since 0.23.0
|
---|
1825 | * @see https://eslint.org/docs/rules/spaced-comment
|
---|
1826 | */
|
---|
1827 | "spaced-comment": Linter.RuleEntry<
|
---|
1828 | [
|
---|
1829 | "always" | "never",
|
---|
1830 | {
|
---|
1831 | exceptions: string[];
|
---|
1832 | markers: string[];
|
---|
1833 | line: {
|
---|
1834 | exceptions: string[];
|
---|
1835 | markers: string[];
|
---|
1836 | };
|
---|
1837 | block: {
|
---|
1838 | exceptions: string[];
|
---|
1839 | markers: string[];
|
---|
1840 | /**
|
---|
1841 | * @default false
|
---|
1842 | */
|
---|
1843 | balanced: boolean;
|
---|
1844 | };
|
---|
1845 | },
|
---|
1846 | ]
|
---|
1847 | >;
|
---|
1848 |
|
---|
1849 | /**
|
---|
1850 | * Rule to enforce spacing around colons of switch statements.
|
---|
1851 | *
|
---|
1852 | * @since 4.0.0-beta.0
|
---|
1853 | * @see https://eslint.org/docs/rules/switch-colon-spacing
|
---|
1854 | */
|
---|
1855 | "switch-colon-spacing": Linter.RuleEntry<
|
---|
1856 | [
|
---|
1857 | Partial<{
|
---|
1858 | /**
|
---|
1859 | * @default false
|
---|
1860 | */
|
---|
1861 | before: boolean;
|
---|
1862 | /**
|
---|
1863 | * @default true
|
---|
1864 | */
|
---|
1865 | after: boolean;
|
---|
1866 | }>,
|
---|
1867 | ]
|
---|
1868 | >;
|
---|
1869 |
|
---|
1870 | /**
|
---|
1871 | * Rule to require or disallow spacing between template tags and their literals.
|
---|
1872 | *
|
---|
1873 | * @since 3.15.0
|
---|
1874 | * @see https://eslint.org/docs/rules/template-tag-spacing
|
---|
1875 | */
|
---|
1876 | "template-tag-spacing": Linter.RuleEntry<["never" | "always"]>;
|
---|
1877 |
|
---|
1878 | /**
|
---|
1879 | * Rule to require or disallow Unicode byte order mark (BOM).
|
---|
1880 | *
|
---|
1881 | * @since 2.11.0
|
---|
1882 | * @see https://eslint.org/docs/rules/unicode-bom
|
---|
1883 | */
|
---|
1884 | "unicode-bom": Linter.RuleEntry<["never" | "always"]>;
|
---|
1885 |
|
---|
1886 | /**
|
---|
1887 | * Rule to require parenthesis around regex literals.
|
---|
1888 | *
|
---|
1889 | * @since 0.1.0
|
---|
1890 | * @see https://eslint.org/docs/rules/wrap-regex
|
---|
1891 | */
|
---|
1892 | "wrap-regex": Linter.RuleEntry<[]>;
|
---|
1893 | }
|
---|