@lincy/eslint-config 5.9.0 → 6.0.1
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/dist/chunk-DWy1uDak.cjs +39 -0
- package/dist/index.cjs +66 -81
- package/dist/index.d.cts +626 -251
- package/dist/{index.d.ts → index.d.mts} +627 -252
- package/dist/{index.js → index.mjs} +55 -43
- package/dist/lib-BJFVxmuP.cjs +11153 -0
- package/dist/lib-D3OsxTXr.mjs +11157 -0
- package/package.json +46 -44
package/dist/index.d.cts
CHANGED
|
@@ -504,6 +504,11 @@ interface RuleOptions {
|
|
|
504
504
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header
|
|
505
505
|
*/
|
|
506
506
|
'jsdoc/empty-tags'?: Linter.RuleEntry<JsdocEmptyTags>;
|
|
507
|
+
/**
|
|
508
|
+
* Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode).
|
|
509
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header
|
|
510
|
+
*/
|
|
511
|
+
'jsdoc/escape-inline-tags'?: Linter.RuleEntry<JsdocEscapeInlineTags>;
|
|
507
512
|
/**
|
|
508
513
|
* Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors).
|
|
509
514
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header
|
|
@@ -714,6 +719,11 @@ interface RuleOptions {
|
|
|
714
719
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header
|
|
715
720
|
*/
|
|
716
721
|
'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate>;
|
|
722
|
+
/**
|
|
723
|
+
* Requires a description for `@template` tags
|
|
724
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template-description.md#repos-sticky-header
|
|
725
|
+
*/
|
|
726
|
+
'jsdoc/require-template-description'?: Linter.RuleEntry<[]>;
|
|
717
727
|
/**
|
|
718
728
|
* Requires that throw statements are documented with `@throws` tags.
|
|
719
729
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
|
|
@@ -764,6 +774,26 @@ interface RuleOptions {
|
|
|
764
774
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
765
775
|
*/
|
|
766
776
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
777
|
+
/**
|
|
778
|
+
* Prefers either function properties or method signatures
|
|
779
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
|
|
780
|
+
*/
|
|
781
|
+
'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>;
|
|
782
|
+
/**
|
|
783
|
+
* Warns against use of the empty object type
|
|
784
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
|
|
785
|
+
*/
|
|
786
|
+
'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]>;
|
|
787
|
+
/**
|
|
788
|
+
* Catches unnecessary template expressions such as string expressions within a template literal.
|
|
789
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
|
|
790
|
+
*/
|
|
791
|
+
'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>;
|
|
792
|
+
/**
|
|
793
|
+
* Prefers function types over call signatures when there are no other properties.
|
|
794
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
|
|
795
|
+
*/
|
|
796
|
+
'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType>;
|
|
767
797
|
/**
|
|
768
798
|
* Formats JSDoc type values.
|
|
769
799
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
@@ -2504,11 +2534,6 @@ interface RuleOptions {
|
|
|
2504
2534
|
* @see https://eslint.org/docs/latest/rules/radix
|
|
2505
2535
|
*/
|
|
2506
2536
|
'radix'?: Linter.RuleEntry<Radix>;
|
|
2507
|
-
/**
|
|
2508
|
-
* Disallow `children` in void DOM elements.
|
|
2509
|
-
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
2510
|
-
*/
|
|
2511
|
-
'react-dom/no-children-in-void-dom-elements'?: Linter.RuleEntry<[]>;
|
|
2512
2537
|
/**
|
|
2513
2538
|
* Disallow `dangerouslySetInnerHTML`.
|
|
2514
2539
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
@@ -2540,7 +2565,7 @@ interface RuleOptions {
|
|
|
2540
2565
|
*/
|
|
2541
2566
|
'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>;
|
|
2542
2567
|
/**
|
|
2543
|
-
* Enforces explicit `sandbox`
|
|
2568
|
+
* Enforces explicit `sandbox` prop for `iframe` elements.
|
|
2544
2569
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
2545
2570
|
*/
|
|
2546
2571
|
'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
@@ -2564,6 +2589,11 @@ interface RuleOptions {
|
|
|
2564
2589
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
2565
2590
|
*/
|
|
2566
2591
|
'react-dom/no-script-url'?: Linter.RuleEntry<[]>;
|
|
2592
|
+
/**
|
|
2593
|
+
* Disallows the use of string style prop.
|
|
2594
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
2595
|
+
*/
|
|
2596
|
+
'react-dom/no-string-style-prop'?: Linter.RuleEntry<[]>;
|
|
2567
2597
|
/**
|
|
2568
2598
|
* Disallow unknown `DOM` property.
|
|
2569
2599
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
@@ -2590,70 +2620,133 @@ interface RuleOptions {
|
|
|
2590
2620
|
*/
|
|
2591
2621
|
'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>;
|
|
2592
2622
|
/**
|
|
2593
|
-
* Enforces
|
|
2594
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
2623
|
+
* Enforces React Dom is imported via a namespace import.
|
|
2624
|
+
* @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
|
|
2595
2625
|
*/
|
|
2596
|
-
'react-
|
|
2626
|
+
'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
2597
2627
|
/**
|
|
2598
|
-
* Disallow
|
|
2599
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
2628
|
+
* Disallow direct calls to the `set` function of `useState` in `useEffect`.
|
|
2629
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
2600
2630
|
*/
|
|
2601
|
-
'react-hooks-extra/
|
|
2631
|
+
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
|
|
2602
2632
|
/**
|
|
2603
|
-
*
|
|
2604
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
2633
|
+
* Verifies that automatic effect dependencies are compiled if opted-in
|
|
2605
2634
|
*/
|
|
2606
|
-
'react-hooks
|
|
2635
|
+
'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>;
|
|
2607
2636
|
/**
|
|
2608
|
-
*
|
|
2609
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
2637
|
+
* Validates against calling capitalized functions/methods instead of using JSX
|
|
2610
2638
|
*/
|
|
2611
|
-
'react-hooks
|
|
2639
|
+
'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>;
|
|
2612
2640
|
/**
|
|
2613
|
-
*
|
|
2614
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
|
|
2641
|
+
* Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
|
|
2615
2642
|
*/
|
|
2616
|
-
'react-hooks
|
|
2643
|
+
'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>;
|
|
2617
2644
|
/**
|
|
2618
|
-
*
|
|
2619
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2645
|
+
* Validates the compiler configuration options
|
|
2620
2646
|
*/
|
|
2621
|
-
'react-hooks
|
|
2647
|
+
'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>;
|
|
2622
2648
|
/**
|
|
2623
|
-
*
|
|
2624
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
2649
|
+
* Validates usage of error boundaries instead of try/catch for errors in child components
|
|
2625
2650
|
*/
|
|
2626
|
-
'react-hooks
|
|
2651
|
+
'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>;
|
|
2627
2652
|
/**
|
|
2628
|
-
*
|
|
2629
|
-
* @see https://
|
|
2653
|
+
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
2654
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
2630
2655
|
*/
|
|
2631
|
-
'react-hooks
|
|
2656
|
+
'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>;
|
|
2632
2657
|
/**
|
|
2633
|
-
*
|
|
2634
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2658
|
+
* Validates usage of fbt
|
|
2635
2659
|
*/
|
|
2636
|
-
'react-hooks
|
|
2660
|
+
'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>;
|
|
2637
2661
|
/**
|
|
2638
|
-
*
|
|
2639
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2662
|
+
* Validates usage of `fire`
|
|
2640
2663
|
*/
|
|
2641
|
-
'react-hooks
|
|
2664
|
+
'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>;
|
|
2642
2665
|
/**
|
|
2643
|
-
*
|
|
2644
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
2666
|
+
* Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
|
|
2645
2667
|
*/
|
|
2646
|
-
'react-hooks
|
|
2668
|
+
'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>;
|
|
2647
2669
|
/**
|
|
2648
|
-
*
|
|
2649
|
-
* @see https://github.com/facebook/react/issues/14920
|
|
2670
|
+
* Validates against assignment/mutation of globals during render, part of ensuring that [side effects must render outside of render](https://react.dev/reference/rules/components-and-hooks-must-be-pure#side-effects-must-run-outside-of-render)
|
|
2650
2671
|
*/
|
|
2651
|
-
'react-hooks/
|
|
2672
|
+
'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Validates the rules of hooks
|
|
2675
|
+
*/
|
|
2676
|
+
'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>;
|
|
2677
|
+
/**
|
|
2678
|
+
* Validates against mutating props, state, and other values that [are immutable](https://react.dev/reference/rules/components-and-hooks-must-be-pure#props-and-state-are-immutable)
|
|
2679
|
+
*/
|
|
2680
|
+
'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>;
|
|
2681
|
+
/**
|
|
2682
|
+
* Validates against usage of libraries which are incompatible with memoization (manual or automatic)
|
|
2683
|
+
*/
|
|
2684
|
+
'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>;
|
|
2685
|
+
/**
|
|
2686
|
+
* Internal invariants
|
|
2687
|
+
*/
|
|
2688
|
+
'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>;
|
|
2689
|
+
/**
|
|
2690
|
+
* Validates that effect dependencies are memoized
|
|
2691
|
+
*/
|
|
2692
|
+
'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>;
|
|
2693
|
+
/**
|
|
2694
|
+
* Validates against deriving values from state in an effect
|
|
2695
|
+
*/
|
|
2696
|
+
'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>;
|
|
2697
|
+
/**
|
|
2698
|
+
* Validates that existing manual memoized is preserved by the compiler. React Compiler will only compile components and hooks if its inference [matches or exceeds the existing manual memoization](https://react.dev/learn/react-compiler/introduction#what-should-i-do-about-usememo-usecallback-and-reactmemo)
|
|
2699
|
+
*/
|
|
2700
|
+
'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>;
|
|
2701
|
+
/**
|
|
2702
|
+
* Validates that [components/hooks are pure](https://react.dev/reference/rules/components-and-hooks-must-be-pure) by checking that they do not call known-impure functions
|
|
2703
|
+
*/
|
|
2704
|
+
'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>;
|
|
2705
|
+
/**
|
|
2706
|
+
* Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
|
|
2707
|
+
*/
|
|
2708
|
+
'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>;
|
|
2709
|
+
/**
|
|
2710
|
+
* Validates against suppression of other rules
|
|
2711
|
+
*/
|
|
2712
|
+
'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>;
|
|
2652
2713
|
/**
|
|
2653
2714
|
* enforces the Rules of Hooks
|
|
2654
|
-
* @see https://
|
|
2715
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
2716
|
+
*/
|
|
2717
|
+
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>;
|
|
2718
|
+
/**
|
|
2719
|
+
* Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
|
|
2720
|
+
*/
|
|
2721
|
+
'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>;
|
|
2722
|
+
/**
|
|
2723
|
+
* Validates against setting state during render, which can trigger additional renders and potential infinite render loops
|
|
2724
|
+
*/
|
|
2725
|
+
'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>;
|
|
2726
|
+
/**
|
|
2727
|
+
* Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
|
|
2728
|
+
*/
|
|
2729
|
+
'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>;
|
|
2730
|
+
/**
|
|
2731
|
+
* Validates against invalid syntax
|
|
2732
|
+
*/
|
|
2733
|
+
'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>;
|
|
2734
|
+
/**
|
|
2735
|
+
* Unimplemented features
|
|
2736
|
+
*/
|
|
2737
|
+
'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>;
|
|
2738
|
+
/**
|
|
2739
|
+
* Validates against syntax that we do not plan to support in React Compiler
|
|
2740
|
+
*/
|
|
2741
|
+
'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>;
|
|
2742
|
+
/**
|
|
2743
|
+
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
2744
|
+
*/
|
|
2745
|
+
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
2746
|
+
/**
|
|
2747
|
+
* Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
2655
2748
|
*/
|
|
2656
|
-
'react-hooks/
|
|
2749
|
+
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
2657
2750
|
/**
|
|
2658
2751
|
* Enforces naming conventions for components.
|
|
2659
2752
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
@@ -2701,25 +2794,20 @@ interface RuleOptions {
|
|
|
2701
2794
|
*/
|
|
2702
2795
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
2703
2796
|
/**
|
|
2704
|
-
*
|
|
2705
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
2797
|
+
* Prevents dollar signs from being inserted as text nodes before expressions.
|
|
2798
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
2706
2799
|
*/
|
|
2707
|
-
'react/
|
|
2800
|
+
'react/jsx-dollar'?: Linter.RuleEntry<[]>;
|
|
2708
2801
|
/**
|
|
2709
|
-
* Enforces
|
|
2710
|
-
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
2711
|
-
*/
|
|
2712
|
-
'react/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>;
|
|
2713
|
-
/**
|
|
2714
|
-
* Disallow useless `forwardRef` calls on components that don't use `ref`s.
|
|
2715
|
-
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
2716
|
-
*/
|
|
2717
|
-
'react/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>;
|
|
2718
|
-
/**
|
|
2719
|
-
* Enforces that the 'key' attribute is placed before the spread attribute in JSX elements.
|
|
2802
|
+
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
2720
2803
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
2721
2804
|
*/
|
|
2722
2805
|
'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
|
|
2806
|
+
/**
|
|
2807
|
+
* Prevents comments from being inserted as text nodes.
|
|
2808
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
|
|
2809
|
+
*/
|
|
2810
|
+
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
2723
2811
|
/**
|
|
2724
2812
|
* Disallow duplicate props in JSX elements.
|
|
2725
2813
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
@@ -2735,6 +2823,16 @@ interface RuleOptions {
|
|
|
2735
2823
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
2736
2824
|
*/
|
|
2737
2825
|
'react/jsx-no-undef'?: Linter.RuleEntry<[]>;
|
|
2826
|
+
/**
|
|
2827
|
+
* Enforces shorthand syntax for boolean attributes.
|
|
2828
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
|
|
2829
|
+
*/
|
|
2830
|
+
'react/jsx-shorthand-boolean'?: Linter.RuleEntry<ReactJsxShorthandBoolean>;
|
|
2831
|
+
/**
|
|
2832
|
+
* Enforces shorthand syntax for fragments.
|
|
2833
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
|
|
2834
|
+
*/
|
|
2835
|
+
'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>;
|
|
2738
2836
|
/**
|
|
2739
2837
|
* Marks React variables as used when JSX is used.
|
|
2740
2838
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-react
|
|
@@ -2795,21 +2893,6 @@ interface RuleOptions {
|
|
|
2795
2893
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
2796
2894
|
*/
|
|
2797
2895
|
'react/no-clone-element'?: Linter.RuleEntry<[]>;
|
|
2798
|
-
/**
|
|
2799
|
-
* Prevents comments from being inserted as text nodes.
|
|
2800
|
-
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
2801
|
-
*/
|
|
2802
|
-
'react/no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
2803
|
-
/**
|
|
2804
|
-
* Disallow complex conditional rendering in JSX expressions.
|
|
2805
|
-
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2806
|
-
*/
|
|
2807
|
-
'react/no-complex-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
2808
|
-
/**
|
|
2809
|
-
* Disallow complex conditional rendering in JSX expressions.
|
|
2810
|
-
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2811
|
-
*/
|
|
2812
|
-
'react/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
2813
2896
|
/**
|
|
2814
2897
|
* Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
|
|
2815
2898
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
@@ -2845,16 +2928,17 @@ interface RuleOptions {
|
|
|
2845
2928
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
2846
2929
|
*/
|
|
2847
2930
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
2848
|
-
/**
|
|
2849
|
-
* Disallow duplicate props in JSX elements.
|
|
2850
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
2851
|
-
*/
|
|
2852
|
-
'react/no-duplicate-jsx-props'?: Linter.RuleEntry<[]>;
|
|
2853
2931
|
/**
|
|
2854
2932
|
* Disallow duplicate `key` on elements in the same array or a list of `children`.
|
|
2855
2933
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
2856
2934
|
*/
|
|
2857
2935
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
2936
|
+
/**
|
|
2937
|
+
* Disallow certain props on components.
|
|
2938
|
+
* @see https://eslint-react.xyz/docs/rules/no-forbidden-props
|
|
2939
|
+
* @deprecated
|
|
2940
|
+
*/
|
|
2941
|
+
'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>;
|
|
2858
2942
|
/**
|
|
2859
2943
|
* Replaces usages of `forwardRef` with passing `ref` as a prop.
|
|
2860
2944
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
@@ -2895,11 +2979,6 @@ interface RuleOptions {
|
|
|
2895
2979
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
2896
2980
|
*/
|
|
2897
2981
|
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
2898
|
-
/**
|
|
2899
|
-
* Disallow nesting component definitions inside other components.
|
|
2900
|
-
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
2901
|
-
*/
|
|
2902
|
-
'react/no-nested-components'?: Linter.RuleEntry<[]>;
|
|
2903
2982
|
/**
|
|
2904
2983
|
* Disallow nesting lazy component declarations inside other components.
|
|
2905
2984
|
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
@@ -2926,7 +3005,7 @@ interface RuleOptions {
|
|
|
2926
3005
|
*/
|
|
2927
3006
|
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
2928
3007
|
/**
|
|
2929
|
-
*
|
|
3008
|
+
* Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
|
|
2930
3009
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
2931
3010
|
*/
|
|
2932
3011
|
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
@@ -2935,6 +3014,26 @@ interface RuleOptions {
|
|
|
2935
3014
|
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
2936
3015
|
*/
|
|
2937
3016
|
'react/no-string-refs'?: Linter.RuleEntry<[]>;
|
|
3017
|
+
/**
|
|
3018
|
+
* Prevents the use of unnecessary `key` props on JSX elements when rendering lists.
|
|
3019
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
|
|
3020
|
+
*/
|
|
3021
|
+
'react/no-unnecessary-key'?: Linter.RuleEntry<[]>;
|
|
3022
|
+
/**
|
|
3023
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
3024
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
3025
|
+
*/
|
|
3026
|
+
'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
3027
|
+
/**
|
|
3028
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
3029
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
3030
|
+
*/
|
|
3031
|
+
'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
3032
|
+
/**
|
|
3033
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3034
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
3035
|
+
*/
|
|
3036
|
+
'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
2938
3037
|
/**
|
|
2939
3038
|
* Warns the usage of `UNSAFE_componentWillMount` in class components.
|
|
2940
3039
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
@@ -2959,12 +3058,17 @@ interface RuleOptions {
|
|
|
2959
3058
|
* Prevents using referential-type values as default props in object destructuring.
|
|
2960
3059
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
2961
3060
|
*/
|
|
2962
|
-
'react/no-unstable-default-props'?: Linter.RuleEntry<
|
|
3061
|
+
'react/no-unstable-default-props'?: Linter.RuleEntry<ReactNoUnstableDefaultProps>;
|
|
2963
3062
|
/**
|
|
2964
3063
|
* Warns unused class component methods and properties.
|
|
2965
3064
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
2966
3065
|
*/
|
|
2967
3066
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
3067
|
+
/**
|
|
3068
|
+
* Warns component props that are defined but never used.
|
|
3069
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
3070
|
+
*/
|
|
3071
|
+
'react/no-unused-props'?: Linter.RuleEntry<[]>;
|
|
2968
3072
|
/**
|
|
2969
3073
|
* Warns unused class component state.
|
|
2970
3074
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
@@ -2992,29 +3096,19 @@ interface RuleOptions {
|
|
|
2992
3096
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
2993
3097
|
/**
|
|
2994
3098
|
* Enforces React is imported via a namespace import.
|
|
2995
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-
|
|
3099
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
2996
3100
|
*/
|
|
2997
|
-
'react/prefer-
|
|
3101
|
+
'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
2998
3102
|
/**
|
|
2999
3103
|
* Enforces read-only props in components.
|
|
3000
3104
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
3001
3105
|
*/
|
|
3002
3106
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>;
|
|
3003
3107
|
/**
|
|
3004
|
-
* Enforces
|
|
3005
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-
|
|
3006
|
-
*/
|
|
3007
|
-
'react/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>;
|
|
3008
|
-
/**
|
|
3009
|
-
* Enforces shorthand syntax for fragments.
|
|
3010
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
3011
|
-
*/
|
|
3012
|
-
'react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>;
|
|
3013
|
-
/**
|
|
3014
|
-
* Marks variables used in JSX elements as used.
|
|
3015
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
3108
|
+
* Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
|
|
3109
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
|
|
3016
3110
|
*/
|
|
3017
|
-
'react/use-
|
|
3111
|
+
'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>;
|
|
3018
3112
|
/**
|
|
3019
3113
|
* disallow confusing quantifiers
|
|
3020
3114
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
|
|
@@ -3595,6 +3689,11 @@ interface RuleOptions {
|
|
|
3595
3689
|
* @see https://eslint.style/rules/eol-last
|
|
3596
3690
|
*/
|
|
3597
3691
|
'style/eol-last'?: Linter.RuleEntry<StyleEolLast>;
|
|
3692
|
+
/**
|
|
3693
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
3694
|
+
* @see https://eslint.style/rules/list-style
|
|
3695
|
+
*/
|
|
3696
|
+
'style/exp-list-style'?: Linter.RuleEntry<StyleExpListStyle>;
|
|
3598
3697
|
/**
|
|
3599
3698
|
* Enforce line breaks between arguments of a function call
|
|
3600
3699
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -4026,7 +4125,7 @@ interface RuleOptions {
|
|
|
4026
4125
|
*/
|
|
4027
4126
|
'template-tag-spacing'?: Linter.RuleEntry<TemplateTagSpacing>;
|
|
4028
4127
|
/**
|
|
4029
|
-
* require
|
|
4128
|
+
* require test file pattern
|
|
4030
4129
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
4031
4130
|
*/
|
|
4032
4131
|
'test/consistent-test-filename'?: Linter.RuleEntry<TestConsistentTestFilename>;
|
|
@@ -4211,6 +4310,11 @@ interface RuleOptions {
|
|
|
4211
4310
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
|
|
4212
4311
|
*/
|
|
4213
4312
|
'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
4313
|
+
/**
|
|
4314
|
+
* Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`
|
|
4315
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-exactly-once-with.md
|
|
4316
|
+
*/
|
|
4317
|
+
'test/prefer-called-exactly-once-with'?: Linter.RuleEntry<[]>;
|
|
4214
4318
|
/**
|
|
4215
4319
|
* enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
|
|
4216
4320
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
|
|
@@ -4271,6 +4375,11 @@ interface RuleOptions {
|
|
|
4271
4375
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
|
|
4272
4376
|
*/
|
|
4273
4377
|
'test/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
|
|
4378
|
+
/**
|
|
4379
|
+
* prefer dynamic import in mock
|
|
4380
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
|
|
4381
|
+
*/
|
|
4382
|
+
'test/prefer-import-in-mock'?: Linter.RuleEntry<[]>;
|
|
4274
4383
|
/**
|
|
4275
4384
|
* enforce importing Vitest globals
|
|
4276
4385
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
|
|
@@ -4346,6 +4455,11 @@ interface RuleOptions {
|
|
|
4346
4455
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
|
|
4347
4456
|
*/
|
|
4348
4457
|
'test/prefer-vi-mocked'?: Linter.RuleEntry<[]>;
|
|
4458
|
+
/**
|
|
4459
|
+
* ensure that every `expect.poll` call is awaited
|
|
4460
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-awaited-expect-poll.md
|
|
4461
|
+
*/
|
|
4462
|
+
'test/require-awaited-expect-poll'?: Linter.RuleEntry<[]>;
|
|
4349
4463
|
/**
|
|
4350
4464
|
* require setup and teardown to be within a hook
|
|
4351
4465
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
@@ -4929,7 +5043,7 @@ interface RuleOptions {
|
|
|
4929
5043
|
* Disallow member access on a value with type `any`
|
|
4930
5044
|
* @see https://typescript-eslint.io/rules/no-unsafe-member-access
|
|
4931
5045
|
*/
|
|
4932
|
-
'ts/no-unsafe-member-access'?: Linter.RuleEntry<
|
|
5046
|
+
'ts/no-unsafe-member-access'?: Linter.RuleEntry<TsNoUnsafeMemberAccess>;
|
|
4933
5047
|
/**
|
|
4934
5048
|
* Disallow returning a value with type `any` from a function
|
|
4935
5049
|
* @see https://typescript-eslint.io/rules/no-unsafe-return
|
|
@@ -4950,6 +5064,11 @@ interface RuleOptions {
|
|
|
4950
5064
|
* @see https://typescript-eslint.io/rules/no-unused-expressions
|
|
4951
5065
|
*/
|
|
4952
5066
|
'ts/no-unused-expressions'?: Linter.RuleEntry<TsNoUnusedExpressions>;
|
|
5067
|
+
/**
|
|
5068
|
+
* Disallow unused private class members
|
|
5069
|
+
* @see https://typescript-eslint.io/rules/no-unused-private-class-members
|
|
5070
|
+
*/
|
|
5071
|
+
'ts/no-unused-private-class-members'?: Linter.RuleEntry<[]>;
|
|
4953
5072
|
/**
|
|
4954
5073
|
* Disallow unused variables
|
|
4955
5074
|
* @see https://typescript-eslint.io/rules/no-unused-vars
|
|
@@ -5176,710 +5295,725 @@ interface RuleOptions {
|
|
|
5176
5295
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5177
5296
|
/**
|
|
5178
5297
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
5180
5299
|
*/
|
|
5181
5300
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5182
5301
|
/**
|
|
5183
5302
|
* Enforce a specific parameter name in catch clauses.
|
|
5184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
5185
5304
|
*/
|
|
5186
5305
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5187
5306
|
/**
|
|
5188
5307
|
* Enforce consistent assertion style with `node:assert`.
|
|
5189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
5190
5309
|
*/
|
|
5191
5310
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5192
5311
|
/**
|
|
5193
5312
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
5195
5314
|
*/
|
|
5196
5315
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5197
5316
|
/**
|
|
5198
5317
|
* Use destructured variables over properties.
|
|
5199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
5200
5319
|
*/
|
|
5201
5320
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5202
5321
|
/**
|
|
5203
5322
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5205
5324
|
*/
|
|
5206
5325
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5207
5326
|
/**
|
|
5208
5327
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
5210
5329
|
*/
|
|
5211
5330
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5212
5331
|
/**
|
|
5213
5332
|
* Move function definitions to the highest possible scope.
|
|
5214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
5215
5334
|
*/
|
|
5216
5335
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5217
5336
|
/**
|
|
5218
5337
|
* Enforce correct `Error` subclassing.
|
|
5219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
5220
5339
|
*/
|
|
5221
5340
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5222
5341
|
/**
|
|
5223
5342
|
* Enforce no spaces between braces.
|
|
5224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
5225
5344
|
*/
|
|
5226
5345
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5227
5346
|
/**
|
|
5228
5347
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
5230
5349
|
*/
|
|
5231
5350
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5232
5351
|
/**
|
|
5233
5352
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
5235
5354
|
*/
|
|
5236
5355
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5237
5356
|
/**
|
|
5238
5357
|
* Add expiration conditions to TODO comments.
|
|
5239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
5240
5359
|
*/
|
|
5241
5360
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5242
5361
|
/**
|
|
5243
5362
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
5245
5364
|
*/
|
|
5246
5365
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5247
5366
|
/**
|
|
5248
5367
|
* Enforce a case style for filenames.
|
|
5249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
5250
5369
|
*/
|
|
5251
5370
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5252
5371
|
/**
|
|
5253
5372
|
* Enforce specific import styles per module.
|
|
5254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
5255
5374
|
*/
|
|
5256
5375
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5257
5376
|
/**
|
|
5258
5377
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
5260
5379
|
*/
|
|
5261
5380
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5262
5381
|
/**
|
|
5263
5382
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5265
5384
|
*/
|
|
5266
5385
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5267
5386
|
/**
|
|
5268
5387
|
* Disallow recursive access to `this` within getters and setters.
|
|
5269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
5270
5389
|
*/
|
|
5271
5390
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5272
5391
|
/**
|
|
5273
5392
|
* Disallow anonymous functions and classes as the default export.
|
|
5274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
5275
5394
|
*/
|
|
5276
5395
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5277
5396
|
/**
|
|
5278
5397
|
* Prevent passing a function reference directly to iterator methods.
|
|
5279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
5280
5399
|
*/
|
|
5281
5400
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5282
5401
|
/**
|
|
5283
5402
|
* Prefer `for…of` over the `forEach` method.
|
|
5284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
5285
5404
|
*/
|
|
5286
5405
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5287
5406
|
/**
|
|
5288
5407
|
* Disallow using the `this` argument in array methods.
|
|
5289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
5290
5409
|
*/
|
|
5291
5410
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5292
5411
|
/**
|
|
5293
5412
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
5295
5414
|
* @deprecated
|
|
5296
5415
|
*/
|
|
5297
5416
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5298
5417
|
/**
|
|
5299
5418
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
5301
5420
|
*/
|
|
5302
5421
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5303
5422
|
/**
|
|
5304
5423
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
5306
5425
|
*/
|
|
5307
5426
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5308
5427
|
/**
|
|
5309
5428
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
5311
5430
|
*/
|
|
5312
5431
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5313
5432
|
/**
|
|
5314
5433
|
* Disallow member access from await expression.
|
|
5315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
5316
5435
|
*/
|
|
5317
5436
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5318
5437
|
/**
|
|
5319
5438
|
* Disallow using `await` in `Promise` method parameters.
|
|
5320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5321
5440
|
*/
|
|
5322
5441
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5323
5442
|
/**
|
|
5324
5443
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
5326
5445
|
*/
|
|
5327
5446
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5328
5447
|
/**
|
|
5329
5448
|
* Do not use `document.cookie` directly.
|
|
5330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
5331
5450
|
*/
|
|
5332
5451
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5333
5452
|
/**
|
|
5334
5453
|
* Disallow empty files.
|
|
5335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
5336
5455
|
*/
|
|
5337
5456
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5338
5457
|
/**
|
|
5339
5458
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
5341
5460
|
*/
|
|
5342
5461
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5343
5462
|
/**
|
|
5344
5463
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
5346
5465
|
*/
|
|
5347
5466
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5467
|
+
/**
|
|
5468
|
+
* Disallow immediate mutation after variable assignment.
|
|
5469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
5470
|
+
*/
|
|
5471
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5348
5472
|
/**
|
|
5349
5473
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5351
5475
|
* @deprecated
|
|
5352
5476
|
*/
|
|
5353
5477
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5354
5478
|
/**
|
|
5355
5479
|
* Disallow `instanceof` with built-in objects
|
|
5356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
5357
5481
|
*/
|
|
5358
5482
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5359
5483
|
/**
|
|
5360
5484
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5362
5486
|
*/
|
|
5363
5487
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5364
5488
|
/**
|
|
5365
5489
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5367
5491
|
*/
|
|
5368
5492
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5369
5493
|
/**
|
|
5370
5494
|
* Disallow identifiers starting with `new` or `class`.
|
|
5371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
5372
5496
|
*/
|
|
5373
5497
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5374
5498
|
/**
|
|
5375
5499
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5377
5501
|
* @deprecated
|
|
5378
5502
|
*/
|
|
5379
5503
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5380
5504
|
/**
|
|
5381
5505
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
5383
5507
|
*/
|
|
5384
5508
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5385
5509
|
/**
|
|
5386
5510
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5388
5512
|
*/
|
|
5389
5513
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5390
5514
|
/**
|
|
5391
5515
|
* Disallow named usage of default import and export.
|
|
5392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
5393
5517
|
*/
|
|
5394
5518
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5395
5519
|
/**
|
|
5396
5520
|
* Disallow negated conditions.
|
|
5397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
5398
5522
|
*/
|
|
5399
5523
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5400
5524
|
/**
|
|
5401
5525
|
* Disallow negated expression in equality check.
|
|
5402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5403
5527
|
*/
|
|
5404
5528
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5405
5529
|
/**
|
|
5406
5530
|
* Disallow nested ternary expressions.
|
|
5407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
5408
5532
|
*/
|
|
5409
5533
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5410
5534
|
/**
|
|
5411
5535
|
* Disallow `new Array()`.
|
|
5412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
5413
5537
|
*/
|
|
5414
5538
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5415
5539
|
/**
|
|
5416
5540
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
5418
5542
|
*/
|
|
5419
5543
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5420
5544
|
/**
|
|
5421
5545
|
* Disallow the use of the `null` literal.
|
|
5422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
5423
5547
|
*/
|
|
5424
5548
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5425
5549
|
/**
|
|
5426
5550
|
* Disallow the use of objects as default parameters.
|
|
5427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5428
5552
|
*/
|
|
5429
5553
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5430
5554
|
/**
|
|
5431
5555
|
* Disallow `process.exit()`.
|
|
5432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
5433
5557
|
*/
|
|
5434
5558
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5435
5559
|
/**
|
|
5436
5560
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5438
5562
|
*/
|
|
5439
5563
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5440
5564
|
/**
|
|
5441
5565
|
* Disallow classes that only have static members.
|
|
5442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
5443
5567
|
*/
|
|
5444
5568
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5445
5569
|
/**
|
|
5446
5570
|
* Disallow `then` property.
|
|
5447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
5448
5572
|
*/
|
|
5449
5573
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5450
5574
|
/**
|
|
5451
5575
|
* Disallow assigning `this` to a variable.
|
|
5452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
5453
5577
|
*/
|
|
5454
5578
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5455
5579
|
/**
|
|
5456
5580
|
* Disallow comparing `undefined` using `typeof`.
|
|
5457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
5458
5582
|
*/
|
|
5459
5583
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5460
5584
|
/**
|
|
5461
5585
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5463
5587
|
*/
|
|
5464
5588
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5465
5589
|
/**
|
|
5466
5590
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5468
5592
|
*/
|
|
5469
5593
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5470
5594
|
/**
|
|
5471
5595
|
* Disallow awaiting non-promise values.
|
|
5472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
5473
5597
|
*/
|
|
5474
5598
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5475
5599
|
/**
|
|
5476
5600
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5478
5602
|
*/
|
|
5479
5603
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5480
5604
|
/**
|
|
5481
5605
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5483
5607
|
*/
|
|
5484
5608
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5485
5609
|
/**
|
|
5486
5610
|
* Disallow unreadable array destructuring.
|
|
5487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5488
5612
|
*/
|
|
5489
5613
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5490
5614
|
/**
|
|
5491
5615
|
* Disallow unreadable IIFEs.
|
|
5492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
5493
5617
|
*/
|
|
5494
5618
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5495
5619
|
/**
|
|
5496
5620
|
* Disallow unused object properties.
|
|
5497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
5498
5622
|
*/
|
|
5499
5623
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5624
|
+
/**
|
|
5625
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
5627
|
+
*/
|
|
5628
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5500
5629
|
/**
|
|
5501
5630
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5503
5632
|
*/
|
|
5504
5633
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5505
5634
|
/**
|
|
5506
5635
|
* Disallow useless fallback when spreading in object literals.
|
|
5507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5508
5637
|
*/
|
|
5509
5638
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5510
5639
|
/**
|
|
5511
5640
|
* Disallow useless array length check.
|
|
5512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
5513
5642
|
*/
|
|
5514
5643
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5515
5644
|
/**
|
|
5516
5645
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5518
5647
|
*/
|
|
5519
5648
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5520
5649
|
/**
|
|
5521
5650
|
* Disallow unnecessary spread.
|
|
5522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
5523
5652
|
*/
|
|
5524
5653
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5525
5654
|
/**
|
|
5526
5655
|
* Disallow useless case in switch statements.
|
|
5527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
5528
5657
|
*/
|
|
5529
5658
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5530
5659
|
/**
|
|
5531
5660
|
* Disallow useless `undefined`.
|
|
5532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
5533
5662
|
*/
|
|
5534
5663
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5535
5664
|
/**
|
|
5536
5665
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
5538
5667
|
*/
|
|
5539
5668
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5540
5669
|
/**
|
|
5541
5670
|
* Enforce proper case for numeric literals.
|
|
5542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
5543
5672
|
*/
|
|
5544
5673
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5545
5674
|
/**
|
|
5546
5675
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
5548
5677
|
*/
|
|
5549
5678
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5550
5679
|
/**
|
|
5551
5680
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
5553
5682
|
*/
|
|
5554
5683
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5555
5684
|
/**
|
|
5556
5685
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
5558
5687
|
*/
|
|
5559
5688
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5560
5689
|
/**
|
|
5561
5690
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
5563
5692
|
*/
|
|
5564
5693
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5565
5694
|
/**
|
|
5566
5695
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
5568
5697
|
*/
|
|
5569
5698
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5570
5699
|
/**
|
|
5571
5700
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
5573
5702
|
*/
|
|
5574
5703
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5575
5704
|
/**
|
|
5576
5705
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
5578
5707
|
*/
|
|
5579
5708
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5580
5709
|
/**
|
|
5581
5710
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
5583
5712
|
*/
|
|
5584
5713
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5585
5714
|
/**
|
|
5586
5715
|
* Prefer `BigInt` literals over the constructor.
|
|
5587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
5588
5717
|
*/
|
|
5589
5718
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5590
5719
|
/**
|
|
5591
5720
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5593
5722
|
*/
|
|
5594
5723
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5595
5724
|
/**
|
|
5596
5725
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
5598
5727
|
*/
|
|
5599
5728
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5600
5729
|
/**
|
|
5601
5730
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5603
5732
|
*/
|
|
5604
5733
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5605
5734
|
/**
|
|
5606
5735
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
5608
5737
|
*/
|
|
5609
5738
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5610
5739
|
/**
|
|
5611
5740
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
5613
5742
|
*/
|
|
5614
5743
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5615
5744
|
/**
|
|
5616
5745
|
* Prefer default parameters over reassignment.
|
|
5617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
5618
5747
|
*/
|
|
5619
5748
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5620
5749
|
/**
|
|
5621
5750
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
5623
5752
|
*/
|
|
5624
5753
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5625
5754
|
/**
|
|
5626
5755
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5628
5757
|
*/
|
|
5629
5758
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5630
5759
|
/**
|
|
5631
5760
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5633
5762
|
*/
|
|
5634
5763
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5635
5764
|
/**
|
|
5636
5765
|
* Prefer `.textContent` over `.innerText`.
|
|
5637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5638
5767
|
*/
|
|
5639
5768
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5640
5769
|
/**
|
|
5641
5770
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
5643
5772
|
*/
|
|
5644
5773
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5645
5774
|
/**
|
|
5646
5775
|
* Prefer `export…from` when re-exporting.
|
|
5647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
5648
5777
|
*/
|
|
5649
5778
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5650
5779
|
/**
|
|
5651
5780
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
5653
5782
|
*/
|
|
5654
5783
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5655
5784
|
/**
|
|
5656
5785
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5658
5787
|
*/
|
|
5659
5788
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5660
5789
|
/**
|
|
5661
5790
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
5663
5792
|
*/
|
|
5664
5793
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5665
5794
|
/**
|
|
5666
5795
|
* Prefer reading a JSON file as a buffer.
|
|
5667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5668
5797
|
*/
|
|
5669
5798
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5670
5799
|
/**
|
|
5671
5800
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5673
5802
|
*/
|
|
5674
5803
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5675
5804
|
/**
|
|
5676
5805
|
* Prefer using a logical operator over a ternary.
|
|
5677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5678
5807
|
*/
|
|
5679
5808
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5680
5809
|
/**
|
|
5681
5810
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
5683
5812
|
*/
|
|
5684
5813
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5685
5814
|
/**
|
|
5686
5815
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
5688
5817
|
*/
|
|
5689
5818
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5690
5819
|
/**
|
|
5691
5820
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5693
5822
|
*/
|
|
5694
5823
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5695
5824
|
/**
|
|
5696
5825
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5698
5827
|
*/
|
|
5699
5828
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5700
5829
|
/**
|
|
5701
5830
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
5703
5832
|
*/
|
|
5704
5833
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5705
5834
|
/**
|
|
5706
5835
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5708
5837
|
*/
|
|
5709
5838
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5710
5839
|
/**
|
|
5711
5840
|
* Prefer negative index over `.length - index` when possible.
|
|
5712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
5713
5842
|
*/
|
|
5714
5843
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5715
5844
|
/**
|
|
5716
5845
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
5718
5847
|
*/
|
|
5719
5848
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5720
5849
|
/**
|
|
5721
5850
|
* Prefer `Number` static properties over global ones.
|
|
5722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
5723
5852
|
*/
|
|
5724
5853
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5725
5854
|
/**
|
|
5726
5855
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
5728
5857
|
*/
|
|
5729
5858
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5730
5859
|
/**
|
|
5731
5860
|
* Prefer omitting the `catch` binding parameter.
|
|
5732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5733
5862
|
*/
|
|
5734
5863
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5735
5864
|
/**
|
|
5736
5865
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
5738
5867
|
*/
|
|
5739
5868
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5740
5869
|
/**
|
|
5741
5870
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
5743
5872
|
*/
|
|
5744
5873
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5745
5874
|
/**
|
|
5746
5875
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
5748
5877
|
*/
|
|
5749
5878
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5750
5879
|
/**
|
|
5751
5880
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
5753
5882
|
*/
|
|
5754
5883
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5884
|
+
/**
|
|
5885
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
5887
|
+
*/
|
|
5888
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5755
5889
|
/**
|
|
5756
5890
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
5758
5892
|
*/
|
|
5759
5893
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5760
5894
|
/**
|
|
5761
5895
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
5763
5897
|
*/
|
|
5764
5898
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5765
5899
|
/**
|
|
5766
5900
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
5768
5902
|
*/
|
|
5769
5903
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5770
5904
|
/**
|
|
5771
5905
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
5773
5907
|
*/
|
|
5774
5908
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5775
5909
|
/**
|
|
5776
5910
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
5778
5912
|
*/
|
|
5779
5913
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5780
5914
|
/**
|
|
5781
5915
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
5783
5917
|
*/
|
|
5784
5918
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5785
5919
|
/**
|
|
5786
5920
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
5788
5922
|
*/
|
|
5789
5923
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5790
5924
|
/**
|
|
5791
5925
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5793
5927
|
*/
|
|
5794
5928
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5795
5929
|
/**
|
|
5796
5930
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5798
5932
|
*/
|
|
5799
5933
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5800
5934
|
/**
|
|
5801
5935
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
5803
5937
|
*/
|
|
5804
5938
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5805
5939
|
/**
|
|
5806
5940
|
* Prefer `switch` over multiple `else-if`.
|
|
5807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
5808
5942
|
*/
|
|
5809
5943
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5810
5944
|
/**
|
|
5811
5945
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
5813
5947
|
*/
|
|
5814
5948
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5815
5949
|
/**
|
|
5816
5950
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
5818
5952
|
*/
|
|
5819
5953
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5820
5954
|
/**
|
|
5821
5955
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
5823
5957
|
*/
|
|
5824
5958
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5825
5959
|
/**
|
|
5826
5960
|
* Prevent abbreviations.
|
|
5827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
5828
5962
|
*/
|
|
5829
5963
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5830
5964
|
/**
|
|
5831
5965
|
* Enforce consistent relative URL style.
|
|
5832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
5833
5967
|
*/
|
|
5834
5968
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5835
5969
|
/**
|
|
5836
5970
|
* Enforce using the separator argument with `Array#join()`.
|
|
5837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
5838
5972
|
*/
|
|
5839
5973
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5840
5974
|
/**
|
|
5841
5975
|
* Require non-empty module attributes for imports and exports
|
|
5842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
5843
5977
|
*/
|
|
5844
5978
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5845
5979
|
/**
|
|
5846
5980
|
* Require non-empty specifier list in import and export statements.
|
|
5847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
5848
5982
|
*/
|
|
5849
5983
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5850
5984
|
/**
|
|
5851
5985
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5853
5987
|
*/
|
|
5854
5988
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5855
5989
|
/**
|
|
5856
5990
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
5858
5992
|
*/
|
|
5859
5993
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5860
5994
|
/**
|
|
5861
5995
|
* Enforce better string content.
|
|
5862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
5863
5997
|
*/
|
|
5864
5998
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5865
5999
|
/**
|
|
5866
6000
|
* Enforce consistent brace style for `case` clauses.
|
|
5867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
5868
6002
|
*/
|
|
5869
6003
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5870
6004
|
/**
|
|
5871
6005
|
* Fix whitespace-insensitive template indentation.
|
|
5872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
5873
6007
|
*/
|
|
5874
6008
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5875
6009
|
/**
|
|
5876
6010
|
* Enforce consistent case for text encoding identifiers.
|
|
5877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5878
6012
|
*/
|
|
5879
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
6013
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
5880
6014
|
/**
|
|
5881
6015
|
* Require `new` when creating an error.
|
|
5882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
5883
6017
|
*/
|
|
5884
6018
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5885
6019
|
/**
|
|
@@ -7330,7 +7464,6 @@ interface RuleOptions {
|
|
|
7330
7464
|
*/
|
|
7331
7465
|
'yoda'?: Linter.RuleEntry<Yoda>;
|
|
7332
7466
|
}
|
|
7333
|
-
|
|
7334
7467
|
/* ======= Declarations ======= */
|
|
7335
7468
|
// ----- accessor-pairs -----
|
|
7336
7469
|
type AccessorPairs = [] | [{
|
|
@@ -7753,6 +7886,7 @@ type JsdocCheckPropertyNames = [] | [{
|
|
|
7753
7886
|
type JsdocCheckTagNames = [] | [{
|
|
7754
7887
|
definedTags?: string[];
|
|
7755
7888
|
enableFixer?: boolean;
|
|
7889
|
+
inlineTags?: string[];
|
|
7756
7890
|
jsxTags?: boolean;
|
|
7757
7891
|
typed?: boolean;
|
|
7758
7892
|
}];
|
|
@@ -7795,6 +7929,12 @@ type JsdocConvertToJsdocComments = [] | [{
|
|
|
7795
7929
|
type JsdocEmptyTags = [] | [{
|
|
7796
7930
|
tags?: string[];
|
|
7797
7931
|
}];
|
|
7932
|
+
// ----- jsdoc/escape-inline-tags -----
|
|
7933
|
+
type JsdocEscapeInlineTags = [] | [{
|
|
7934
|
+
allowedInlineTags?: string[];
|
|
7935
|
+
enableFixer?: boolean;
|
|
7936
|
+
fixType?: ("backticks" | "backslash");
|
|
7937
|
+
}];
|
|
7798
7938
|
// ----- jsdoc/implements-on-classes -----
|
|
7799
7939
|
type JsdocImplementsOnClasses = [] | [{
|
|
7800
7940
|
contexts?: (string | {
|
|
@@ -8081,6 +8221,7 @@ type JsdocRequireReturns = [] | [{
|
|
|
8081
8221
|
type JsdocRequireReturnsCheck = [] | [{
|
|
8082
8222
|
exemptAsync?: boolean;
|
|
8083
8223
|
exemptGenerators?: boolean;
|
|
8224
|
+
noNativeTypes?: boolean;
|
|
8084
8225
|
reportMissingReturnForUndefinedTypes?: boolean;
|
|
8085
8226
|
}];
|
|
8086
8227
|
// ----- jsdoc/require-returns-description -----
|
|
@@ -8146,6 +8287,9 @@ type JsdocSortTags = [] | [{
|
|
|
8146
8287
|
linesBetween?: number;
|
|
8147
8288
|
reportIntraTagGroupSpacing?: boolean;
|
|
8148
8289
|
reportTagGroupSpacing?: boolean;
|
|
8290
|
+
tagExceptions?: {
|
|
8291
|
+
[k: string]: number;
|
|
8292
|
+
};
|
|
8149
8293
|
tagSequence?: {
|
|
8150
8294
|
tags?: string[];
|
|
8151
8295
|
}[];
|
|
@@ -8169,16 +8313,44 @@ type JsdocTextEscaping = [] | [{
|
|
|
8169
8313
|
escapeHTML?: boolean;
|
|
8170
8314
|
escapeMarkdown?: boolean;
|
|
8171
8315
|
}];
|
|
8316
|
+
// ----- jsdoc/ts-method-signature-style -----
|
|
8317
|
+
type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
|
|
8318
|
+
enableFixer?: boolean;
|
|
8319
|
+
}];
|
|
8320
|
+
// ----- jsdoc/ts-no-unnecessary-template-expression -----
|
|
8321
|
+
type JsdocTsNoUnnecessaryTemplateExpression = [] | [{
|
|
8322
|
+
enableFixer?: boolean;
|
|
8323
|
+
}];
|
|
8324
|
+
// ----- jsdoc/ts-prefer-function-type -----
|
|
8325
|
+
type JsdocTsPreferFunctionType = [] | [{
|
|
8326
|
+
enableFixer?: boolean;
|
|
8327
|
+
}];
|
|
8172
8328
|
// ----- jsdoc/type-formatting -----
|
|
8173
8329
|
type JsdocTypeFormatting = [] | [{
|
|
8174
8330
|
arrayBrackets?: ("angle" | "square");
|
|
8331
|
+
arrowFunctionPostReturnMarkerSpacing?: string;
|
|
8332
|
+
arrowFunctionPreReturnMarkerSpacing?: string;
|
|
8175
8333
|
enableFixer?: boolean;
|
|
8334
|
+
functionOrClassParameterSpacing?: string;
|
|
8335
|
+
functionOrClassPostGenericSpacing?: string;
|
|
8336
|
+
functionOrClassPostReturnMarkerSpacing?: string;
|
|
8337
|
+
functionOrClassPreReturnMarkerSpacing?: string;
|
|
8338
|
+
functionOrClassTypeParameterSpacing?: string;
|
|
8339
|
+
genericAndTupleElementSpacing?: string;
|
|
8176
8340
|
genericDot?: boolean;
|
|
8341
|
+
keyValuePostColonSpacing?: string;
|
|
8342
|
+
keyValuePostKeySpacing?: string;
|
|
8343
|
+
keyValuePostOptionalSpacing?: string;
|
|
8344
|
+
keyValuePostVariadicSpacing?: string;
|
|
8345
|
+
methodQuotes?: ("double" | "single");
|
|
8177
8346
|
objectFieldIndent?: string;
|
|
8178
8347
|
objectFieldQuote?: ("double" | "single" | null);
|
|
8179
8348
|
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
8180
8349
|
objectFieldSeparatorOptionalLinebreak?: boolean;
|
|
8181
8350
|
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
8351
|
+
parameterDefaultValueSpacing?: string;
|
|
8352
|
+
postMethodNameSpacing?: string;
|
|
8353
|
+
postNewSpacing?: string;
|
|
8182
8354
|
separatorForSingleObjectField?: boolean;
|
|
8183
8355
|
stringQuotes?: ("double" | "single");
|
|
8184
8356
|
typeBracketSpacing?: string;
|
|
@@ -9260,12 +9432,14 @@ type NoRestrictedImports = ((string | {
|
|
|
9260
9432
|
message?: string;
|
|
9261
9433
|
importNames?: string[];
|
|
9262
9434
|
allowImportNames?: string[];
|
|
9435
|
+
allowTypeImports?: boolean;
|
|
9263
9436
|
})[] | [] | [{
|
|
9264
9437
|
paths?: (string | {
|
|
9265
9438
|
name: string;
|
|
9266
9439
|
message?: string;
|
|
9267
9440
|
importNames?: string[];
|
|
9268
9441
|
allowImportNames?: string[];
|
|
9442
|
+
allowTypeImports?: boolean;
|
|
9269
9443
|
})[];
|
|
9270
9444
|
patterns?: (string[] | ({
|
|
9271
9445
|
[k: string]: unknown | undefined;
|
|
@@ -11569,10 +11743,124 @@ type ReactDomNoUnknownProperty = [] | [{
|
|
|
11569
11743
|
ignore?: string[];
|
|
11570
11744
|
requireDataLowercase?: boolean;
|
|
11571
11745
|
}];
|
|
11746
|
+
// ----- react-hooks/automatic-effect-dependencies -----
|
|
11747
|
+
type ReactHooksAutomaticEffectDependencies = [] | [{
|
|
11748
|
+
[k: string]: unknown | undefined;
|
|
11749
|
+
}];
|
|
11750
|
+
// ----- react-hooks/capitalized-calls -----
|
|
11751
|
+
type ReactHooksCapitalizedCalls = [] | [{
|
|
11752
|
+
[k: string]: unknown | undefined;
|
|
11753
|
+
}];
|
|
11754
|
+
// ----- react-hooks/component-hook-factories -----
|
|
11755
|
+
type ReactHooksComponentHookFactories = [] | [{
|
|
11756
|
+
[k: string]: unknown | undefined;
|
|
11757
|
+
}];
|
|
11758
|
+
// ----- react-hooks/config -----
|
|
11759
|
+
type ReactHooksConfig = [] | [{
|
|
11760
|
+
[k: string]: unknown | undefined;
|
|
11761
|
+
}];
|
|
11762
|
+
// ----- react-hooks/error-boundaries -----
|
|
11763
|
+
type ReactHooksErrorBoundaries = [] | [{
|
|
11764
|
+
[k: string]: unknown | undefined;
|
|
11765
|
+
}];
|
|
11572
11766
|
// ----- react-hooks/exhaustive-deps -----
|
|
11573
11767
|
type ReactHooksExhaustiveDeps = [] | [{
|
|
11574
11768
|
additionalHooks?: string;
|
|
11575
11769
|
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
11770
|
+
experimental_autoDependenciesHooks?: string[];
|
|
11771
|
+
requireExplicitEffectDeps?: boolean;
|
|
11772
|
+
}];
|
|
11773
|
+
// ----- react-hooks/fbt -----
|
|
11774
|
+
type ReactHooksFbt = [] | [{
|
|
11775
|
+
[k: string]: unknown | undefined;
|
|
11776
|
+
}];
|
|
11777
|
+
// ----- react-hooks/fire -----
|
|
11778
|
+
type ReactHooksFire = [] | [{
|
|
11779
|
+
[k: string]: unknown | undefined;
|
|
11780
|
+
}];
|
|
11781
|
+
// ----- react-hooks/gating -----
|
|
11782
|
+
type ReactHooksGating = [] | [{
|
|
11783
|
+
[k: string]: unknown | undefined;
|
|
11784
|
+
}];
|
|
11785
|
+
// ----- react-hooks/globals -----
|
|
11786
|
+
type ReactHooksGlobals = [] | [{
|
|
11787
|
+
[k: string]: unknown | undefined;
|
|
11788
|
+
}];
|
|
11789
|
+
// ----- react-hooks/hooks -----
|
|
11790
|
+
type ReactHooksHooks = [] | [{
|
|
11791
|
+
[k: string]: unknown | undefined;
|
|
11792
|
+
}];
|
|
11793
|
+
// ----- react-hooks/immutability -----
|
|
11794
|
+
type ReactHooksImmutability = [] | [{
|
|
11795
|
+
[k: string]: unknown | undefined;
|
|
11796
|
+
}];
|
|
11797
|
+
// ----- react-hooks/incompatible-library -----
|
|
11798
|
+
type ReactHooksIncompatibleLibrary = [] | [{
|
|
11799
|
+
[k: string]: unknown | undefined;
|
|
11800
|
+
}];
|
|
11801
|
+
// ----- react-hooks/invariant -----
|
|
11802
|
+
type ReactHooksInvariant = [] | [{
|
|
11803
|
+
[k: string]: unknown | undefined;
|
|
11804
|
+
}];
|
|
11805
|
+
// ----- react-hooks/memoized-effect-dependencies -----
|
|
11806
|
+
type ReactHooksMemoizedEffectDependencies = [] | [{
|
|
11807
|
+
[k: string]: unknown | undefined;
|
|
11808
|
+
}];
|
|
11809
|
+
// ----- react-hooks/no-deriving-state-in-effects -----
|
|
11810
|
+
type ReactHooksNoDerivingStateInEffects = [] | [{
|
|
11811
|
+
[k: string]: unknown | undefined;
|
|
11812
|
+
}];
|
|
11813
|
+
// ----- react-hooks/preserve-manual-memoization -----
|
|
11814
|
+
type ReactHooksPreserveManualMemoization = [] | [{
|
|
11815
|
+
[k: string]: unknown | undefined;
|
|
11816
|
+
}];
|
|
11817
|
+
// ----- react-hooks/purity -----
|
|
11818
|
+
type ReactHooksPurity = [] | [{
|
|
11819
|
+
[k: string]: unknown | undefined;
|
|
11820
|
+
}];
|
|
11821
|
+
// ----- react-hooks/refs -----
|
|
11822
|
+
type ReactHooksRefs = [] | [{
|
|
11823
|
+
[k: string]: unknown | undefined;
|
|
11824
|
+
}];
|
|
11825
|
+
// ----- react-hooks/rule-suppression -----
|
|
11826
|
+
type ReactHooksRuleSuppression = [] | [{
|
|
11827
|
+
[k: string]: unknown | undefined;
|
|
11828
|
+
}];
|
|
11829
|
+
// ----- react-hooks/rules-of-hooks -----
|
|
11830
|
+
type ReactHooksRulesOfHooks = [] | [{
|
|
11831
|
+
additionalHooks?: string;
|
|
11832
|
+
}];
|
|
11833
|
+
// ----- react-hooks/set-state-in-effect -----
|
|
11834
|
+
type ReactHooksSetStateInEffect = [] | [{
|
|
11835
|
+
[k: string]: unknown | undefined;
|
|
11836
|
+
}];
|
|
11837
|
+
// ----- react-hooks/set-state-in-render -----
|
|
11838
|
+
type ReactHooksSetStateInRender = [] | [{
|
|
11839
|
+
[k: string]: unknown | undefined;
|
|
11840
|
+
}];
|
|
11841
|
+
// ----- react-hooks/static-components -----
|
|
11842
|
+
type ReactHooksStaticComponents = [] | [{
|
|
11843
|
+
[k: string]: unknown | undefined;
|
|
11844
|
+
}];
|
|
11845
|
+
// ----- react-hooks/syntax -----
|
|
11846
|
+
type ReactHooksSyntax = [] | [{
|
|
11847
|
+
[k: string]: unknown | undefined;
|
|
11848
|
+
}];
|
|
11849
|
+
// ----- react-hooks/todo -----
|
|
11850
|
+
type ReactHooksTodo = [] | [{
|
|
11851
|
+
[k: string]: unknown | undefined;
|
|
11852
|
+
}];
|
|
11853
|
+
// ----- react-hooks/unsupported-syntax -----
|
|
11854
|
+
type ReactHooksUnsupportedSyntax = [] | [{
|
|
11855
|
+
[k: string]: unknown | undefined;
|
|
11856
|
+
}];
|
|
11857
|
+
// ----- react-hooks/use-memo -----
|
|
11858
|
+
type ReactHooksUseMemo = [] | [{
|
|
11859
|
+
[k: string]: unknown | undefined;
|
|
11860
|
+
}];
|
|
11861
|
+
// ----- react-hooks/void-use-memo -----
|
|
11862
|
+
type ReactHooksVoidUseMemo = [] | [{
|
|
11863
|
+
[k: string]: unknown | undefined;
|
|
11576
11864
|
}];
|
|
11577
11865
|
// ----- react-naming-convention/component-name -----
|
|
11578
11866
|
type ReactNamingConventionComponentName = [] | [(("PascalCase" | "CONSTANT_CASE") | {
|
|
@@ -11599,6 +11887,24 @@ type ReactRefreshOnlyExportComponents = [] | [{
|
|
|
11599
11887
|
customHOCs?: string[];
|
|
11600
11888
|
checkJS?: boolean;
|
|
11601
11889
|
}];
|
|
11890
|
+
// ----- react/jsx-shorthand-boolean -----
|
|
11891
|
+
type ReactJsxShorthandBoolean = [] | [(-1 | 1)];
|
|
11892
|
+
// ----- react/jsx-shorthand-fragment -----
|
|
11893
|
+
type ReactJsxShorthandFragment = [] | [(-1 | 1)];
|
|
11894
|
+
// ----- react/no-forbidden-props -----
|
|
11895
|
+
type ReactNoForbiddenProps = [] | [{
|
|
11896
|
+
forbid?: (string | {
|
|
11897
|
+
excludedNodes?: string[];
|
|
11898
|
+
prop: string;
|
|
11899
|
+
} | {
|
|
11900
|
+
includedNodes?: string[];
|
|
11901
|
+
prop: string;
|
|
11902
|
+
})[];
|
|
11903
|
+
}];
|
|
11904
|
+
// ----- react/no-unstable-default-props -----
|
|
11905
|
+
type ReactNoUnstableDefaultProps = [] | [{
|
|
11906
|
+
safeDefaultProps?: string[];
|
|
11907
|
+
}];
|
|
11602
11908
|
// ----- react/no-useless-fragment -----
|
|
11603
11909
|
type ReactNoUselessFragment = [] | [{
|
|
11604
11910
|
allowExpressions?: boolean;
|
|
@@ -11993,6 +12299,50 @@ type StyleCurlyNewline = [] | [(("always" | "never") | {
|
|
|
11993
12299
|
type StyleDotLocation = [] | [("object" | "property")];
|
|
11994
12300
|
// ----- style/eol-last -----
|
|
11995
12301
|
type StyleEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
12302
|
+
// ----- style/exp-list-style -----
|
|
12303
|
+
type StyleExpListStyle = [] | [{
|
|
12304
|
+
singleLine?: _StyleExpListStyle_SingleLineConfig;
|
|
12305
|
+
multiLine?: _StyleExpListStyle_MultiLineConfig;
|
|
12306
|
+
overrides?: {
|
|
12307
|
+
"[]"?: _StyleExpListStyle_BaseConfig;
|
|
12308
|
+
"{}"?: _StyleExpListStyle_BaseConfig;
|
|
12309
|
+
"<>"?: _StyleExpListStyle_BaseConfig;
|
|
12310
|
+
"()"?: _StyleExpListStyle_BaseConfig;
|
|
12311
|
+
ArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
12312
|
+
ArrayPattern?: _StyleExpListStyle_BaseConfig;
|
|
12313
|
+
ArrowFunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
12314
|
+
CallExpression?: _StyleExpListStyle_BaseConfig;
|
|
12315
|
+
ExportNamedDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
12316
|
+
FunctionDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
12317
|
+
FunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
12318
|
+
ImportDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
12319
|
+
ImportAttributes?: _StyleExpListStyle_BaseConfig;
|
|
12320
|
+
NewExpression?: _StyleExpListStyle_BaseConfig;
|
|
12321
|
+
ObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
12322
|
+
ObjectPattern?: _StyleExpListStyle_BaseConfig;
|
|
12323
|
+
TSDeclareFunction?: _StyleExpListStyle_BaseConfig;
|
|
12324
|
+
TSFunctionType?: _StyleExpListStyle_BaseConfig;
|
|
12325
|
+
TSInterfaceBody?: _StyleExpListStyle_BaseConfig;
|
|
12326
|
+
TSEnumBody?: _StyleExpListStyle_BaseConfig;
|
|
12327
|
+
TSTupleType?: _StyleExpListStyle_BaseConfig;
|
|
12328
|
+
TSTypeLiteral?: _StyleExpListStyle_BaseConfig;
|
|
12329
|
+
TSTypeParameterDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
12330
|
+
TSTypeParameterInstantiation?: _StyleExpListStyle_BaseConfig;
|
|
12331
|
+
JSONArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
12332
|
+
JSONObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
12333
|
+
};
|
|
12334
|
+
}];
|
|
12335
|
+
interface _StyleExpListStyle_SingleLineConfig {
|
|
12336
|
+
spacing?: ("always" | "never");
|
|
12337
|
+
maxItems?: number;
|
|
12338
|
+
}
|
|
12339
|
+
interface _StyleExpListStyle_MultiLineConfig {
|
|
12340
|
+
minItems?: number;
|
|
12341
|
+
}
|
|
12342
|
+
interface _StyleExpListStyle_BaseConfig {
|
|
12343
|
+
singleLine?: _StyleExpListStyle_SingleLineConfig;
|
|
12344
|
+
multiline?: _StyleExpListStyle_MultiLineConfig;
|
|
12345
|
+
}
|
|
11996
12346
|
// ----- style/function-call-argument-newline -----
|
|
11997
12347
|
type StyleFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
|
|
11998
12348
|
// ----- style/function-call-spacing -----
|
|
@@ -12062,7 +12412,11 @@ type StyleIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
12062
12412
|
ObjectExpression?: (number | ("first" | "off"));
|
|
12063
12413
|
ImportDeclaration?: (number | ("first" | "off"));
|
|
12064
12414
|
flatTernaryExpressions?: boolean;
|
|
12065
|
-
offsetTernaryExpressions?: boolean
|
|
12415
|
+
offsetTernaryExpressions?: (boolean | {
|
|
12416
|
+
CallExpression?: boolean;
|
|
12417
|
+
AwaitExpression?: boolean;
|
|
12418
|
+
NewExpression?: boolean;
|
|
12419
|
+
});
|
|
12066
12420
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean;
|
|
12067
12421
|
ignoredNodes?: string[];
|
|
12068
12422
|
ignoreComments?: boolean;
|
|
@@ -12863,6 +13217,7 @@ type StyleObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never
|
|
|
12863
13217
|
TSInterfaceBody?: ("always" | "never");
|
|
12864
13218
|
TSEnumBody?: ("always" | "never");
|
|
12865
13219
|
};
|
|
13220
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
12866
13221
|
}];
|
|
12867
13222
|
// ----- style/object-property-newline -----
|
|
12868
13223
|
type StyleObjectPropertyNewline = [] | [{
|
|
@@ -13047,7 +13402,7 @@ type TestNoFocusedTests = [] | [{
|
|
|
13047
13402
|
}];
|
|
13048
13403
|
// ----- test/no-hooks -----
|
|
13049
13404
|
type TestNoHooks = [] | [{
|
|
13050
|
-
allow?:
|
|
13405
|
+
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[];
|
|
13051
13406
|
}];
|
|
13052
13407
|
// ----- test/no-large-snapshots -----
|
|
13053
13408
|
type TestNoLargeSnapshots = [] | [{
|
|
@@ -13940,6 +14295,10 @@ type TsNoUnnecessaryTypeAssertion = [] | [{
|
|
|
13940
14295
|
checkLiteralConstAssertions?: boolean;
|
|
13941
14296
|
typesToIgnore?: string[];
|
|
13942
14297
|
}];
|
|
14298
|
+
// ----- ts/no-unsafe-member-access -----
|
|
14299
|
+
type TsNoUnsafeMemberAccess = [] | [{
|
|
14300
|
+
allowOptionalChaining?: boolean;
|
|
14301
|
+
}];
|
|
13943
14302
|
// ----- ts/no-unused-expressions -----
|
|
13944
14303
|
type TsNoUnusedExpressions = [] | [{
|
|
13945
14304
|
allowShortCircuit?: boolean;
|
|
@@ -13957,6 +14316,7 @@ type TsNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
13957
14316
|
destructuredArrayIgnorePattern?: string;
|
|
13958
14317
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
13959
14318
|
ignoreRestSiblings?: boolean;
|
|
14319
|
+
ignoreUsingDeclarations?: boolean;
|
|
13960
14320
|
reportUsedIgnorePattern?: boolean;
|
|
13961
14321
|
vars?: ("all" | "local");
|
|
13962
14322
|
varsIgnorePattern?: string;
|
|
@@ -14407,6 +14767,10 @@ type UnicornTemplateIndent = [] | [{
|
|
|
14407
14767
|
selectors?: string[];
|
|
14408
14768
|
comments?: string[];
|
|
14409
14769
|
}];
|
|
14770
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
14771
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
14772
|
+
withDash?: boolean;
|
|
14773
|
+
}];
|
|
14410
14774
|
// ----- unocss/enforce-class-compile -----
|
|
14411
14775
|
type UnocssEnforceClassCompile = [] | [{
|
|
14412
14776
|
prefix?: string;
|
|
@@ -14426,6 +14790,7 @@ type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
|
14426
14790
|
destructuredArrayIgnorePattern?: string;
|
|
14427
14791
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
14428
14792
|
ignoreRestSiblings?: boolean;
|
|
14793
|
+
ignoreUsingDeclarations?: boolean;
|
|
14429
14794
|
reportUsedIgnorePattern?: boolean;
|
|
14430
14795
|
vars?: ("all" | "local");
|
|
14431
14796
|
varsIgnorePattern?: string;
|
|
@@ -14439,6 +14804,7 @@ type UnusedImportsNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
14439
14804
|
destructuredArrayIgnorePattern?: string;
|
|
14440
14805
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
14441
14806
|
ignoreRestSiblings?: boolean;
|
|
14807
|
+
ignoreUsingDeclarations?: boolean;
|
|
14442
14808
|
reportUsedIgnorePattern?: boolean;
|
|
14443
14809
|
vars?: ("all" | "local");
|
|
14444
14810
|
varsIgnorePattern?: string;
|
|
@@ -16019,7 +16385,7 @@ interface OptionsVue {
|
|
|
16019
16385
|
*/
|
|
16020
16386
|
sfcBlocks?: boolean | Options;
|
|
16021
16387
|
}
|
|
16022
|
-
type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides) | (OptionsTypeScriptParserOptions & OptionsOverrides);
|
|
16388
|
+
type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides & OptionsTypeScriptErasableOnly) | (OptionsTypeScriptParserOptions & OptionsOverrides & OptionsTypeScriptErasableOnly);
|
|
16023
16389
|
interface OptionsFormatters {
|
|
16024
16390
|
/**
|
|
16025
16391
|
* 启用对 CSS、Less、Sass 和 SCSS 的格式化支持.
|
|
@@ -16150,6 +16516,15 @@ interface OptionsProjectType {
|
|
|
16150
16516
|
*/
|
|
16151
16517
|
type?: 'app' | 'lib';
|
|
16152
16518
|
}
|
|
16519
|
+
interface OptionsTypeScriptErasableOnly {
|
|
16520
|
+
/**
|
|
16521
|
+
* 启用可擦除语法规则
|
|
16522
|
+
*
|
|
16523
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only
|
|
16524
|
+
* @default false
|
|
16525
|
+
*/
|
|
16526
|
+
erasableOnly?: boolean;
|
|
16527
|
+
}
|
|
16153
16528
|
interface OptionsRegExp {
|
|
16154
16529
|
/**
|
|
16155
16530
|
* Override rulelevels
|
|
@@ -16195,7 +16570,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
16195
16570
|
*
|
|
16196
16571
|
* @default 根据依赖关系自动检测
|
|
16197
16572
|
*/
|
|
16198
|
-
typescript?: boolean |
|
|
16573
|
+
typescript?: boolean | OptionsTypescript;
|
|
16199
16574
|
/**
|
|
16200
16575
|
* 启用 JSX 相关规则.
|
|
16201
16576
|
*
|
|
@@ -16474,7 +16849,7 @@ declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverri
|
|
|
16474
16849
|
declare function toml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
16475
16850
|
//#endregion
|
|
16476
16851
|
//#region src/configs/typescript.d.ts
|
|
16477
|
-
declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsProjectType): Promise<TypedFlatConfigItem[]>;
|
|
16852
|
+
declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsProjectType & OptionsTypeScriptErasableOnly): Promise<TypedFlatConfigItem[]>;
|
|
16478
16853
|
//#endregion
|
|
16479
16854
|
//#region src/configs/unicorn.d.ts
|
|
16480
16855
|
declare function unicorn(options?: OptionsUnicorn & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
@@ -16561,4 +16936,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
16561
16936
|
declare function isInEditorEnv(): boolean;
|
|
16562
16937
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
16563
16938
|
//#endregion
|
|
16564
|
-
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx,
|
|
16939
|
+
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, lincy, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|