@biomejs/wasm-nodejs 1.5.3-nightly.dca6a7a → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/biome_wasm.d.ts +491 -353
- package/biome_wasm.js +23 -23
- package/biome_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/biome_wasm.d.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
export function main(): void;
|
|
6
6
|
interface SupportsFeatureParams {
|
|
7
7
|
feature: FeatureName[];
|
|
8
|
-
path:
|
|
8
|
+
path: BiomePath;
|
|
9
9
|
}
|
|
10
10
|
type FeatureName = "Format" | "Lint" | "OrganizeImports";
|
|
11
|
-
interface
|
|
11
|
+
interface BiomePath {
|
|
12
12
|
path: string;
|
|
13
13
|
}
|
|
14
14
|
interface SupportsFeatureResult {
|
|
@@ -357,6 +357,10 @@ interface PartialJsonFormatter {
|
|
|
357
357
|
* What's the max width of a line applied to JSON (and its super languages) files. Defaults to 80.
|
|
358
358
|
*/
|
|
359
359
|
lineWidth?: LineWidth;
|
|
360
|
+
/**
|
|
361
|
+
* Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "none".
|
|
362
|
+
*/
|
|
363
|
+
trailingCommas?: TrailingCommas;
|
|
360
364
|
}
|
|
361
365
|
interface PartialJsonParser {
|
|
362
366
|
/**
|
|
@@ -426,6 +430,7 @@ type ArrowParentheses = "always" | "asNeeded";
|
|
|
426
430
|
type QuoteProperties = "asNeeded" | "preserve";
|
|
427
431
|
type Semicolons = "always" | "asNeeded";
|
|
428
432
|
type TrailingComma = "all" | "es5" | "none";
|
|
433
|
+
type TrailingCommas = "none" | "all";
|
|
429
434
|
interface A11y {
|
|
430
435
|
/**
|
|
431
436
|
* It enables ALL rules for this group.
|
|
@@ -434,59 +439,59 @@ interface A11y {
|
|
|
434
439
|
/**
|
|
435
440
|
* Enforce that the accessKey attribute is not used on any HTML element.
|
|
436
441
|
*/
|
|
437
|
-
noAccessKey?:
|
|
442
|
+
noAccessKey?: RuleConfiguration_for_Null;
|
|
438
443
|
/**
|
|
439
444
|
* Enforce that aria-hidden="true" is not set on focusable elements.
|
|
440
445
|
*/
|
|
441
|
-
noAriaHiddenOnFocusable?:
|
|
446
|
+
noAriaHiddenOnFocusable?: RuleConfiguration_for_Null;
|
|
442
447
|
/**
|
|
443
448
|
* Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
|
|
444
449
|
*/
|
|
445
|
-
noAriaUnsupportedElements?:
|
|
450
|
+
noAriaUnsupportedElements?: RuleConfiguration_for_Null;
|
|
446
451
|
/**
|
|
447
452
|
* Enforce that autoFocus prop is not used on elements.
|
|
448
453
|
*/
|
|
449
|
-
noAutofocus?:
|
|
454
|
+
noAutofocus?: RuleConfiguration_for_Null;
|
|
450
455
|
/**
|
|
451
456
|
* Disallow target="_blank" attribute without rel="noreferrer"
|
|
452
457
|
*/
|
|
453
|
-
noBlankTarget?:
|
|
458
|
+
noBlankTarget?: RuleConfiguration_for_Null;
|
|
454
459
|
/**
|
|
455
460
|
* Enforces that no distracting elements are used.
|
|
456
461
|
*/
|
|
457
|
-
noDistractingElements?:
|
|
462
|
+
noDistractingElements?: RuleConfiguration_for_Null;
|
|
458
463
|
/**
|
|
459
464
|
* The scope prop should be used only on <th> elements.
|
|
460
465
|
*/
|
|
461
|
-
noHeaderScope?:
|
|
466
|
+
noHeaderScope?: RuleConfiguration_for_Null;
|
|
462
467
|
/**
|
|
463
468
|
* Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.
|
|
464
469
|
*/
|
|
465
|
-
noInteractiveElementToNoninteractiveRole?:
|
|
470
|
+
noInteractiveElementToNoninteractiveRole?: RuleConfiguration_for_Null;
|
|
466
471
|
/**
|
|
467
472
|
* Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.
|
|
468
473
|
*/
|
|
469
|
-
noNoninteractiveElementToInteractiveRole?:
|
|
474
|
+
noNoninteractiveElementToInteractiveRole?: RuleConfiguration_for_Null;
|
|
470
475
|
/**
|
|
471
476
|
* Enforce that tabIndex is not assigned to non-interactive HTML elements.
|
|
472
477
|
*/
|
|
473
|
-
noNoninteractiveTabindex?:
|
|
478
|
+
noNoninteractiveTabindex?: RuleConfiguration_for_Null;
|
|
474
479
|
/**
|
|
475
480
|
* Prevent the usage of positive integers on tabIndex property
|
|
476
481
|
*/
|
|
477
|
-
noPositiveTabindex?:
|
|
482
|
+
noPositiveTabindex?: RuleConfiguration_for_Null;
|
|
478
483
|
/**
|
|
479
484
|
* Enforce img alt prop does not contain the word "image", "picture", or "photo".
|
|
480
485
|
*/
|
|
481
|
-
noRedundantAlt?:
|
|
486
|
+
noRedundantAlt?: RuleConfiguration_for_Null;
|
|
482
487
|
/**
|
|
483
488
|
* Enforce explicit role property is not the same as implicit/default role property on an element.
|
|
484
489
|
*/
|
|
485
|
-
noRedundantRoles?:
|
|
490
|
+
noRedundantRoles?: RuleConfiguration_for_Null;
|
|
486
491
|
/**
|
|
487
492
|
* Enforces the usage of the title element for the svg element.
|
|
488
493
|
*/
|
|
489
|
-
noSvgWithoutTitle?:
|
|
494
|
+
noSvgWithoutTitle?: RuleConfiguration_for_Null;
|
|
490
495
|
/**
|
|
491
496
|
* It enables the recommended rules for this group
|
|
492
497
|
*/
|
|
@@ -494,67 +499,67 @@ interface A11y {
|
|
|
494
499
|
/**
|
|
495
500
|
* Enforce that all elements that require alternative text have meaningful information to relay back to the end user.
|
|
496
501
|
*/
|
|
497
|
-
useAltText?:
|
|
502
|
+
useAltText?: RuleConfiguration_for_Null;
|
|
498
503
|
/**
|
|
499
504
|
* Enforce that anchors have content and that the content is accessible to screen readers.
|
|
500
505
|
*/
|
|
501
|
-
useAnchorContent?:
|
|
506
|
+
useAnchorContent?: RuleConfiguration_for_Null;
|
|
502
507
|
/**
|
|
503
508
|
* Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.
|
|
504
509
|
*/
|
|
505
|
-
useAriaActivedescendantWithTabindex?:
|
|
510
|
+
useAriaActivedescendantWithTabindex?: RuleConfiguration_for_Null;
|
|
506
511
|
/**
|
|
507
512
|
* Enforce that elements with ARIA roles must have all required ARIA attributes for that role.
|
|
508
513
|
*/
|
|
509
|
-
useAriaPropsForRole?:
|
|
514
|
+
useAriaPropsForRole?: RuleConfiguration_for_Null;
|
|
510
515
|
/**
|
|
511
516
|
* Enforces the usage of the attribute type for the element button
|
|
512
517
|
*/
|
|
513
|
-
useButtonType?:
|
|
518
|
+
useButtonType?: RuleConfiguration_for_Null;
|
|
514
519
|
/**
|
|
515
520
|
* Enforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers. Accessible means that it is not hidden using the aria-hidden prop.
|
|
516
521
|
*/
|
|
517
|
-
useHeadingContent?:
|
|
522
|
+
useHeadingContent?: RuleConfiguration_for_Null;
|
|
518
523
|
/**
|
|
519
524
|
* Enforce that html element has lang attribute.
|
|
520
525
|
*/
|
|
521
|
-
useHtmlLang?:
|
|
526
|
+
useHtmlLang?: RuleConfiguration_for_Null;
|
|
522
527
|
/**
|
|
523
528
|
* Enforces the usage of the attribute title for the element iframe.
|
|
524
529
|
*/
|
|
525
|
-
useIframeTitle?:
|
|
530
|
+
useIframeTitle?: RuleConfiguration_for_Null;
|
|
526
531
|
/**
|
|
527
532
|
* Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.
|
|
528
533
|
*/
|
|
529
|
-
useKeyWithClickEvents?:
|
|
534
|
+
useKeyWithClickEvents?: RuleConfiguration_for_Null;
|
|
530
535
|
/**
|
|
531
536
|
* Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.
|
|
532
537
|
*/
|
|
533
|
-
useKeyWithMouseEvents?:
|
|
538
|
+
useKeyWithMouseEvents?: RuleConfiguration_for_Null;
|
|
534
539
|
/**
|
|
535
540
|
* Enforces that audio and video elements must have a track for captions.
|
|
536
541
|
*/
|
|
537
|
-
useMediaCaption?:
|
|
542
|
+
useMediaCaption?: RuleConfiguration_for_Null;
|
|
538
543
|
/**
|
|
539
544
|
* Enforce that all anchors are valid, and they are navigable elements.
|
|
540
545
|
*/
|
|
541
|
-
useValidAnchor?:
|
|
546
|
+
useValidAnchor?: RuleConfiguration_for_Null;
|
|
542
547
|
/**
|
|
543
548
|
* Ensures that ARIA properties aria-* are all valid.
|
|
544
549
|
*/
|
|
545
|
-
useValidAriaProps?:
|
|
550
|
+
useValidAriaProps?: RuleConfiguration_for_Null;
|
|
546
551
|
/**
|
|
547
552
|
* Elements with ARIA roles must use a valid, non-abstract ARIA role.
|
|
548
553
|
*/
|
|
549
|
-
useValidAriaRole?:
|
|
554
|
+
useValidAriaRole?: RuleConfiguration_for_ValidAriaRoleOptions;
|
|
550
555
|
/**
|
|
551
556
|
* Enforce that ARIA state and property values are valid.
|
|
552
557
|
*/
|
|
553
|
-
useValidAriaValues?:
|
|
558
|
+
useValidAriaValues?: RuleConfiguration_for_Null;
|
|
554
559
|
/**
|
|
555
560
|
* Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.
|
|
556
561
|
*/
|
|
557
|
-
useValidLang?:
|
|
562
|
+
useValidLang?: RuleConfiguration_for_Null;
|
|
558
563
|
}
|
|
559
564
|
interface Complexity {
|
|
560
565
|
/**
|
|
@@ -564,75 +569,83 @@ interface Complexity {
|
|
|
564
569
|
/**
|
|
565
570
|
* Disallow primitive type aliases and misleading types.
|
|
566
571
|
*/
|
|
567
|
-
noBannedTypes?:
|
|
572
|
+
noBannedTypes?: RuleConfiguration_for_Null;
|
|
573
|
+
/**
|
|
574
|
+
* Disallow empty type parameters in type aliases and interfaces.
|
|
575
|
+
*/
|
|
576
|
+
noEmptyTypeParameters?: RuleConfiguration_for_Null;
|
|
568
577
|
/**
|
|
569
578
|
* Disallow functions that exceed a given Cognitive Complexity score.
|
|
570
579
|
*/
|
|
571
|
-
noExcessiveCognitiveComplexity?:
|
|
580
|
+
noExcessiveCognitiveComplexity?: RuleConfiguration_for_ComplexityOptions;
|
|
572
581
|
/**
|
|
573
582
|
* Disallow unnecessary boolean casts
|
|
574
583
|
*/
|
|
575
|
-
noExtraBooleanCast?:
|
|
584
|
+
noExtraBooleanCast?: RuleConfiguration_for_Null;
|
|
576
585
|
/**
|
|
577
586
|
* Prefer for...of statement instead of Array.forEach.
|
|
578
587
|
*/
|
|
579
|
-
noForEach?:
|
|
588
|
+
noForEach?: RuleConfiguration_for_Null;
|
|
580
589
|
/**
|
|
581
590
|
* Disallow unclear usage of consecutive space characters in regular expression literals
|
|
582
591
|
*/
|
|
583
|
-
noMultipleSpacesInRegularExpressionLiterals?:
|
|
592
|
+
noMultipleSpacesInRegularExpressionLiterals?: RuleConfiguration_for_Null;
|
|
584
593
|
/**
|
|
585
594
|
* This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
|
|
586
595
|
*/
|
|
587
|
-
noStaticOnlyClass?:
|
|
596
|
+
noStaticOnlyClass?: RuleConfiguration_for_Null;
|
|
588
597
|
/**
|
|
589
598
|
* Disallow this and super in static contexts.
|
|
590
599
|
*/
|
|
591
|
-
noThisInStatic?:
|
|
600
|
+
noThisInStatic?: RuleConfiguration_for_Null;
|
|
592
601
|
/**
|
|
593
602
|
* Disallow unnecessary catch clauses.
|
|
594
603
|
*/
|
|
595
|
-
noUselessCatch?:
|
|
604
|
+
noUselessCatch?: RuleConfiguration_for_Null;
|
|
596
605
|
/**
|
|
597
606
|
* Disallow unnecessary constructors.
|
|
598
607
|
*/
|
|
599
|
-
noUselessConstructor?:
|
|
608
|
+
noUselessConstructor?: RuleConfiguration_for_Null;
|
|
600
609
|
/**
|
|
601
610
|
* Disallow empty exports that don't change anything in a module file.
|
|
602
611
|
*/
|
|
603
|
-
noUselessEmptyExport?:
|
|
612
|
+
noUselessEmptyExport?: RuleConfiguration_for_Null;
|
|
604
613
|
/**
|
|
605
614
|
* Disallow unnecessary fragments
|
|
606
615
|
*/
|
|
607
|
-
noUselessFragments?:
|
|
616
|
+
noUselessFragments?: RuleConfiguration_for_Null;
|
|
608
617
|
/**
|
|
609
618
|
* Disallow unnecessary labels.
|
|
610
619
|
*/
|
|
611
|
-
noUselessLabel?:
|
|
620
|
+
noUselessLabel?: RuleConfiguration_for_Null;
|
|
621
|
+
/**
|
|
622
|
+
* Disallow unnecessary nested block statements.
|
|
623
|
+
*/
|
|
624
|
+
noUselessLoneBlockStatements?: RuleConfiguration_for_Null;
|
|
612
625
|
/**
|
|
613
626
|
* Disallow renaming import, export, and destructured assignments to the same name.
|
|
614
627
|
*/
|
|
615
|
-
noUselessRename?:
|
|
628
|
+
noUselessRename?: RuleConfiguration_for_Null;
|
|
616
629
|
/**
|
|
617
630
|
* Disallow useless case in switch statements.
|
|
618
631
|
*/
|
|
619
|
-
noUselessSwitchCase?:
|
|
632
|
+
noUselessSwitchCase?: RuleConfiguration_for_Null;
|
|
620
633
|
/**
|
|
621
634
|
* Disallow useless this aliasing.
|
|
622
635
|
*/
|
|
623
|
-
noUselessThisAlias?:
|
|
636
|
+
noUselessThisAlias?: RuleConfiguration_for_Null;
|
|
624
637
|
/**
|
|
625
638
|
* Disallow using any or unknown as type constraint.
|
|
626
639
|
*/
|
|
627
|
-
noUselessTypeConstraint?:
|
|
640
|
+
noUselessTypeConstraint?: RuleConfiguration_for_Null;
|
|
628
641
|
/**
|
|
629
642
|
* Disallow the use of void operators, which is not a familiar operator.
|
|
630
643
|
*/
|
|
631
|
-
noVoid?:
|
|
644
|
+
noVoid?: RuleConfiguration_for_Null;
|
|
632
645
|
/**
|
|
633
646
|
* Disallow with statements in non-strict contexts.
|
|
634
647
|
*/
|
|
635
|
-
noWith?:
|
|
648
|
+
noWith?: RuleConfiguration_for_Null;
|
|
636
649
|
/**
|
|
637
650
|
* It enables the recommended rules for this group
|
|
638
651
|
*/
|
|
@@ -640,31 +653,31 @@ interface Complexity {
|
|
|
640
653
|
/**
|
|
641
654
|
* Use arrow functions over function expressions.
|
|
642
655
|
*/
|
|
643
|
-
useArrowFunction?:
|
|
656
|
+
useArrowFunction?: RuleConfiguration_for_Null;
|
|
644
657
|
/**
|
|
645
658
|
* Promotes the use of .flatMap() when map().flat() are used together.
|
|
646
659
|
*/
|
|
647
|
-
useFlatMap?:
|
|
660
|
+
useFlatMap?: RuleConfiguration_for_Null;
|
|
648
661
|
/**
|
|
649
662
|
* Enforce the usage of a literal access to properties over computed property access.
|
|
650
663
|
*/
|
|
651
|
-
useLiteralKeys?:
|
|
664
|
+
useLiteralKeys?: RuleConfiguration_for_Null;
|
|
652
665
|
/**
|
|
653
666
|
* Enforce using concise optional chain instead of chained logical expressions.
|
|
654
667
|
*/
|
|
655
|
-
useOptionalChain?:
|
|
668
|
+
useOptionalChain?: RuleConfiguration_for_Null;
|
|
656
669
|
/**
|
|
657
670
|
* Enforce the use of the regular expression literals instead of the RegExp constructor if possible.
|
|
658
671
|
*/
|
|
659
|
-
useRegexLiterals?:
|
|
672
|
+
useRegexLiterals?: RuleConfiguration_for_Null;
|
|
660
673
|
/**
|
|
661
674
|
* Disallow number literal object member names which are not base10 or uses underscore as separator
|
|
662
675
|
*/
|
|
663
|
-
useSimpleNumberKeys?:
|
|
676
|
+
useSimpleNumberKeys?: RuleConfiguration_for_Null;
|
|
664
677
|
/**
|
|
665
678
|
* Discard redundant terms from logical expressions.
|
|
666
679
|
*/
|
|
667
|
-
useSimplifiedLogicExpression?:
|
|
680
|
+
useSimplifiedLogicExpression?: RuleConfiguration_for_Null;
|
|
668
681
|
}
|
|
669
682
|
interface Correctness {
|
|
670
683
|
/**
|
|
@@ -674,115 +687,127 @@ interface Correctness {
|
|
|
674
687
|
/**
|
|
675
688
|
* Prevent passing of children as props.
|
|
676
689
|
*/
|
|
677
|
-
noChildrenProp?:
|
|
690
|
+
noChildrenProp?: RuleConfiguration_for_Null;
|
|
678
691
|
/**
|
|
679
692
|
* Prevents from having const variables being re-assigned.
|
|
680
693
|
*/
|
|
681
|
-
noConstAssign?:
|
|
694
|
+
noConstAssign?: RuleConfiguration_for_Null;
|
|
682
695
|
/**
|
|
683
696
|
* Disallow constant expressions in conditions
|
|
684
697
|
*/
|
|
685
|
-
noConstantCondition?:
|
|
698
|
+
noConstantCondition?: RuleConfiguration_for_Null;
|
|
686
699
|
/**
|
|
687
700
|
* Disallow returning a value from a constructor.
|
|
688
701
|
*/
|
|
689
|
-
noConstructorReturn?:
|
|
702
|
+
noConstructorReturn?: RuleConfiguration_for_Null;
|
|
690
703
|
/**
|
|
691
704
|
* Disallow empty character classes in regular expression literals.
|
|
692
705
|
*/
|
|
693
|
-
noEmptyCharacterClassInRegex?:
|
|
706
|
+
noEmptyCharacterClassInRegex?: RuleConfiguration_for_Null;
|
|
694
707
|
/**
|
|
695
708
|
* Disallows empty destructuring patterns.
|
|
696
709
|
*/
|
|
697
|
-
noEmptyPattern?:
|
|
710
|
+
noEmptyPattern?: RuleConfiguration_for_Null;
|
|
698
711
|
/**
|
|
699
712
|
* Disallow calling global object properties as functions
|
|
700
713
|
*/
|
|
701
|
-
noGlobalObjectCalls?:
|
|
714
|
+
noGlobalObjectCalls?: RuleConfiguration_for_Null;
|
|
702
715
|
/**
|
|
703
716
|
* Disallow function and var declarations that are accessible outside their block.
|
|
704
717
|
*/
|
|
705
|
-
noInnerDeclarations?:
|
|
718
|
+
noInnerDeclarations?: RuleConfiguration_for_Null;
|
|
706
719
|
/**
|
|
707
720
|
* Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.
|
|
708
721
|
*/
|
|
709
|
-
noInvalidConstructorSuper?:
|
|
722
|
+
noInvalidConstructorSuper?: RuleConfiguration_for_Null;
|
|
710
723
|
/**
|
|
711
724
|
* Disallow new operators with global non-constructor functions.
|
|
712
725
|
*/
|
|
713
|
-
noInvalidNewBuiltin?:
|
|
726
|
+
noInvalidNewBuiltin?: RuleConfiguration_for_Null;
|
|
727
|
+
/**
|
|
728
|
+
* Disallow the use of variables and function parameters before their declaration
|
|
729
|
+
*/
|
|
730
|
+
noInvalidUseBeforeDeclaration?: RuleConfiguration_for_Null;
|
|
714
731
|
/**
|
|
715
732
|
* Disallow new operators with the Symbol object.
|
|
716
733
|
*/
|
|
717
|
-
noNewSymbol?:
|
|
734
|
+
noNewSymbol?: RuleConfiguration_for_Null;
|
|
718
735
|
/**
|
|
719
736
|
* Disallow \8 and \9 escape sequences in string literals.
|
|
720
737
|
*/
|
|
721
|
-
noNonoctalDecimalEscape?:
|
|
738
|
+
noNonoctalDecimalEscape?: RuleConfiguration_for_Null;
|
|
722
739
|
/**
|
|
723
740
|
* Disallow literal numbers that lose precision
|
|
724
741
|
*/
|
|
725
|
-
noPrecisionLoss?:
|
|
742
|
+
noPrecisionLoss?: RuleConfiguration_for_Null;
|
|
726
743
|
/**
|
|
727
744
|
* Prevent the usage of the return value of React.render.
|
|
728
745
|
*/
|
|
729
|
-
noRenderReturnValue?:
|
|
746
|
+
noRenderReturnValue?: RuleConfiguration_for_Null;
|
|
730
747
|
/**
|
|
731
748
|
* Disallow assignments where both sides are exactly the same.
|
|
732
749
|
*/
|
|
733
|
-
noSelfAssign?:
|
|
750
|
+
noSelfAssign?: RuleConfiguration_for_Null;
|
|
734
751
|
/**
|
|
735
752
|
* Disallow returning a value from a setter
|
|
736
753
|
*/
|
|
737
|
-
noSetterReturn?:
|
|
754
|
+
noSetterReturn?: RuleConfiguration_for_Null;
|
|
738
755
|
/**
|
|
739
756
|
* Disallow comparison of expressions modifying the string case with non-compliant value.
|
|
740
757
|
*/
|
|
741
|
-
noStringCaseMismatch?:
|
|
758
|
+
noStringCaseMismatch?: RuleConfiguration_for_Null;
|
|
742
759
|
/**
|
|
743
760
|
* Disallow lexical declarations in switch clauses.
|
|
744
761
|
*/
|
|
745
|
-
noSwitchDeclarations?:
|
|
762
|
+
noSwitchDeclarations?: RuleConfiguration_for_Null;
|
|
746
763
|
/**
|
|
747
764
|
* Prevents the usage of variables that haven't been declared inside the document.
|
|
748
765
|
*/
|
|
749
|
-
noUndeclaredVariables?:
|
|
766
|
+
noUndeclaredVariables?: RuleConfiguration_for_Null;
|
|
750
767
|
/**
|
|
751
768
|
* Avoid using unnecessary continue.
|
|
752
769
|
*/
|
|
753
|
-
noUnnecessaryContinue?:
|
|
770
|
+
noUnnecessaryContinue?: RuleConfiguration_for_Null;
|
|
754
771
|
/**
|
|
755
772
|
* Disallow unreachable code
|
|
756
773
|
*/
|
|
757
|
-
noUnreachable?:
|
|
774
|
+
noUnreachable?: RuleConfiguration_for_Null;
|
|
758
775
|
/**
|
|
759
776
|
* Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass
|
|
760
777
|
*/
|
|
761
|
-
noUnreachableSuper?:
|
|
778
|
+
noUnreachableSuper?: RuleConfiguration_for_Null;
|
|
762
779
|
/**
|
|
763
780
|
* Disallow control flow statements in finally blocks.
|
|
764
781
|
*/
|
|
765
|
-
noUnsafeFinally?:
|
|
782
|
+
noUnsafeFinally?: RuleConfiguration_for_Null;
|
|
766
783
|
/**
|
|
767
784
|
* Disallow the use of optional chaining in contexts where the undefined value is not allowed.
|
|
768
785
|
*/
|
|
769
|
-
noUnsafeOptionalChaining?:
|
|
786
|
+
noUnsafeOptionalChaining?: RuleConfiguration_for_Null;
|
|
787
|
+
/**
|
|
788
|
+
* Disallow unused imports.
|
|
789
|
+
*/
|
|
790
|
+
noUnusedImports?: RuleConfiguration_for_Null;
|
|
770
791
|
/**
|
|
771
792
|
* Disallow unused labels.
|
|
772
793
|
*/
|
|
773
|
-
noUnusedLabels?:
|
|
794
|
+
noUnusedLabels?: RuleConfiguration_for_Null;
|
|
795
|
+
/**
|
|
796
|
+
* Disallow unused private class members
|
|
797
|
+
*/
|
|
798
|
+
noUnusedPrivateClassMembers?: RuleConfiguration_for_Null;
|
|
774
799
|
/**
|
|
775
800
|
* Disallow unused variables.
|
|
776
801
|
*/
|
|
777
|
-
noUnusedVariables?:
|
|
802
|
+
noUnusedVariables?: RuleConfiguration_for_Null;
|
|
778
803
|
/**
|
|
779
804
|
* This rules prevents void elements (AKA self-closing elements) from having children.
|
|
780
805
|
*/
|
|
781
|
-
noVoidElementsWithChildren?:
|
|
806
|
+
noVoidElementsWithChildren?: RuleConfiguration_for_Null;
|
|
782
807
|
/**
|
|
783
808
|
* Disallow returning a value from a function with the return type 'void'
|
|
784
809
|
*/
|
|
785
|
-
noVoidTypeReturn?:
|
|
810
|
+
noVoidTypeReturn?: RuleConfiguration_for_Null;
|
|
786
811
|
/**
|
|
787
812
|
* It enables the recommended rules for this group
|
|
788
813
|
*/
|
|
@@ -790,23 +815,23 @@ interface Correctness {
|
|
|
790
815
|
/**
|
|
791
816
|
* Enforce all dependencies are correctly specified in a React hook.
|
|
792
817
|
*/
|
|
793
|
-
useExhaustiveDependencies?:
|
|
818
|
+
useExhaustiveDependencies?: RuleConfiguration_for_HooksOptions;
|
|
794
819
|
/**
|
|
795
820
|
* Enforce that all React hooks are being called from the Top Level component functions.
|
|
796
821
|
*/
|
|
797
|
-
useHookAtTopLevel?:
|
|
822
|
+
useHookAtTopLevel?: RuleConfiguration_for_DeprecatedHooksOptions;
|
|
798
823
|
/**
|
|
799
824
|
* Require calls to isNaN() when checking for NaN.
|
|
800
825
|
*/
|
|
801
|
-
useIsNan?:
|
|
826
|
+
useIsNan?: RuleConfiguration_for_Null;
|
|
802
827
|
/**
|
|
803
828
|
* Enforce "for" loop update clause moving the counter in the right direction.
|
|
804
829
|
*/
|
|
805
|
-
useValidForDirection?:
|
|
830
|
+
useValidForDirection?: RuleConfiguration_for_Null;
|
|
806
831
|
/**
|
|
807
832
|
* Require generator functions to contain yield.
|
|
808
833
|
*/
|
|
809
|
-
useYield?:
|
|
834
|
+
useYield?: RuleConfiguration_for_Null;
|
|
810
835
|
}
|
|
811
836
|
interface Nursery {
|
|
812
837
|
/**
|
|
@@ -814,133 +839,85 @@ interface Nursery {
|
|
|
814
839
|
*/
|
|
815
840
|
all?: boolean;
|
|
816
841
|
/**
|
|
817
|
-
* Disallow the use of
|
|
842
|
+
* Disallow the use of barrel file.
|
|
818
843
|
*/
|
|
819
|
-
|
|
844
|
+
noBarrelFile?: RuleConfiguration_for_Null;
|
|
820
845
|
/**
|
|
821
|
-
* Disallow
|
|
846
|
+
* Disallow the use of console.
|
|
822
847
|
*/
|
|
823
|
-
|
|
848
|
+
noConsole?: RuleConfiguration_for_Null;
|
|
824
849
|
/**
|
|
825
|
-
* Disallow
|
|
850
|
+
* Disallow two keys with the same name inside a JSON object.
|
|
826
851
|
*/
|
|
827
|
-
|
|
852
|
+
noDuplicateJsonKeys?: RuleConfiguration_for_Null;
|
|
828
853
|
/**
|
|
829
|
-
*
|
|
854
|
+
* A describe block should not contain duplicate hooks.
|
|
830
855
|
*/
|
|
831
|
-
|
|
856
|
+
noDuplicateTestHooks?: RuleConfiguration_for_Null;
|
|
832
857
|
/**
|
|
833
|
-
*
|
|
858
|
+
* This rule enforces a maximum depth to nested describe() in test files.
|
|
834
859
|
*/
|
|
835
|
-
|
|
860
|
+
noExcessiveNestedTestSuites?: RuleConfiguration_for_Null;
|
|
836
861
|
/**
|
|
837
|
-
* Disallow
|
|
862
|
+
* Disallow using export or module.exports in files containing tests
|
|
838
863
|
*/
|
|
839
|
-
|
|
864
|
+
noExportsInTest?: RuleConfiguration_for_Null;
|
|
840
865
|
/**
|
|
841
|
-
* Disallow
|
|
866
|
+
* Disallow focused tests.
|
|
842
867
|
*/
|
|
843
|
-
|
|
868
|
+
noFocusedTests?: RuleConfiguration_for_Null;
|
|
844
869
|
/**
|
|
845
|
-
* Disallow the use of
|
|
870
|
+
* Disallow the use of namespace imports.
|
|
846
871
|
*/
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* Disallow characters made with multiple code points in character class syntax.
|
|
850
|
-
*/
|
|
851
|
-
noMisleadingCharacterClass?: RuleConfiguration;
|
|
872
|
+
noNamespaceImport?: RuleConfiguration_for_Null;
|
|
852
873
|
/**
|
|
853
874
|
* Forbid the use of Node.js builtin modules.
|
|
854
875
|
*/
|
|
855
|
-
noNodejsModules?:
|
|
876
|
+
noNodejsModules?: RuleConfiguration_for_Null;
|
|
856
877
|
/**
|
|
857
|
-
* Avoid re-export all
|
|
878
|
+
* Avoid re-export all.
|
|
858
879
|
*/
|
|
859
|
-
noReExportAll?:
|
|
880
|
+
noReExportAll?: RuleConfiguration_for_Null;
|
|
860
881
|
/**
|
|
861
882
|
* Disallow specified modules when loaded by import or require.
|
|
862
883
|
*/
|
|
863
|
-
noRestrictedImports?:
|
|
884
|
+
noRestrictedImports?: RuleConfiguration_for_RestrictedImportsOptions;
|
|
864
885
|
/**
|
|
865
|
-
*
|
|
886
|
+
* It detects possible "wrong" semicolons inside JSX elements.
|
|
866
887
|
*/
|
|
867
|
-
|
|
888
|
+
noSemicolonInJsx?: RuleConfiguration_for_Null;
|
|
868
889
|
/**
|
|
869
|
-
* Disallow
|
|
890
|
+
* Disallow disabled tests.
|
|
870
891
|
*/
|
|
871
|
-
|
|
892
|
+
noSkippedTests?: RuleConfiguration_for_Null;
|
|
872
893
|
/**
|
|
873
894
|
* Disallow the use of dependencies that aren't specified in the package.json.
|
|
874
895
|
*/
|
|
875
|
-
noUndeclaredDependencies?:
|
|
876
|
-
/**
|
|
877
|
-
* Disallow unused imports.
|
|
878
|
-
*/
|
|
879
|
-
noUnusedImports?: RuleConfiguration;
|
|
880
|
-
/**
|
|
881
|
-
* Disallow unused private class members
|
|
882
|
-
*/
|
|
883
|
-
noUnusedPrivateClassMembers?: RuleConfiguration;
|
|
884
|
-
/**
|
|
885
|
-
* Disallow unnecessary nested block statements.
|
|
886
|
-
*/
|
|
887
|
-
noUselessLoneBlockStatements?: RuleConfiguration;
|
|
896
|
+
noUndeclaredDependencies?: RuleConfiguration_for_Null;
|
|
888
897
|
/**
|
|
889
898
|
* Disallow ternary operators when simpler alternatives exist.
|
|
890
899
|
*/
|
|
891
|
-
noUselessTernary?:
|
|
900
|
+
noUselessTernary?: RuleConfiguration_for_Null;
|
|
892
901
|
/**
|
|
893
902
|
* It enables the recommended rules for this group
|
|
894
903
|
*/
|
|
895
904
|
recommended?: boolean;
|
|
896
|
-
/**
|
|
897
|
-
* Ensure async functions utilize await.
|
|
898
|
-
*/
|
|
899
|
-
useAwait?: RuleConfiguration;
|
|
900
|
-
/**
|
|
901
|
-
* Require consistently using either T[] or Array<T>
|
|
902
|
-
*/
|
|
903
|
-
useConsistentArrayType?: RuleConfiguration;
|
|
904
|
-
/**
|
|
905
|
-
* Promotes the use of export type for types.
|
|
906
|
-
*/
|
|
907
|
-
useExportType?: RuleConfiguration;
|
|
908
|
-
/**
|
|
909
|
-
* Enforce naming conventions for JavaScript and TypeScript filenames.
|
|
910
|
-
*/
|
|
911
|
-
useFilenamingConvention?: RuleConfiguration;
|
|
912
|
-
/**
|
|
913
|
-
* This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.
|
|
914
|
-
*/
|
|
915
|
-
useForOf?: RuleConfiguration;
|
|
916
|
-
/**
|
|
917
|
-
* Enforce the use of import type when an import only has specifiers with type qualifier.
|
|
918
|
-
*/
|
|
919
|
-
useGroupedTypeImport?: RuleConfiguration;
|
|
920
905
|
/**
|
|
921
906
|
* Disallows package private imports.
|
|
922
907
|
*/
|
|
923
|
-
useImportRestrictions?:
|
|
908
|
+
useImportRestrictions?: RuleConfiguration_for_Null;
|
|
924
909
|
/**
|
|
925
|
-
*
|
|
910
|
+
* Disallow missing key props in iterators/collection literals.
|
|
926
911
|
*/
|
|
927
|
-
|
|
912
|
+
useJsxKeyInIterable?: RuleConfiguration_for_Null;
|
|
928
913
|
/**
|
|
929
|
-
*
|
|
914
|
+
* Promotes the usage of node:assert/strict over node:assert.
|
|
930
915
|
*/
|
|
931
|
-
|
|
932
|
-
/**
|
|
933
|
-
* Use the Number properties instead of global ones.
|
|
934
|
-
*/
|
|
935
|
-
useNumberNamespace?: RuleConfiguration;
|
|
936
|
-
/**
|
|
937
|
-
* Enforce using function types instead of object type with call signatures.
|
|
938
|
-
*/
|
|
939
|
-
useShorthandFunctionType?: RuleConfiguration;
|
|
916
|
+
useNodeAssertStrict?: RuleConfiguration_for_Null;
|
|
940
917
|
/**
|
|
941
918
|
* Enforce the sorting of CSS utility classes.
|
|
942
919
|
*/
|
|
943
|
-
useSortedClasses?:
|
|
920
|
+
useSortedClasses?: RuleConfiguration_for_UtilityClassSortingOptions;
|
|
944
921
|
}
|
|
945
922
|
interface Performance {
|
|
946
923
|
/**
|
|
@@ -950,11 +927,11 @@ interface Performance {
|
|
|
950
927
|
/**
|
|
951
928
|
* Disallow the use of spread (...) syntax on accumulators.
|
|
952
929
|
*/
|
|
953
|
-
noAccumulatingSpread?:
|
|
930
|
+
noAccumulatingSpread?: RuleConfiguration_for_Null;
|
|
954
931
|
/**
|
|
955
932
|
* Disallow the use of the delete operator.
|
|
956
933
|
*/
|
|
957
|
-
noDelete?:
|
|
934
|
+
noDelete?: RuleConfiguration_for_Null;
|
|
958
935
|
/**
|
|
959
936
|
* It enables the recommended rules for this group
|
|
960
937
|
*/
|
|
@@ -968,11 +945,15 @@ interface Security {
|
|
|
968
945
|
/**
|
|
969
946
|
* Prevent the usage of dangerous JSX props
|
|
970
947
|
*/
|
|
971
|
-
noDangerouslySetInnerHtml?:
|
|
948
|
+
noDangerouslySetInnerHtml?: RuleConfiguration_for_Null;
|
|
972
949
|
/**
|
|
973
950
|
* Report when a DOM element or a component uses both children and dangerouslySetInnerHTML prop.
|
|
974
951
|
*/
|
|
975
|
-
noDangerouslySetInnerHtmlWithChildren?:
|
|
952
|
+
noDangerouslySetInnerHtmlWithChildren?: RuleConfiguration_for_Null;
|
|
953
|
+
/**
|
|
954
|
+
* Disallow the use of global eval().
|
|
955
|
+
*/
|
|
956
|
+
noGlobalEval?: RuleConfiguration_for_Null;
|
|
976
957
|
/**
|
|
977
958
|
* It enables the recommended rules for this group
|
|
978
959
|
*/
|
|
@@ -986,63 +967,63 @@ interface Style {
|
|
|
986
967
|
/**
|
|
987
968
|
* Disallow the use of arguments.
|
|
988
969
|
*/
|
|
989
|
-
noArguments?:
|
|
970
|
+
noArguments?: RuleConfiguration_for_Null;
|
|
990
971
|
/**
|
|
991
972
|
* Disallow comma operator.
|
|
992
973
|
*/
|
|
993
|
-
noCommaOperator?:
|
|
974
|
+
noCommaOperator?: RuleConfiguration_for_Null;
|
|
994
975
|
/**
|
|
995
976
|
* Disallow default exports.
|
|
996
977
|
*/
|
|
997
|
-
noDefaultExport?:
|
|
978
|
+
noDefaultExport?: RuleConfiguration_for_Null;
|
|
998
979
|
/**
|
|
999
980
|
* Disallow implicit true values on JSX boolean attributes
|
|
1000
981
|
*/
|
|
1001
|
-
noImplicitBoolean?:
|
|
982
|
+
noImplicitBoolean?: RuleConfiguration_for_Null;
|
|
1002
983
|
/**
|
|
1003
984
|
* Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.
|
|
1004
985
|
*/
|
|
1005
|
-
noInferrableTypes?:
|
|
986
|
+
noInferrableTypes?: RuleConfiguration_for_Null;
|
|
1006
987
|
/**
|
|
1007
988
|
* Disallow the use of TypeScript's namespaces.
|
|
1008
989
|
*/
|
|
1009
|
-
noNamespace?:
|
|
990
|
+
noNamespace?: RuleConfiguration_for_Null;
|
|
1010
991
|
/**
|
|
1011
992
|
* Disallow negation in the condition of an if statement if it has an else clause.
|
|
1012
993
|
*/
|
|
1013
|
-
noNegationElse?:
|
|
994
|
+
noNegationElse?: RuleConfiguration_for_Null;
|
|
1014
995
|
/**
|
|
1015
996
|
* Disallow non-null assertions using the ! postfix operator.
|
|
1016
997
|
*/
|
|
1017
|
-
noNonNullAssertion?:
|
|
998
|
+
noNonNullAssertion?: RuleConfiguration_for_Null;
|
|
1018
999
|
/**
|
|
1019
1000
|
* Disallow reassigning function parameters.
|
|
1020
1001
|
*/
|
|
1021
|
-
noParameterAssign?:
|
|
1002
|
+
noParameterAssign?: RuleConfiguration_for_Null;
|
|
1022
1003
|
/**
|
|
1023
1004
|
* Disallow the use of parameter properties in class constructors.
|
|
1024
1005
|
*/
|
|
1025
|
-
noParameterProperties?:
|
|
1006
|
+
noParameterProperties?: RuleConfiguration_for_Null;
|
|
1026
1007
|
/**
|
|
1027
1008
|
* This rule allows you to specify global variable names that you don’t want to use in your application.
|
|
1028
1009
|
*/
|
|
1029
|
-
noRestrictedGlobals?:
|
|
1010
|
+
noRestrictedGlobals?: RuleConfiguration_for_RestrictedGlobalsOptions;
|
|
1030
1011
|
/**
|
|
1031
1012
|
* Disallow the use of constants which its value is the upper-case version of its name.
|
|
1032
1013
|
*/
|
|
1033
|
-
noShoutyConstants?:
|
|
1014
|
+
noShoutyConstants?: RuleConfiguration_for_Null;
|
|
1034
1015
|
/**
|
|
1035
1016
|
* Disallow template literals if interpolation and special-character handling are not needed
|
|
1036
1017
|
*/
|
|
1037
|
-
noUnusedTemplateLiteral?:
|
|
1018
|
+
noUnusedTemplateLiteral?: RuleConfiguration_for_Null;
|
|
1038
1019
|
/**
|
|
1039
1020
|
* Disallow else block when the if block breaks early.
|
|
1040
1021
|
*/
|
|
1041
|
-
noUselessElse?:
|
|
1022
|
+
noUselessElse?: RuleConfiguration_for_Null;
|
|
1042
1023
|
/**
|
|
1043
1024
|
* Disallow the use of var
|
|
1044
1025
|
*/
|
|
1045
|
-
noVar?:
|
|
1026
|
+
noVar?: RuleConfiguration_for_Null;
|
|
1046
1027
|
/**
|
|
1047
1028
|
* It enables the recommended rules for this group
|
|
1048
1029
|
*/
|
|
@@ -1050,75 +1031,107 @@ interface Style {
|
|
|
1050
1031
|
/**
|
|
1051
1032
|
* Enforce the use of as const over literal type and type annotation.
|
|
1052
1033
|
*/
|
|
1053
|
-
useAsConstAssertion?:
|
|
1034
|
+
useAsConstAssertion?: RuleConfiguration_for_Null;
|
|
1054
1035
|
/**
|
|
1055
1036
|
* Requires following curly brace conventions.
|
|
1056
1037
|
*/
|
|
1057
|
-
useBlockStatements?:
|
|
1038
|
+
useBlockStatements?: RuleConfiguration_for_Null;
|
|
1058
1039
|
/**
|
|
1059
1040
|
* Enforce using else if instead of nested if in else clauses.
|
|
1060
1041
|
*/
|
|
1061
|
-
useCollapsedElseIf?:
|
|
1042
|
+
useCollapsedElseIf?: RuleConfiguration_for_Null;
|
|
1043
|
+
/**
|
|
1044
|
+
* Require consistently using either T[] or Array<T>
|
|
1045
|
+
*/
|
|
1046
|
+
useConsistentArrayType?: RuleConfiguration_for_ConsistentArrayTypeOptions;
|
|
1062
1047
|
/**
|
|
1063
1048
|
* Require const declarations for variables that are never reassigned after declared.
|
|
1064
1049
|
*/
|
|
1065
|
-
useConst?:
|
|
1050
|
+
useConst?: RuleConfiguration_for_Null;
|
|
1066
1051
|
/**
|
|
1067
1052
|
* Enforce default function parameters and optional function parameters to be last.
|
|
1068
1053
|
*/
|
|
1069
|
-
useDefaultParameterLast?:
|
|
1054
|
+
useDefaultParameterLast?: RuleConfiguration_for_Null;
|
|
1070
1055
|
/**
|
|
1071
1056
|
* Require that each enum member value be explicitly initialized.
|
|
1072
1057
|
*/
|
|
1073
|
-
useEnumInitializers?:
|
|
1058
|
+
useEnumInitializers?: RuleConfiguration_for_Null;
|
|
1074
1059
|
/**
|
|
1075
1060
|
* Disallow the use of Math.pow in favor of the ** operator.
|
|
1076
1061
|
*/
|
|
1077
|
-
useExponentiationOperator?:
|
|
1062
|
+
useExponentiationOperator?: RuleConfiguration_for_Null;
|
|
1063
|
+
/**
|
|
1064
|
+
* Promotes the use of export type for types.
|
|
1065
|
+
*/
|
|
1066
|
+
useExportType?: RuleConfiguration_for_Null;
|
|
1067
|
+
/**
|
|
1068
|
+
* Enforce naming conventions for JavaScript and TypeScript filenames.
|
|
1069
|
+
*/
|
|
1070
|
+
useFilenamingConvention?: RuleConfiguration_for_FilenamingConventionOptions;
|
|
1071
|
+
/**
|
|
1072
|
+
* This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.
|
|
1073
|
+
*/
|
|
1074
|
+
useForOf?: RuleConfiguration_for_Null;
|
|
1078
1075
|
/**
|
|
1079
1076
|
* This rule enforces the use of <>...</> over <Fragment>...</Fragment>.
|
|
1080
1077
|
*/
|
|
1081
|
-
useFragmentSyntax?:
|
|
1078
|
+
useFragmentSyntax?: RuleConfiguration_for_Null;
|
|
1079
|
+
/**
|
|
1080
|
+
* Promotes the use of import type for types.
|
|
1081
|
+
*/
|
|
1082
|
+
useImportType?: RuleConfiguration_for_Null;
|
|
1082
1083
|
/**
|
|
1083
1084
|
* Require all enum members to be literal values.
|
|
1084
1085
|
*/
|
|
1085
|
-
useLiteralEnumMembers?:
|
|
1086
|
+
useLiteralEnumMembers?: RuleConfiguration_for_Null;
|
|
1086
1087
|
/**
|
|
1087
1088
|
* Enforce naming conventions for everything across a codebase.
|
|
1088
1089
|
*/
|
|
1089
|
-
useNamingConvention?:
|
|
1090
|
+
useNamingConvention?: RuleConfiguration_for_NamingConventionOptions;
|
|
1091
|
+
/**
|
|
1092
|
+
* Enforces using the node: protocol for Node.js builtin modules.
|
|
1093
|
+
*/
|
|
1094
|
+
useNodejsImportProtocol?: RuleConfiguration_for_Null;
|
|
1095
|
+
/**
|
|
1096
|
+
* Use the Number properties instead of global ones.
|
|
1097
|
+
*/
|
|
1098
|
+
useNumberNamespace?: RuleConfiguration_for_Null;
|
|
1090
1099
|
/**
|
|
1091
1100
|
* Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals
|
|
1092
1101
|
*/
|
|
1093
|
-
useNumericLiterals?:
|
|
1102
|
+
useNumericLiterals?: RuleConfiguration_for_Null;
|
|
1094
1103
|
/**
|
|
1095
1104
|
* Prevent extra closing tags for components without children
|
|
1096
1105
|
*/
|
|
1097
|
-
useSelfClosingElements?:
|
|
1106
|
+
useSelfClosingElements?: RuleConfiguration_for_Null;
|
|
1098
1107
|
/**
|
|
1099
1108
|
* When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.
|
|
1100
1109
|
*/
|
|
1101
|
-
useShorthandArrayType?:
|
|
1110
|
+
useShorthandArrayType?: RuleConfiguration_for_Null;
|
|
1102
1111
|
/**
|
|
1103
1112
|
* Require assignment operator shorthand where possible.
|
|
1104
1113
|
*/
|
|
1105
|
-
useShorthandAssign?:
|
|
1114
|
+
useShorthandAssign?: RuleConfiguration_for_Null;
|
|
1115
|
+
/**
|
|
1116
|
+
* Enforce using function types instead of object type with call signatures.
|
|
1117
|
+
*/
|
|
1118
|
+
useShorthandFunctionType?: RuleConfiguration_for_Null;
|
|
1106
1119
|
/**
|
|
1107
1120
|
* Enforces switch clauses have a single statement, emits a quick fix wrapping the statements in a block.
|
|
1108
1121
|
*/
|
|
1109
|
-
useSingleCaseStatement?:
|
|
1122
|
+
useSingleCaseStatement?: RuleConfiguration_for_Null;
|
|
1110
1123
|
/**
|
|
1111
1124
|
* Disallow multiple variable declarations in the same variable statement
|
|
1112
1125
|
*/
|
|
1113
|
-
useSingleVarDeclarator?:
|
|
1126
|
+
useSingleVarDeclarator?: RuleConfiguration_for_Null;
|
|
1114
1127
|
/**
|
|
1115
1128
|
* Prefer template literals over string concatenation.
|
|
1116
1129
|
*/
|
|
1117
|
-
useTemplate?:
|
|
1130
|
+
useTemplate?: RuleConfiguration_for_Null;
|
|
1118
1131
|
/**
|
|
1119
1132
|
* Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.
|
|
1120
1133
|
*/
|
|
1121
|
-
useWhile?:
|
|
1134
|
+
useWhile?: RuleConfiguration_for_Null;
|
|
1122
1135
|
}
|
|
1123
1136
|
interface Suspicious {
|
|
1124
1137
|
/**
|
|
@@ -1128,187 +1141,207 @@ interface Suspicious {
|
|
|
1128
1141
|
/**
|
|
1129
1142
|
* Use standard constants instead of approximated literals.
|
|
1130
1143
|
*/
|
|
1131
|
-
noApproximativeNumericConstant?:
|
|
1144
|
+
noApproximativeNumericConstant?: RuleConfiguration_for_Null;
|
|
1132
1145
|
/**
|
|
1133
1146
|
* Discourage the usage of Array index in keys.
|
|
1134
1147
|
*/
|
|
1135
|
-
noArrayIndexKey?:
|
|
1148
|
+
noArrayIndexKey?: RuleConfiguration_for_Null;
|
|
1136
1149
|
/**
|
|
1137
1150
|
* Disallow assignments in expressions.
|
|
1138
1151
|
*/
|
|
1139
|
-
noAssignInExpressions?:
|
|
1152
|
+
noAssignInExpressions?: RuleConfiguration_for_Null;
|
|
1140
1153
|
/**
|
|
1141
1154
|
* Disallows using an async function as a Promise executor.
|
|
1142
1155
|
*/
|
|
1143
|
-
noAsyncPromiseExecutor?:
|
|
1156
|
+
noAsyncPromiseExecutor?: RuleConfiguration_for_Null;
|
|
1144
1157
|
/**
|
|
1145
1158
|
* Disallow reassigning exceptions in catch clauses.
|
|
1146
1159
|
*/
|
|
1147
|
-
noCatchAssign?:
|
|
1160
|
+
noCatchAssign?: RuleConfiguration_for_Null;
|
|
1148
1161
|
/**
|
|
1149
1162
|
* Disallow reassigning class members.
|
|
1150
1163
|
*/
|
|
1151
|
-
noClassAssign?:
|
|
1164
|
+
noClassAssign?: RuleConfiguration_for_Null;
|
|
1152
1165
|
/**
|
|
1153
1166
|
* Prevent comments from being inserted as text nodes
|
|
1154
1167
|
*/
|
|
1155
|
-
noCommentText?:
|
|
1168
|
+
noCommentText?: RuleConfiguration_for_Null;
|
|
1156
1169
|
/**
|
|
1157
1170
|
* Disallow comparing against -0
|
|
1158
1171
|
*/
|
|
1159
|
-
noCompareNegZero?:
|
|
1172
|
+
noCompareNegZero?: RuleConfiguration_for_Null;
|
|
1160
1173
|
/**
|
|
1161
1174
|
* Disallow labeled statements that are not loops.
|
|
1162
1175
|
*/
|
|
1163
|
-
noConfusingLabels?:
|
|
1176
|
+
noConfusingLabels?: RuleConfiguration_for_Null;
|
|
1164
1177
|
/**
|
|
1165
1178
|
* Disallow void type outside of generic or return types.
|
|
1166
1179
|
*/
|
|
1167
|
-
noConfusingVoidType?:
|
|
1180
|
+
noConfusingVoidType?: RuleConfiguration_for_Null;
|
|
1168
1181
|
/**
|
|
1169
1182
|
* Disallow the use of console.log
|
|
1170
1183
|
*/
|
|
1171
|
-
noConsoleLog?:
|
|
1184
|
+
noConsoleLog?: RuleConfiguration_for_Null;
|
|
1172
1185
|
/**
|
|
1173
1186
|
* Disallow TypeScript const enum
|
|
1174
1187
|
*/
|
|
1175
|
-
noConstEnum?:
|
|
1188
|
+
noConstEnum?: RuleConfiguration_for_Null;
|
|
1176
1189
|
/**
|
|
1177
1190
|
* Prevents from having control characters and some escape sequences that match control characters in regular expressions.
|
|
1178
1191
|
*/
|
|
1179
|
-
noControlCharactersInRegex?:
|
|
1192
|
+
noControlCharactersInRegex?: RuleConfiguration_for_Null;
|
|
1180
1193
|
/**
|
|
1181
1194
|
* Disallow the use of debugger
|
|
1182
1195
|
*/
|
|
1183
|
-
noDebugger?:
|
|
1196
|
+
noDebugger?: RuleConfiguration_for_Null;
|
|
1184
1197
|
/**
|
|
1185
1198
|
* Require the use of === and !==
|
|
1186
1199
|
*/
|
|
1187
|
-
noDoubleEquals?:
|
|
1200
|
+
noDoubleEquals?: RuleConfiguration_for_Null;
|
|
1188
1201
|
/**
|
|
1189
1202
|
* Disallow duplicate case labels.
|
|
1190
1203
|
*/
|
|
1191
|
-
noDuplicateCase?:
|
|
1204
|
+
noDuplicateCase?: RuleConfiguration_for_Null;
|
|
1192
1205
|
/**
|
|
1193
1206
|
* Disallow duplicate class members.
|
|
1194
1207
|
*/
|
|
1195
|
-
noDuplicateClassMembers?:
|
|
1208
|
+
noDuplicateClassMembers?: RuleConfiguration_for_Null;
|
|
1196
1209
|
/**
|
|
1197
1210
|
* Prevents JSX properties to be assigned multiple times.
|
|
1198
1211
|
*/
|
|
1199
|
-
noDuplicateJsxProps?:
|
|
1212
|
+
noDuplicateJsxProps?: RuleConfiguration_for_Null;
|
|
1200
1213
|
/**
|
|
1201
1214
|
* Prevents object literals having more than one property declaration for the same name.
|
|
1202
1215
|
*/
|
|
1203
|
-
noDuplicateObjectKeys?:
|
|
1216
|
+
noDuplicateObjectKeys?: RuleConfiguration_for_Null;
|
|
1204
1217
|
/**
|
|
1205
1218
|
* Disallow duplicate function parameter name.
|
|
1206
1219
|
*/
|
|
1207
|
-
noDuplicateParameters?:
|
|
1220
|
+
noDuplicateParameters?: RuleConfiguration_for_Null;
|
|
1221
|
+
/**
|
|
1222
|
+
* Disallow empty block statements and static blocks.
|
|
1223
|
+
*/
|
|
1224
|
+
noEmptyBlockStatements?: RuleConfiguration_for_Null;
|
|
1208
1225
|
/**
|
|
1209
1226
|
* Disallow the declaration of empty interfaces.
|
|
1210
1227
|
*/
|
|
1211
|
-
noEmptyInterface?:
|
|
1228
|
+
noEmptyInterface?: RuleConfiguration_for_Null;
|
|
1212
1229
|
/**
|
|
1213
1230
|
* Disallow the any type usage.
|
|
1214
1231
|
*/
|
|
1215
|
-
noExplicitAny?:
|
|
1232
|
+
noExplicitAny?: RuleConfiguration_for_Null;
|
|
1216
1233
|
/**
|
|
1217
1234
|
* Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files.
|
|
1218
1235
|
*/
|
|
1219
|
-
noExtraNonNullAssertion?:
|
|
1236
|
+
noExtraNonNullAssertion?: RuleConfiguration_for_Null;
|
|
1220
1237
|
/**
|
|
1221
1238
|
* Disallow fallthrough of switch clauses.
|
|
1222
1239
|
*/
|
|
1223
|
-
noFallthroughSwitchClause?:
|
|
1240
|
+
noFallthroughSwitchClause?: RuleConfiguration_for_Null;
|
|
1224
1241
|
/**
|
|
1225
1242
|
* Disallow reassigning function declarations.
|
|
1226
1243
|
*/
|
|
1227
|
-
noFunctionAssign?:
|
|
1244
|
+
noFunctionAssign?: RuleConfiguration_for_Null;
|
|
1245
|
+
/**
|
|
1246
|
+
* Disallow assignments to native objects and read-only global variables.
|
|
1247
|
+
*/
|
|
1248
|
+
noGlobalAssign?: RuleConfiguration_for_Null;
|
|
1228
1249
|
/**
|
|
1229
1250
|
* Use Number.isFinite instead of global isFinite.
|
|
1230
1251
|
*/
|
|
1231
|
-
noGlobalIsFinite?:
|
|
1252
|
+
noGlobalIsFinite?: RuleConfiguration_for_Null;
|
|
1232
1253
|
/**
|
|
1233
1254
|
* Use Number.isNaN instead of global isNaN.
|
|
1234
1255
|
*/
|
|
1235
|
-
noGlobalIsNan?:
|
|
1256
|
+
noGlobalIsNan?: RuleConfiguration_for_Null;
|
|
1236
1257
|
/**
|
|
1237
1258
|
* Disallow use of implicit any type on variable declarations.
|
|
1238
1259
|
*/
|
|
1239
|
-
noImplicitAnyLet?:
|
|
1260
|
+
noImplicitAnyLet?: RuleConfiguration_for_Null;
|
|
1240
1261
|
/**
|
|
1241
1262
|
* Disallow assigning to imported bindings
|
|
1242
1263
|
*/
|
|
1243
|
-
noImportAssign?:
|
|
1264
|
+
noImportAssign?: RuleConfiguration_for_Null;
|
|
1244
1265
|
/**
|
|
1245
1266
|
* Disallow labels that share a name with a variable
|
|
1246
1267
|
*/
|
|
1247
|
-
noLabelVar?:
|
|
1268
|
+
noLabelVar?: RuleConfiguration_for_Null;
|
|
1269
|
+
/**
|
|
1270
|
+
* Disallow characters made with multiple code points in character class syntax.
|
|
1271
|
+
*/
|
|
1272
|
+
noMisleadingCharacterClass?: RuleConfiguration_for_Null;
|
|
1248
1273
|
/**
|
|
1249
1274
|
* Enforce proper usage of new and constructor.
|
|
1250
1275
|
*/
|
|
1251
|
-
noMisleadingInstantiator?:
|
|
1276
|
+
noMisleadingInstantiator?: RuleConfiguration_for_Null;
|
|
1252
1277
|
/**
|
|
1253
1278
|
* Disallow shorthand assign when variable appears on both sides.
|
|
1254
1279
|
*/
|
|
1255
|
-
noMisrefactoredShorthandAssign?:
|
|
1280
|
+
noMisrefactoredShorthandAssign?: RuleConfiguration_for_Null;
|
|
1256
1281
|
/**
|
|
1257
1282
|
* Disallow direct use of Object.prototype builtins.
|
|
1258
1283
|
*/
|
|
1259
|
-
noPrototypeBuiltins?:
|
|
1284
|
+
noPrototypeBuiltins?: RuleConfiguration_for_Null;
|
|
1260
1285
|
/**
|
|
1261
1286
|
* Disallow variable, function, class, and type redeclarations in the same scope.
|
|
1262
1287
|
*/
|
|
1263
|
-
noRedeclare?:
|
|
1288
|
+
noRedeclare?: RuleConfiguration_for_Null;
|
|
1264
1289
|
/**
|
|
1265
1290
|
* Prevents from having redundant "use strict".
|
|
1266
1291
|
*/
|
|
1267
|
-
noRedundantUseStrict?:
|
|
1292
|
+
noRedundantUseStrict?: RuleConfiguration_for_Null;
|
|
1268
1293
|
/**
|
|
1269
1294
|
* Disallow comparisons where both sides are exactly the same.
|
|
1270
1295
|
*/
|
|
1271
|
-
noSelfCompare?:
|
|
1296
|
+
noSelfCompare?: RuleConfiguration_for_Null;
|
|
1272
1297
|
/**
|
|
1273
1298
|
* Disallow identifiers from shadowing restricted names.
|
|
1274
1299
|
*/
|
|
1275
|
-
noShadowRestrictedNames?:
|
|
1300
|
+
noShadowRestrictedNames?: RuleConfiguration_for_Null;
|
|
1276
1301
|
/**
|
|
1277
1302
|
* Disallow sparse arrays
|
|
1278
1303
|
*/
|
|
1279
|
-
noSparseArray?:
|
|
1304
|
+
noSparseArray?: RuleConfiguration_for_Null;
|
|
1305
|
+
/**
|
|
1306
|
+
* Disallow then property.
|
|
1307
|
+
*/
|
|
1308
|
+
noThenProperty?: RuleConfiguration_for_Null;
|
|
1280
1309
|
/**
|
|
1281
1310
|
* Disallow unsafe declaration merging between interfaces and classes.
|
|
1282
1311
|
*/
|
|
1283
|
-
noUnsafeDeclarationMerging?:
|
|
1312
|
+
noUnsafeDeclarationMerging?: RuleConfiguration_for_Null;
|
|
1284
1313
|
/**
|
|
1285
1314
|
* Disallow using unsafe negation.
|
|
1286
1315
|
*/
|
|
1287
|
-
noUnsafeNegation?:
|
|
1316
|
+
noUnsafeNegation?: RuleConfiguration_for_Null;
|
|
1288
1317
|
/**
|
|
1289
1318
|
* It enables the recommended rules for this group
|
|
1290
1319
|
*/
|
|
1291
1320
|
recommended?: boolean;
|
|
1321
|
+
/**
|
|
1322
|
+
* Ensure async functions utilize await.
|
|
1323
|
+
*/
|
|
1324
|
+
useAwait?: RuleConfiguration_for_Null;
|
|
1292
1325
|
/**
|
|
1293
1326
|
* Enforce default clauses in switch statements to be last
|
|
1294
1327
|
*/
|
|
1295
|
-
useDefaultSwitchClauseLast?:
|
|
1328
|
+
useDefaultSwitchClauseLast?: RuleConfiguration_for_Null;
|
|
1296
1329
|
/**
|
|
1297
1330
|
* Enforce get methods to always return a value.
|
|
1298
1331
|
*/
|
|
1299
|
-
useGetterReturn?:
|
|
1332
|
+
useGetterReturn?: RuleConfiguration_for_Null;
|
|
1300
1333
|
/**
|
|
1301
1334
|
* Use Array.isArray() instead of instanceof Array.
|
|
1302
1335
|
*/
|
|
1303
|
-
useIsArray?:
|
|
1336
|
+
useIsArray?: RuleConfiguration_for_Null;
|
|
1304
1337
|
/**
|
|
1305
1338
|
* Require using the namespace keyword over the module keyword to declare TypeScript namespaces.
|
|
1306
1339
|
*/
|
|
1307
|
-
useNamespaceKeyword?:
|
|
1340
|
+
useNamespaceKeyword?: RuleConfiguration_for_Null;
|
|
1308
1341
|
/**
|
|
1309
1342
|
* This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions
|
|
1310
1343
|
*/
|
|
1311
|
-
useValidTypeof?:
|
|
1344
|
+
useValidTypeof?: RuleConfiguration_for_Null;
|
|
1312
1345
|
}
|
|
1313
1346
|
interface OverrideFormatterConfiguration {
|
|
1314
1347
|
/**
|
|
@@ -1357,58 +1390,116 @@ interface OverrideOrganizeImportsConfiguration {
|
|
|
1357
1390
|
*/
|
|
1358
1391
|
enabled?: boolean;
|
|
1359
1392
|
}
|
|
1360
|
-
type
|
|
1393
|
+
type RuleConfiguration_for_Null =
|
|
1394
|
+
| RulePlainConfiguration
|
|
1395
|
+
| RuleWithOptions_for_Null;
|
|
1396
|
+
type RuleConfiguration_for_ValidAriaRoleOptions =
|
|
1397
|
+
| RulePlainConfiguration
|
|
1398
|
+
| RuleWithOptions_for_ValidAriaRoleOptions;
|
|
1399
|
+
type RuleConfiguration_for_ComplexityOptions =
|
|
1400
|
+
| RulePlainConfiguration
|
|
1401
|
+
| RuleWithOptions_for_ComplexityOptions;
|
|
1402
|
+
type RuleConfiguration_for_HooksOptions =
|
|
1403
|
+
| RulePlainConfiguration
|
|
1404
|
+
| RuleWithOptions_for_HooksOptions;
|
|
1405
|
+
type RuleConfiguration_for_DeprecatedHooksOptions =
|
|
1406
|
+
| RulePlainConfiguration
|
|
1407
|
+
| RuleWithOptions_for_DeprecatedHooksOptions;
|
|
1408
|
+
type RuleConfiguration_for_RestrictedImportsOptions =
|
|
1409
|
+
| RulePlainConfiguration
|
|
1410
|
+
| RuleWithOptions_for_RestrictedImportsOptions;
|
|
1411
|
+
type RuleConfiguration_for_UtilityClassSortingOptions =
|
|
1412
|
+
| RulePlainConfiguration
|
|
1413
|
+
| RuleWithOptions_for_UtilityClassSortingOptions;
|
|
1414
|
+
type RuleConfiguration_for_RestrictedGlobalsOptions =
|
|
1415
|
+
| RulePlainConfiguration
|
|
1416
|
+
| RuleWithOptions_for_RestrictedGlobalsOptions;
|
|
1417
|
+
type RuleConfiguration_for_ConsistentArrayTypeOptions =
|
|
1418
|
+
| RulePlainConfiguration
|
|
1419
|
+
| RuleWithOptions_for_ConsistentArrayTypeOptions;
|
|
1420
|
+
type RuleConfiguration_for_FilenamingConventionOptions =
|
|
1421
|
+
| RulePlainConfiguration
|
|
1422
|
+
| RuleWithOptions_for_FilenamingConventionOptions;
|
|
1423
|
+
type RuleConfiguration_for_NamingConventionOptions =
|
|
1424
|
+
| RulePlainConfiguration
|
|
1425
|
+
| RuleWithOptions_for_NamingConventionOptions;
|
|
1361
1426
|
type RulePlainConfiguration = "warn" | "error" | "off";
|
|
1362
|
-
interface
|
|
1427
|
+
interface RuleWithOptions_for_Null {
|
|
1428
|
+
level: RulePlainConfiguration;
|
|
1429
|
+
options: null;
|
|
1430
|
+
}
|
|
1431
|
+
interface RuleWithOptions_for_ValidAriaRoleOptions {
|
|
1432
|
+
level: RulePlainConfiguration;
|
|
1433
|
+
options: ValidAriaRoleOptions;
|
|
1434
|
+
}
|
|
1435
|
+
interface RuleWithOptions_for_ComplexityOptions {
|
|
1363
1436
|
level: RulePlainConfiguration;
|
|
1364
|
-
options
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1437
|
+
options: ComplexityOptions;
|
|
1438
|
+
}
|
|
1439
|
+
interface RuleWithOptions_for_HooksOptions {
|
|
1440
|
+
level: RulePlainConfiguration;
|
|
1441
|
+
options: HooksOptions;
|
|
1442
|
+
}
|
|
1443
|
+
interface RuleWithOptions_for_DeprecatedHooksOptions {
|
|
1444
|
+
level: RulePlainConfiguration;
|
|
1445
|
+
options: DeprecatedHooksOptions;
|
|
1446
|
+
}
|
|
1447
|
+
interface RuleWithOptions_for_RestrictedImportsOptions {
|
|
1448
|
+
level: RulePlainConfiguration;
|
|
1449
|
+
options: RestrictedImportsOptions;
|
|
1450
|
+
}
|
|
1451
|
+
interface RuleWithOptions_for_UtilityClassSortingOptions {
|
|
1452
|
+
level: RulePlainConfiguration;
|
|
1453
|
+
options: UtilityClassSortingOptions;
|
|
1454
|
+
}
|
|
1455
|
+
interface RuleWithOptions_for_RestrictedGlobalsOptions {
|
|
1456
|
+
level: RulePlainConfiguration;
|
|
1457
|
+
options: RestrictedGlobalsOptions;
|
|
1458
|
+
}
|
|
1459
|
+
interface RuleWithOptions_for_ConsistentArrayTypeOptions {
|
|
1460
|
+
level: RulePlainConfiguration;
|
|
1461
|
+
options: ConsistentArrayTypeOptions;
|
|
1462
|
+
}
|
|
1463
|
+
interface RuleWithOptions_for_FilenamingConventionOptions {
|
|
1464
|
+
level: RulePlainConfiguration;
|
|
1465
|
+
options: FilenamingConventionOptions;
|
|
1466
|
+
}
|
|
1467
|
+
interface RuleWithOptions_for_NamingConventionOptions {
|
|
1468
|
+
level: RulePlainConfiguration;
|
|
1469
|
+
options: NamingConventionOptions;
|
|
1470
|
+
}
|
|
1471
|
+
interface ValidAriaRoleOptions {
|
|
1472
|
+
allowInvalidRoles: string[];
|
|
1473
|
+
ignoreNonDom: boolean;
|
|
1474
|
+
}
|
|
1377
1475
|
interface ComplexityOptions {
|
|
1378
1476
|
/**
|
|
1379
1477
|
* The maximum complexity score that we allow. Anything higher is considered excessive.
|
|
1380
1478
|
*/
|
|
1381
1479
|
maxAllowedComplexity: number;
|
|
1382
1480
|
}
|
|
1383
|
-
interface
|
|
1384
|
-
syntax: ConsistentArrayType;
|
|
1385
|
-
}
|
|
1386
|
-
interface FilenamingConventionOptions {
|
|
1387
|
-
/**
|
|
1388
|
-
* Allowed cases for _TypeScript_ `enum` member names.
|
|
1389
|
-
*/
|
|
1390
|
-
filenameCases: FilenameCases;
|
|
1481
|
+
interface HooksOptions {
|
|
1391
1482
|
/**
|
|
1392
|
-
*
|
|
1483
|
+
* List of hooks of which the dependencies should be validated.
|
|
1393
1484
|
*/
|
|
1394
|
-
|
|
1485
|
+
hooks: Hook[];
|
|
1395
1486
|
}
|
|
1396
|
-
interface
|
|
1487
|
+
interface DeprecatedHooksOptions {}
|
|
1488
|
+
interface RestrictedImportsOptions {
|
|
1397
1489
|
/**
|
|
1398
|
-
*
|
|
1490
|
+
* A list of names that should trigger the rule
|
|
1399
1491
|
*/
|
|
1400
|
-
|
|
1492
|
+
paths: {};
|
|
1401
1493
|
}
|
|
1402
|
-
interface
|
|
1403
|
-
interface NamingConventionOptions {
|
|
1494
|
+
interface UtilityClassSortingOptions {
|
|
1404
1495
|
/**
|
|
1405
|
-
*
|
|
1496
|
+
* Additional attributes that will be sorted.
|
|
1406
1497
|
*/
|
|
1407
|
-
|
|
1498
|
+
attributes?: string[];
|
|
1408
1499
|
/**
|
|
1409
|
-
*
|
|
1500
|
+
* Names of the functions or tagged templates that will be sorted.
|
|
1410
1501
|
*/
|
|
1411
|
-
|
|
1502
|
+
functions?: string[];
|
|
1412
1503
|
}
|
|
1413
1504
|
interface RestrictedGlobalsOptions {
|
|
1414
1505
|
/**
|
|
@@ -1416,45 +1507,67 @@ interface RestrictedGlobalsOptions {
|
|
|
1416
1507
|
*/
|
|
1417
1508
|
deniedGlobals: string[];
|
|
1418
1509
|
}
|
|
1419
|
-
interface
|
|
1510
|
+
interface ConsistentArrayTypeOptions {
|
|
1511
|
+
syntax: ConsistentArrayType;
|
|
1512
|
+
}
|
|
1513
|
+
interface FilenamingConventionOptions {
|
|
1420
1514
|
/**
|
|
1421
|
-
*
|
|
1515
|
+
* Allowed cases for _TypeScript_ `enum` member names.
|
|
1422
1516
|
*/
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1517
|
+
filenameCases: FilenameCases;
|
|
1518
|
+
/**
|
|
1519
|
+
* If `false`, then non-ASCII characters are allowed.
|
|
1520
|
+
*/
|
|
1521
|
+
requireAscii: boolean;
|
|
1522
|
+
/**
|
|
1523
|
+
* If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
|
|
1524
|
+
*/
|
|
1525
|
+
strictCase: boolean;
|
|
1428
1526
|
}
|
|
1429
|
-
interface
|
|
1527
|
+
interface NamingConventionOptions {
|
|
1430
1528
|
/**
|
|
1431
|
-
*
|
|
1529
|
+
* Allowed cases for _TypeScript_ `enum` member names.
|
|
1432
1530
|
*/
|
|
1433
|
-
|
|
1531
|
+
enumMemberCase: EnumMemberCase;
|
|
1434
1532
|
/**
|
|
1435
|
-
*
|
|
1533
|
+
* If `false`, then non-ASCII characters are allowed.
|
|
1436
1534
|
*/
|
|
1437
|
-
|
|
1535
|
+
requireAscii: boolean;
|
|
1536
|
+
/**
|
|
1537
|
+
* If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
|
|
1538
|
+
*/
|
|
1539
|
+
strictCase: boolean;
|
|
1438
1540
|
}
|
|
1439
|
-
|
|
1440
|
-
type FilenameCases = FilenameCase[];
|
|
1441
|
-
interface Hooks {
|
|
1541
|
+
interface Hook {
|
|
1442
1542
|
/**
|
|
1443
1543
|
* The "position" of the closure function, starting from zero.
|
|
1444
1544
|
|
|
1445
|
-
|
|
1545
|
+
For example, for React's `useEffect()` hook, the closure index is 0.
|
|
1446
1546
|
*/
|
|
1447
1547
|
closureIndex?: number;
|
|
1448
1548
|
/**
|
|
1449
|
-
|
|
1549
|
+
* The "position" of the array of dependencies, starting from zero.
|
|
1550
|
+
|
|
1551
|
+
For example, for React's `useEffect()` hook, the dependencies index is 1.
|
|
1450
1552
|
*/
|
|
1451
1553
|
dependenciesIndex?: number;
|
|
1452
1554
|
/**
|
|
1453
|
-
* The name of the hook
|
|
1555
|
+
* The name of the hook.
|
|
1454
1556
|
*/
|
|
1455
1557
|
name: string;
|
|
1558
|
+
/**
|
|
1559
|
+
* Whether the result of the hook is stable.
|
|
1560
|
+
|
|
1561
|
+
Set to `true` to mark the identity of the hook's return value as stable, or use a number/an array of numbers to mark the "positions" in the return array as stable.
|
|
1562
|
+
|
|
1563
|
+
For example, for React's `useRef()` hook the value would be `true`, while for `useState()` it would be `[1]`.
|
|
1564
|
+
*/
|
|
1565
|
+
stableResult: StableHookResult;
|
|
1456
1566
|
}
|
|
1567
|
+
type ConsistentArrayType = "shorthand" | "generic";
|
|
1568
|
+
type FilenameCases = FilenameCase[];
|
|
1457
1569
|
type EnumMemberCase = "PascalCase" | "CONSTANT_CASE" | "camelCase";
|
|
1570
|
+
type StableHookResult = "None" | "Identity" | { Indices: number[] };
|
|
1458
1571
|
type FilenameCase =
|
|
1459
1572
|
| "camelCase"
|
|
1460
1573
|
| "export"
|
|
@@ -1462,66 +1575,84 @@ type FilenameCase =
|
|
|
1462
1575
|
| "PascalCase"
|
|
1463
1576
|
| "snake_case";
|
|
1464
1577
|
interface UpdateProjectParams {
|
|
1465
|
-
path:
|
|
1578
|
+
path: BiomePath;
|
|
1466
1579
|
}
|
|
1467
1580
|
interface OpenProjectParams {
|
|
1468
1581
|
content: string;
|
|
1469
|
-
path:
|
|
1582
|
+
path: BiomePath;
|
|
1470
1583
|
version: number;
|
|
1471
1584
|
}
|
|
1472
1585
|
interface OpenFileParams {
|
|
1473
1586
|
content: string;
|
|
1474
|
-
|
|
1475
|
-
path:
|
|
1587
|
+
document_file_source?: DocumentFileSource;
|
|
1588
|
+
path: BiomePath;
|
|
1476
1589
|
version: number;
|
|
1477
1590
|
}
|
|
1478
|
-
type
|
|
1479
|
-
| "
|
|
1480
|
-
|
|
|
1481
|
-
|
|
|
1482
|
-
|
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1591
|
+
type DocumentFileSource =
|
|
1592
|
+
| "Unknown"
|
|
1593
|
+
| { Js: JsFileSource }
|
|
1594
|
+
| { Json: JsonFileSource }
|
|
1595
|
+
| { Css: CssFileSource };
|
|
1596
|
+
interface JsFileSource {
|
|
1597
|
+
/**
|
|
1598
|
+
* Used to mark if the source is being used for an Astro, Svelte or Vue file
|
|
1599
|
+
*/
|
|
1600
|
+
embedding_kind: EmbeddingKind;
|
|
1601
|
+
language: Language;
|
|
1602
|
+
module_kind: ModuleKind;
|
|
1603
|
+
variant: LanguageVariant;
|
|
1604
|
+
version: LanguageVersion;
|
|
1605
|
+
}
|
|
1606
|
+
interface JsonFileSource {
|
|
1607
|
+
allow_trailing_comma: boolean;
|
|
1608
|
+
variant: JsonVariant;
|
|
1609
|
+
}
|
|
1610
|
+
interface CssFileSource {
|
|
1611
|
+
variant: CssVariant;
|
|
1612
|
+
}
|
|
1613
|
+
type EmbeddingKind = "Astro" | "Vue" | "Svelte" | "None";
|
|
1614
|
+
type Language = "JavaScript" | { TypeScript: { definition_file: boolean } };
|
|
1615
|
+
type ModuleKind = "Script" | "Module";
|
|
1616
|
+
type LanguageVariant = "Standard" | "StandardRestricted" | "Jsx";
|
|
1617
|
+
type LanguageVersion = "ES2022" | "ESNext";
|
|
1618
|
+
type JsonVariant = "Standard" | "Jsonc";
|
|
1619
|
+
type CssVariant = "Standard";
|
|
1489
1620
|
interface ChangeFileParams {
|
|
1490
1621
|
content: string;
|
|
1491
|
-
path:
|
|
1622
|
+
path: BiomePath;
|
|
1492
1623
|
version: number;
|
|
1493
1624
|
}
|
|
1494
1625
|
interface CloseFileParams {
|
|
1495
|
-
path:
|
|
1626
|
+
path: BiomePath;
|
|
1496
1627
|
}
|
|
1497
1628
|
interface GetSyntaxTreeParams {
|
|
1498
|
-
path:
|
|
1629
|
+
path: BiomePath;
|
|
1499
1630
|
}
|
|
1500
1631
|
interface GetSyntaxTreeResult {
|
|
1501
1632
|
ast: string;
|
|
1502
1633
|
cst: string;
|
|
1503
1634
|
}
|
|
1504
1635
|
interface OrganizeImportsParams {
|
|
1505
|
-
path:
|
|
1636
|
+
path: BiomePath;
|
|
1506
1637
|
}
|
|
1507
1638
|
interface OrganizeImportsResult {
|
|
1508
1639
|
code: string;
|
|
1509
1640
|
}
|
|
1510
1641
|
interface GetFileContentParams {
|
|
1511
|
-
path:
|
|
1642
|
+
path: BiomePath;
|
|
1512
1643
|
}
|
|
1513
1644
|
interface GetControlFlowGraphParams {
|
|
1514
1645
|
cursor: TextSize;
|
|
1515
|
-
path:
|
|
1646
|
+
path: BiomePath;
|
|
1516
1647
|
}
|
|
1517
1648
|
type TextSize = number;
|
|
1518
1649
|
interface GetFormatterIRParams {
|
|
1519
|
-
path:
|
|
1650
|
+
path: BiomePath;
|
|
1520
1651
|
}
|
|
1521
1652
|
interface PullDiagnosticsParams {
|
|
1522
1653
|
categories: RuleCategories;
|
|
1523
1654
|
max_diagnostics: number;
|
|
1524
|
-
path:
|
|
1655
|
+
path: BiomePath;
|
|
1525
1656
|
}
|
|
1526
1657
|
type RuleCategories = RuleCategory[];
|
|
1527
1658
|
type RuleCategory = "Syntax" | "Lint" | "Action" | "Transformation";
|
|
@@ -1576,6 +1707,7 @@ type Category =
|
|
|
1576
1707
|
| "lint/a11y/useValidAriaValues"
|
|
1577
1708
|
| "lint/a11y/useValidLang"
|
|
1578
1709
|
| "lint/complexity/noBannedTypes"
|
|
1710
|
+
| "lint/complexity/noEmptyTypeParameters"
|
|
1579
1711
|
| "lint/complexity/noExcessiveCognitiveComplexity"
|
|
1580
1712
|
| "lint/complexity/noExtraBooleanCast"
|
|
1581
1713
|
| "lint/complexity/noForEach"
|
|
@@ -1587,6 +1719,7 @@ type Category =
|
|
|
1587
1719
|
| "lint/complexity/noUselessEmptyExport"
|
|
1588
1720
|
| "lint/complexity/noUselessFragments"
|
|
1589
1721
|
| "lint/complexity/noUselessLabel"
|
|
1722
|
+
| "lint/complexity/noUselessLoneBlockStatements"
|
|
1590
1723
|
| "lint/complexity/noUselessRename"
|
|
1591
1724
|
| "lint/complexity/noUselessSwitchCase"
|
|
1592
1725
|
| "lint/complexity/noUselessThisAlias"
|
|
@@ -1610,6 +1743,7 @@ type Category =
|
|
|
1610
1743
|
| "lint/correctness/noInnerDeclarations"
|
|
1611
1744
|
| "lint/correctness/noInvalidConstructorSuper"
|
|
1612
1745
|
| "lint/correctness/noInvalidNewBuiltin"
|
|
1746
|
+
| "lint/correctness/noInvalidUseBeforeDeclaration"
|
|
1613
1747
|
| "lint/correctness/noNewSymbol"
|
|
1614
1748
|
| "lint/correctness/noNonoctalDecimalEscape"
|
|
1615
1749
|
| "lint/correctness/noPrecisionLoss"
|
|
@@ -1624,7 +1758,9 @@ type Category =
|
|
|
1624
1758
|
| "lint/correctness/noUnreachableSuper"
|
|
1625
1759
|
| "lint/correctness/noUnsafeFinally"
|
|
1626
1760
|
| "lint/correctness/noUnsafeOptionalChaining"
|
|
1761
|
+
| "lint/correctness/noUnusedImports"
|
|
1627
1762
|
| "lint/correctness/noUnusedLabels"
|
|
1763
|
+
| "lint/correctness/noUnusedPrivateClassMembers"
|
|
1628
1764
|
| "lint/correctness/noUnusedVariables"
|
|
1629
1765
|
| "lint/correctness/noVoidElementsWithChildren"
|
|
1630
1766
|
| "lint/correctness/noVoidTypeReturn"
|
|
@@ -1634,43 +1770,32 @@ type Category =
|
|
|
1634
1770
|
| "lint/correctness/useValidForDirection"
|
|
1635
1771
|
| "lint/correctness/useYield"
|
|
1636
1772
|
| "lint/nursery/noApproximativeNumericConstant"
|
|
1773
|
+
| "lint/nursery/noBarrelFile"
|
|
1637
1774
|
| "lint/nursery/noConsole"
|
|
1638
1775
|
| "lint/nursery/noDuplicateJsonKeys"
|
|
1639
|
-
| "lint/nursery/
|
|
1640
|
-
| "lint/nursery/
|
|
1776
|
+
| "lint/nursery/noDuplicateTestHooks"
|
|
1777
|
+
| "lint/nursery/noExcessiveNestedTestSuites"
|
|
1778
|
+
| "lint/nursery/noExportsInTest"
|
|
1641
1779
|
| "lint/nursery/noFocusedTests"
|
|
1642
|
-
| "lint/nursery/
|
|
1643
|
-
| "lint/nursery/noGlobalEval"
|
|
1644
|
-
| "lint/nursery/noInvalidUseBeforeDeclaration"
|
|
1645
|
-
| "lint/nursery/noMisleadingCharacterClass"
|
|
1780
|
+
| "lint/nursery/noNamespaceImport"
|
|
1646
1781
|
| "lint/nursery/noNodejsModules"
|
|
1647
1782
|
| "lint/nursery/noReExportAll"
|
|
1648
1783
|
| "lint/nursery/noRestrictedImports"
|
|
1784
|
+
| "lint/nursery/noSemicolonInJsx"
|
|
1649
1785
|
| "lint/nursery/noSkippedTests"
|
|
1650
|
-
| "lint/nursery/noThenProperty"
|
|
1651
1786
|
| "lint/nursery/noTypeOnlyImportAttributes"
|
|
1652
1787
|
| "lint/nursery/noUndeclaredDependencies"
|
|
1653
|
-
| "lint/nursery/noUnusedImports"
|
|
1654
|
-
| "lint/nursery/noUnusedPrivateClassMembers"
|
|
1655
|
-
| "lint/nursery/noUselessLoneBlockStatements"
|
|
1656
1788
|
| "lint/nursery/noUselessTernary"
|
|
1657
|
-
| "lint/nursery/useAwait"
|
|
1658
1789
|
| "lint/nursery/useBiomeSuppressionComment"
|
|
1659
|
-
| "lint/nursery/useConsistentArrayType"
|
|
1660
|
-
| "lint/nursery/useExportType"
|
|
1661
|
-
| "lint/nursery/useFilenamingConvention"
|
|
1662
|
-
| "lint/nursery/useForOf"
|
|
1663
|
-
| "lint/nursery/useGroupedTypeImport"
|
|
1664
1790
|
| "lint/nursery/useImportRestrictions"
|
|
1665
|
-
| "lint/nursery/
|
|
1666
|
-
| "lint/nursery/
|
|
1667
|
-
| "lint/nursery/useNumberNamespace"
|
|
1668
|
-
| "lint/nursery/useShorthandFunctionType"
|
|
1791
|
+
| "lint/nursery/useJsxKeyInIterable"
|
|
1792
|
+
| "lint/nursery/useNodeAssertStrict"
|
|
1669
1793
|
| "lint/nursery/useSortedClasses"
|
|
1670
1794
|
| "lint/performance/noAccumulatingSpread"
|
|
1671
1795
|
| "lint/performance/noDelete"
|
|
1672
1796
|
| "lint/security/noDangerouslySetInnerHtml"
|
|
1673
1797
|
| "lint/security/noDangerouslySetInnerHtmlWithChildren"
|
|
1798
|
+
| "lint/security/noGlobalEval"
|
|
1674
1799
|
| "lint/style/noArguments"
|
|
1675
1800
|
| "lint/style/noCommaOperator"
|
|
1676
1801
|
| "lint/style/noDefaultExport"
|
|
@@ -1689,17 +1814,25 @@ type Category =
|
|
|
1689
1814
|
| "lint/style/useAsConstAssertion"
|
|
1690
1815
|
| "lint/style/useBlockStatements"
|
|
1691
1816
|
| "lint/style/useCollapsedElseIf"
|
|
1817
|
+
| "lint/style/useConsistentArrayType"
|
|
1692
1818
|
| "lint/style/useConst"
|
|
1693
1819
|
| "lint/style/useDefaultParameterLast"
|
|
1694
1820
|
| "lint/style/useEnumInitializers"
|
|
1695
1821
|
| "lint/style/useExponentiationOperator"
|
|
1822
|
+
| "lint/style/useExportType"
|
|
1823
|
+
| "lint/style/useFilenamingConvention"
|
|
1824
|
+
| "lint/style/useForOf"
|
|
1696
1825
|
| "lint/style/useFragmentSyntax"
|
|
1826
|
+
| "lint/style/useImportType"
|
|
1697
1827
|
| "lint/style/useLiteralEnumMembers"
|
|
1698
1828
|
| "lint/style/useNamingConvention"
|
|
1829
|
+
| "lint/style/useNodejsImportProtocol"
|
|
1830
|
+
| "lint/style/useNumberNamespace"
|
|
1699
1831
|
| "lint/style/useNumericLiterals"
|
|
1700
1832
|
| "lint/style/useSelfClosingElements"
|
|
1701
1833
|
| "lint/style/useShorthandArrayType"
|
|
1702
1834
|
| "lint/style/useShorthandAssign"
|
|
1835
|
+
| "lint/style/useShorthandFunctionType"
|
|
1703
1836
|
| "lint/style/useSingleCaseStatement"
|
|
1704
1837
|
| "lint/style/useSingleVarDeclarator"
|
|
1705
1838
|
| "lint/style/useTemplate"
|
|
@@ -1724,16 +1857,19 @@ type Category =
|
|
|
1724
1857
|
| "lint/suspicious/noDuplicateJsxProps"
|
|
1725
1858
|
| "lint/suspicious/noDuplicateObjectKeys"
|
|
1726
1859
|
| "lint/suspicious/noDuplicateParameters"
|
|
1860
|
+
| "lint/suspicious/noEmptyBlockStatements"
|
|
1727
1861
|
| "lint/suspicious/noEmptyInterface"
|
|
1728
1862
|
| "lint/suspicious/noExplicitAny"
|
|
1729
1863
|
| "lint/suspicious/noExtraNonNullAssertion"
|
|
1730
1864
|
| "lint/suspicious/noFallthroughSwitchClause"
|
|
1731
1865
|
| "lint/suspicious/noFunctionAssign"
|
|
1866
|
+
| "lint/suspicious/noGlobalAssign"
|
|
1732
1867
|
| "lint/suspicious/noGlobalIsFinite"
|
|
1733
1868
|
| "lint/suspicious/noGlobalIsNan"
|
|
1734
1869
|
| "lint/suspicious/noImplicitAnyLet"
|
|
1735
1870
|
| "lint/suspicious/noImportAssign"
|
|
1736
1871
|
| "lint/suspicious/noLabelVar"
|
|
1872
|
+
| "lint/suspicious/noMisleadingCharacterClass"
|
|
1737
1873
|
| "lint/suspicious/noMisleadingInstantiator"
|
|
1738
1874
|
| "lint/suspicious/noMisrefactoredShorthandAssign"
|
|
1739
1875
|
| "lint/suspicious/noPrototypeBuiltins"
|
|
@@ -1742,8 +1878,10 @@ type Category =
|
|
|
1742
1878
|
| "lint/suspicious/noSelfCompare"
|
|
1743
1879
|
| "lint/suspicious/noShadowRestrictedNames"
|
|
1744
1880
|
| "lint/suspicious/noSparseArray"
|
|
1881
|
+
| "lint/suspicious/noThenProperty"
|
|
1745
1882
|
| "lint/suspicious/noUnsafeDeclarationMerging"
|
|
1746
1883
|
| "lint/suspicious/noUnsafeNegation"
|
|
1884
|
+
| "lint/suspicious/useAwait"
|
|
1747
1885
|
| "lint/suspicious/useDefaultSwitchClauseLast"
|
|
1748
1886
|
| "lint/suspicious/useGetterReturn"
|
|
1749
1887
|
| "lint/suspicious/useIsArray"
|
|
@@ -1845,7 +1983,7 @@ interface BacktraceSymbol {
|
|
|
1845
1983
|
name?: string;
|
|
1846
1984
|
}
|
|
1847
1985
|
interface PullActionsParams {
|
|
1848
|
-
path:
|
|
1986
|
+
path: BiomePath;
|
|
1849
1987
|
range: TextRange;
|
|
1850
1988
|
}
|
|
1851
1989
|
interface PullActionsResult {
|
|
@@ -1881,7 +2019,7 @@ type SourceActionKind =
|
|
|
1881
2019
|
| { Other: string };
|
|
1882
2020
|
type Applicability = "Always" | "MaybeIncorrect";
|
|
1883
2021
|
interface FormatFileParams {
|
|
1884
|
-
path:
|
|
2022
|
+
path: BiomePath;
|
|
1885
2023
|
}
|
|
1886
2024
|
interface Printed {
|
|
1887
2025
|
code: string;
|
|
@@ -1900,16 +2038,16 @@ interface SourceMarker {
|
|
|
1900
2038
|
source: TextSize;
|
|
1901
2039
|
}
|
|
1902
2040
|
interface FormatRangeParams {
|
|
1903
|
-
path:
|
|
2041
|
+
path: BiomePath;
|
|
1904
2042
|
range: TextRange;
|
|
1905
2043
|
}
|
|
1906
2044
|
interface FormatOnTypeParams {
|
|
1907
2045
|
offset: TextSize;
|
|
1908
|
-
path:
|
|
2046
|
+
path: BiomePath;
|
|
1909
2047
|
}
|
|
1910
2048
|
interface FixFileParams {
|
|
1911
2049
|
fix_file_mode: FixFileMode;
|
|
1912
|
-
path:
|
|
2050
|
+
path: BiomePath;
|
|
1913
2051
|
should_format: boolean;
|
|
1914
2052
|
}
|
|
1915
2053
|
type FixFileMode = "SafeFixes" | "SafeAndUnsafeFixes";
|
|
@@ -1943,7 +2081,7 @@ interface FixAction {
|
|
|
1943
2081
|
}
|
|
1944
2082
|
interface RenameParams {
|
|
1945
2083
|
new_name: string;
|
|
1946
|
-
path:
|
|
2084
|
+
path: BiomePath;
|
|
1947
2085
|
symbol_at: TextSize;
|
|
1948
2086
|
}
|
|
1949
2087
|
interface RenameResult {
|