@lincy/eslint-config 5.9.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-DWy1uDak.cjs +39 -0
- package/dist/index.cjs +64 -79
- package/dist/index.d.cts +339 -108
- package/dist/index.d.ts +340 -109
- package/dist/index.js +48 -41
- package/dist/lib-B2tdYoXA.cjs +10938 -0
- package/dist/lib-DMY_mkdT.js +10961 -0
- package/package.json +27 -26
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
2
|
+
import { Linter } from "eslint";
|
|
2
3
|
import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
3
4
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
4
5
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
5
6
|
import { Options } from "eslint-processor-vue-blocks";
|
|
6
|
-
import { Linter } from "eslint";
|
|
7
7
|
|
|
8
8
|
//#region src/typegen.d.ts
|
|
9
9
|
interface RuleOptions {
|
|
@@ -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
|
|
@@ -2504,11 +2514,6 @@ interface RuleOptions {
|
|
|
2504
2514
|
* @see https://eslint.org/docs/latest/rules/radix
|
|
2505
2515
|
*/
|
|
2506
2516
|
'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
2517
|
/**
|
|
2513
2518
|
* Disallow `dangerouslySetInnerHTML`.
|
|
2514
2519
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
@@ -2540,7 +2545,7 @@ interface RuleOptions {
|
|
|
2540
2545
|
*/
|
|
2541
2546
|
'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>;
|
|
2542
2547
|
/**
|
|
2543
|
-
* Enforces explicit `sandbox`
|
|
2548
|
+
* Enforces explicit `sandbox` prop for `iframe` elements.
|
|
2544
2549
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
2545
2550
|
*/
|
|
2546
2551
|
'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
@@ -2564,6 +2569,11 @@ interface RuleOptions {
|
|
|
2564
2569
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
2565
2570
|
*/
|
|
2566
2571
|
'react-dom/no-script-url'?: Linter.RuleEntry<[]>;
|
|
2572
|
+
/**
|
|
2573
|
+
* Disallows the use of string style prop.
|
|
2574
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
2575
|
+
*/
|
|
2576
|
+
'react-dom/no-string-style-prop'?: Linter.RuleEntry<[]>;
|
|
2567
2577
|
/**
|
|
2568
2578
|
* Disallow unknown `DOM` property.
|
|
2569
2579
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
@@ -2590,70 +2600,133 @@ interface RuleOptions {
|
|
|
2590
2600
|
*/
|
|
2591
2601
|
'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>;
|
|
2592
2602
|
/**
|
|
2593
|
-
* Enforces
|
|
2594
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
2603
|
+
* Enforces React Dom is imported via a namespace import.
|
|
2604
|
+
* @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
|
|
2595
2605
|
*/
|
|
2596
|
-
'react-
|
|
2606
|
+
'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
2597
2607
|
/**
|
|
2598
|
-
* Disallow
|
|
2599
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
2608
|
+
* Disallow direct calls to the `set` function of `useState` in `useEffect`.
|
|
2609
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
2600
2610
|
*/
|
|
2601
|
-
'react-hooks-extra/
|
|
2611
|
+
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
|
|
2602
2612
|
/**
|
|
2603
|
-
*
|
|
2604
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
2613
|
+
* Verifies that automatic effect dependencies are compiled if opted-in
|
|
2605
2614
|
*/
|
|
2606
|
-
'react-hooks
|
|
2615
|
+
'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>;
|
|
2607
2616
|
/**
|
|
2608
|
-
*
|
|
2609
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
2617
|
+
* Validates against calling capitalized functions/methods instead of using JSX
|
|
2610
2618
|
*/
|
|
2611
|
-
'react-hooks
|
|
2619
|
+
'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>;
|
|
2612
2620
|
/**
|
|
2613
|
-
*
|
|
2614
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
|
|
2621
|
+
* Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
|
|
2615
2622
|
*/
|
|
2616
|
-
'react-hooks
|
|
2623
|
+
'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>;
|
|
2617
2624
|
/**
|
|
2618
|
-
*
|
|
2619
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2625
|
+
* Validates the compiler configuration options
|
|
2620
2626
|
*/
|
|
2621
|
-
'react-hooks
|
|
2627
|
+
'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>;
|
|
2622
2628
|
/**
|
|
2623
|
-
*
|
|
2624
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
2629
|
+
* Validates usage of error boundaries instead of try/catch for errors in child components
|
|
2625
2630
|
*/
|
|
2626
|
-
'react-hooks
|
|
2631
|
+
'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>;
|
|
2627
2632
|
/**
|
|
2628
|
-
*
|
|
2629
|
-
* @see https://
|
|
2633
|
+
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
2634
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
2630
2635
|
*/
|
|
2631
|
-
'react-hooks
|
|
2636
|
+
'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>;
|
|
2632
2637
|
/**
|
|
2633
|
-
*
|
|
2634
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2638
|
+
* Validates usage of fbt
|
|
2635
2639
|
*/
|
|
2636
|
-
'react-hooks
|
|
2640
|
+
'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>;
|
|
2637
2641
|
/**
|
|
2638
|
-
*
|
|
2639
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2642
|
+
* Validates usage of `fire`
|
|
2640
2643
|
*/
|
|
2641
|
-
'react-hooks
|
|
2644
|
+
'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>;
|
|
2642
2645
|
/**
|
|
2643
|
-
*
|
|
2644
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
2646
|
+
* Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
|
|
2645
2647
|
*/
|
|
2646
|
-
'react-hooks
|
|
2648
|
+
'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>;
|
|
2647
2649
|
/**
|
|
2648
|
-
*
|
|
2649
|
-
* @see https://github.com/facebook/react/issues/14920
|
|
2650
|
+
* 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
2651
|
*/
|
|
2651
|
-
'react-hooks/
|
|
2652
|
+
'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>;
|
|
2653
|
+
/**
|
|
2654
|
+
* Validates the rules of hooks
|
|
2655
|
+
*/
|
|
2656
|
+
'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>;
|
|
2657
|
+
/**
|
|
2658
|
+
* 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)
|
|
2659
|
+
*/
|
|
2660
|
+
'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>;
|
|
2661
|
+
/**
|
|
2662
|
+
* Validates against usage of libraries which are incompatible with memoization (manual or automatic)
|
|
2663
|
+
*/
|
|
2664
|
+
'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>;
|
|
2665
|
+
/**
|
|
2666
|
+
* Internal invariants
|
|
2667
|
+
*/
|
|
2668
|
+
'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>;
|
|
2669
|
+
/**
|
|
2670
|
+
* Validates that effect dependencies are memoized
|
|
2671
|
+
*/
|
|
2672
|
+
'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Validates against deriving values from state in an effect
|
|
2675
|
+
*/
|
|
2676
|
+
'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>;
|
|
2677
|
+
/**
|
|
2678
|
+
* 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)
|
|
2679
|
+
*/
|
|
2680
|
+
'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>;
|
|
2681
|
+
/**
|
|
2682
|
+
* 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
|
|
2683
|
+
*/
|
|
2684
|
+
'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>;
|
|
2685
|
+
/**
|
|
2686
|
+
* Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
|
|
2687
|
+
*/
|
|
2688
|
+
'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>;
|
|
2689
|
+
/**
|
|
2690
|
+
* Validates against suppression of other rules
|
|
2691
|
+
*/
|
|
2692
|
+
'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>;
|
|
2652
2693
|
/**
|
|
2653
2694
|
* enforces the Rules of Hooks
|
|
2654
|
-
* @see https://
|
|
2695
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
2696
|
+
*/
|
|
2697
|
+
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>;
|
|
2698
|
+
/**
|
|
2699
|
+
* Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
|
|
2655
2700
|
*/
|
|
2656
|
-
'react-hooks/
|
|
2701
|
+
'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>;
|
|
2702
|
+
/**
|
|
2703
|
+
* Validates against setting state during render, which can trigger additional renders and potential infinite render loops
|
|
2704
|
+
*/
|
|
2705
|
+
'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>;
|
|
2706
|
+
/**
|
|
2707
|
+
* Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
|
|
2708
|
+
*/
|
|
2709
|
+
'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>;
|
|
2710
|
+
/**
|
|
2711
|
+
* Validates against invalid syntax
|
|
2712
|
+
*/
|
|
2713
|
+
'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>;
|
|
2714
|
+
/**
|
|
2715
|
+
* Unimplemented features
|
|
2716
|
+
*/
|
|
2717
|
+
'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>;
|
|
2718
|
+
/**
|
|
2719
|
+
* Validates against syntax that we do not plan to support in React Compiler
|
|
2720
|
+
*/
|
|
2721
|
+
'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>;
|
|
2722
|
+
/**
|
|
2723
|
+
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
2724
|
+
*/
|
|
2725
|
+
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
2726
|
+
/**
|
|
2727
|
+
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
2728
|
+
*/
|
|
2729
|
+
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
2657
2730
|
/**
|
|
2658
2731
|
* Enforces naming conventions for components.
|
|
2659
2732
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
@@ -2701,25 +2774,15 @@ interface RuleOptions {
|
|
|
2701
2774
|
*/
|
|
2702
2775
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
2703
2776
|
/**
|
|
2704
|
-
* Enforces
|
|
2705
|
-
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
2706
|
-
*/
|
|
2707
|
-
'react/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>;
|
|
2708
|
-
/**
|
|
2709
|
-
* Enforces explicit `<Fragment>` components instead of the shorthand `<>` or `</>` syntax.
|
|
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.
|
|
2777
|
+
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
2720
2778
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
2721
2779
|
*/
|
|
2722
2780
|
'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
|
|
2781
|
+
/**
|
|
2782
|
+
* Prevents comments from being inserted as text nodes.
|
|
2783
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
|
|
2784
|
+
*/
|
|
2785
|
+
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
2723
2786
|
/**
|
|
2724
2787
|
* Disallow duplicate props in JSX elements.
|
|
2725
2788
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
@@ -2735,6 +2798,16 @@ interface RuleOptions {
|
|
|
2735
2798
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
2736
2799
|
*/
|
|
2737
2800
|
'react/jsx-no-undef'?: Linter.RuleEntry<[]>;
|
|
2801
|
+
/**
|
|
2802
|
+
* Enforces shorthand syntax for boolean attributes.
|
|
2803
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
|
|
2804
|
+
*/
|
|
2805
|
+
'react/jsx-shorthand-boolean'?: Linter.RuleEntry<ReactJsxShorthandBoolean>;
|
|
2806
|
+
/**
|
|
2807
|
+
* Enforces shorthand syntax for fragments.
|
|
2808
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
|
|
2809
|
+
*/
|
|
2810
|
+
'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>;
|
|
2738
2811
|
/**
|
|
2739
2812
|
* Marks React variables as used when JSX is used.
|
|
2740
2813
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-react
|
|
@@ -2795,21 +2868,6 @@ interface RuleOptions {
|
|
|
2795
2868
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
2796
2869
|
*/
|
|
2797
2870
|
'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
2871
|
/**
|
|
2814
2872
|
* Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
|
|
2815
2873
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
@@ -2845,16 +2903,16 @@ interface RuleOptions {
|
|
|
2845
2903
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
2846
2904
|
*/
|
|
2847
2905
|
'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
2906
|
/**
|
|
2854
2907
|
* Disallow duplicate `key` on elements in the same array or a list of `children`.
|
|
2855
2908
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
2856
2909
|
*/
|
|
2857
2910
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
2911
|
+
/**
|
|
2912
|
+
* Disallow certain props on components.
|
|
2913
|
+
* @see https://eslint-react.xyz/docs/rules/no-forbidden-props
|
|
2914
|
+
*/
|
|
2915
|
+
'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>;
|
|
2858
2916
|
/**
|
|
2859
2917
|
* Replaces usages of `forwardRef` with passing `ref` as a prop.
|
|
2860
2918
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
@@ -2895,11 +2953,6 @@ interface RuleOptions {
|
|
|
2895
2953
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
2896
2954
|
*/
|
|
2897
2955
|
'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
2956
|
/**
|
|
2904
2957
|
* Disallow nesting lazy component declarations inside other components.
|
|
2905
2958
|
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
@@ -2926,7 +2979,7 @@ interface RuleOptions {
|
|
|
2926
2979
|
*/
|
|
2927
2980
|
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
2928
2981
|
/**
|
|
2929
|
-
*
|
|
2982
|
+
* Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
|
|
2930
2983
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
2931
2984
|
*/
|
|
2932
2985
|
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
@@ -2935,6 +2988,26 @@ interface RuleOptions {
|
|
|
2935
2988
|
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
2936
2989
|
*/
|
|
2937
2990
|
'react/no-string-refs'?: Linter.RuleEntry<[]>;
|
|
2991
|
+
/**
|
|
2992
|
+
* Prevents the use of unnecessary `key` props on JSX elements when rendering lists.
|
|
2993
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
|
|
2994
|
+
*/
|
|
2995
|
+
'react/no-unnecessary-key'?: Linter.RuleEntry<[]>;
|
|
2996
|
+
/**
|
|
2997
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
2998
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
2999
|
+
*/
|
|
3000
|
+
'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
3001
|
+
/**
|
|
3002
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
3003
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
3004
|
+
*/
|
|
3005
|
+
'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
3006
|
+
/**
|
|
3007
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3008
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
3009
|
+
*/
|
|
3010
|
+
'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
2938
3011
|
/**
|
|
2939
3012
|
* Warns the usage of `UNSAFE_componentWillMount` in class components.
|
|
2940
3013
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
@@ -2965,6 +3038,11 @@ interface RuleOptions {
|
|
|
2965
3038
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
2966
3039
|
*/
|
|
2967
3040
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
3041
|
+
/**
|
|
3042
|
+
* Warns component props that are defined but never used.
|
|
3043
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
3044
|
+
*/
|
|
3045
|
+
'react/no-unused-props'?: Linter.RuleEntry<[]>;
|
|
2968
3046
|
/**
|
|
2969
3047
|
* Warns unused class component state.
|
|
2970
3048
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
@@ -2992,29 +3070,19 @@ interface RuleOptions {
|
|
|
2992
3070
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
2993
3071
|
/**
|
|
2994
3072
|
* Enforces React is imported via a namespace import.
|
|
2995
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-
|
|
3073
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
2996
3074
|
*/
|
|
2997
|
-
'react/prefer-
|
|
3075
|
+
'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
2998
3076
|
/**
|
|
2999
3077
|
* Enforces read-only props in components.
|
|
3000
3078
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
3001
3079
|
*/
|
|
3002
3080
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>;
|
|
3003
3081
|
/**
|
|
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
|
|
3082
|
+
* Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
|
|
3083
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
|
|
3016
3084
|
*/
|
|
3017
|
-
'react/use-
|
|
3085
|
+
'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>;
|
|
3018
3086
|
/**
|
|
3019
3087
|
* disallow confusing quantifiers
|
|
3020
3088
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
|
|
@@ -4026,7 +4094,7 @@ interface RuleOptions {
|
|
|
4026
4094
|
*/
|
|
4027
4095
|
'template-tag-spacing'?: Linter.RuleEntry<TemplateTagSpacing>;
|
|
4028
4096
|
/**
|
|
4029
|
-
* require
|
|
4097
|
+
* require test file pattern
|
|
4030
4098
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
4031
4099
|
*/
|
|
4032
4100
|
'test/consistent-test-filename'?: Linter.RuleEntry<TestConsistentTestFilename>;
|
|
@@ -4211,6 +4279,11 @@ interface RuleOptions {
|
|
|
4211
4279
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
|
|
4212
4280
|
*/
|
|
4213
4281
|
'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
4282
|
+
/**
|
|
4283
|
+
* Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`
|
|
4284
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-exactly-once-with.md
|
|
4285
|
+
*/
|
|
4286
|
+
'test/prefer-called-exactly-once-with'?: Linter.RuleEntry<[]>;
|
|
4214
4287
|
/**
|
|
4215
4288
|
* enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
|
|
4216
4289
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
|
|
@@ -4271,6 +4344,11 @@ interface RuleOptions {
|
|
|
4271
4344
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
|
|
4272
4345
|
*/
|
|
4273
4346
|
'test/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
|
|
4347
|
+
/**
|
|
4348
|
+
* prefer dynamic import in mock
|
|
4349
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
|
|
4350
|
+
*/
|
|
4351
|
+
'test/prefer-import-in-mock'?: Linter.RuleEntry<[]>;
|
|
4274
4352
|
/**
|
|
4275
4353
|
* enforce importing Vitest globals
|
|
4276
4354
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
|
|
@@ -4929,7 +5007,7 @@ interface RuleOptions {
|
|
|
4929
5007
|
* Disallow member access on a value with type `any`
|
|
4930
5008
|
* @see https://typescript-eslint.io/rules/no-unsafe-member-access
|
|
4931
5009
|
*/
|
|
4932
|
-
'ts/no-unsafe-member-access'?: Linter.RuleEntry<
|
|
5010
|
+
'ts/no-unsafe-member-access'?: Linter.RuleEntry<TsNoUnsafeMemberAccess>;
|
|
4933
5011
|
/**
|
|
4934
5012
|
* Disallow returning a value with type `any` from a function
|
|
4935
5013
|
* @see https://typescript-eslint.io/rules/no-unsafe-return
|
|
@@ -7330,7 +7408,6 @@ interface RuleOptions {
|
|
|
7330
7408
|
*/
|
|
7331
7409
|
'yoda'?: Linter.RuleEntry<Yoda>;
|
|
7332
7410
|
}
|
|
7333
|
-
|
|
7334
7411
|
/* ======= Declarations ======= */
|
|
7335
7412
|
// ----- accessor-pairs -----
|
|
7336
7413
|
type AccessorPairs = [] | [{
|
|
@@ -7753,6 +7830,7 @@ type JsdocCheckPropertyNames = [] | [{
|
|
|
7753
7830
|
type JsdocCheckTagNames = [] | [{
|
|
7754
7831
|
definedTags?: string[];
|
|
7755
7832
|
enableFixer?: boolean;
|
|
7833
|
+
inlineTags?: string[];
|
|
7756
7834
|
jsxTags?: boolean;
|
|
7757
7835
|
typed?: boolean;
|
|
7758
7836
|
}];
|
|
@@ -7795,6 +7873,12 @@ type JsdocConvertToJsdocComments = [] | [{
|
|
|
7795
7873
|
type JsdocEmptyTags = [] | [{
|
|
7796
7874
|
tags?: string[];
|
|
7797
7875
|
}];
|
|
7876
|
+
// ----- jsdoc/escape-inline-tags -----
|
|
7877
|
+
type JsdocEscapeInlineTags = [] | [{
|
|
7878
|
+
allowedInlineTags?: string[];
|
|
7879
|
+
enableFixer?: boolean;
|
|
7880
|
+
fixType?: ("backticks" | "backslash");
|
|
7881
|
+
}];
|
|
7798
7882
|
// ----- jsdoc/implements-on-classes -----
|
|
7799
7883
|
type JsdocImplementsOnClasses = [] | [{
|
|
7800
7884
|
contexts?: (string | {
|
|
@@ -8081,6 +8165,7 @@ type JsdocRequireReturns = [] | [{
|
|
|
8081
8165
|
type JsdocRequireReturnsCheck = [] | [{
|
|
8082
8166
|
exemptAsync?: boolean;
|
|
8083
8167
|
exemptGenerators?: boolean;
|
|
8168
|
+
noNativeTypes?: boolean;
|
|
8084
8169
|
reportMissingReturnForUndefinedTypes?: boolean;
|
|
8085
8170
|
}];
|
|
8086
8171
|
// ----- jsdoc/require-returns-description -----
|
|
@@ -9260,12 +9345,14 @@ type NoRestrictedImports = ((string | {
|
|
|
9260
9345
|
message?: string;
|
|
9261
9346
|
importNames?: string[];
|
|
9262
9347
|
allowImportNames?: string[];
|
|
9348
|
+
allowTypeImports?: boolean;
|
|
9263
9349
|
})[] | [] | [{
|
|
9264
9350
|
paths?: (string | {
|
|
9265
9351
|
name: string;
|
|
9266
9352
|
message?: string;
|
|
9267
9353
|
importNames?: string[];
|
|
9268
9354
|
allowImportNames?: string[];
|
|
9355
|
+
allowTypeImports?: boolean;
|
|
9269
9356
|
})[];
|
|
9270
9357
|
patterns?: (string[] | ({
|
|
9271
9358
|
[k: string]: unknown | undefined;
|
|
@@ -11569,10 +11656,124 @@ type ReactDomNoUnknownProperty = [] | [{
|
|
|
11569
11656
|
ignore?: string[];
|
|
11570
11657
|
requireDataLowercase?: boolean;
|
|
11571
11658
|
}];
|
|
11659
|
+
// ----- react-hooks/automatic-effect-dependencies -----
|
|
11660
|
+
type ReactHooksAutomaticEffectDependencies = [] | [{
|
|
11661
|
+
[k: string]: unknown | undefined;
|
|
11662
|
+
}];
|
|
11663
|
+
// ----- react-hooks/capitalized-calls -----
|
|
11664
|
+
type ReactHooksCapitalizedCalls = [] | [{
|
|
11665
|
+
[k: string]: unknown | undefined;
|
|
11666
|
+
}];
|
|
11667
|
+
// ----- react-hooks/component-hook-factories -----
|
|
11668
|
+
type ReactHooksComponentHookFactories = [] | [{
|
|
11669
|
+
[k: string]: unknown | undefined;
|
|
11670
|
+
}];
|
|
11671
|
+
// ----- react-hooks/config -----
|
|
11672
|
+
type ReactHooksConfig = [] | [{
|
|
11673
|
+
[k: string]: unknown | undefined;
|
|
11674
|
+
}];
|
|
11675
|
+
// ----- react-hooks/error-boundaries -----
|
|
11676
|
+
type ReactHooksErrorBoundaries = [] | [{
|
|
11677
|
+
[k: string]: unknown | undefined;
|
|
11678
|
+
}];
|
|
11572
11679
|
// ----- react-hooks/exhaustive-deps -----
|
|
11573
11680
|
type ReactHooksExhaustiveDeps = [] | [{
|
|
11574
11681
|
additionalHooks?: string;
|
|
11575
11682
|
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
11683
|
+
experimental_autoDependenciesHooks?: string[];
|
|
11684
|
+
requireExplicitEffectDeps?: boolean;
|
|
11685
|
+
}];
|
|
11686
|
+
// ----- react-hooks/fbt -----
|
|
11687
|
+
type ReactHooksFbt = [] | [{
|
|
11688
|
+
[k: string]: unknown | undefined;
|
|
11689
|
+
}];
|
|
11690
|
+
// ----- react-hooks/fire -----
|
|
11691
|
+
type ReactHooksFire = [] | [{
|
|
11692
|
+
[k: string]: unknown | undefined;
|
|
11693
|
+
}];
|
|
11694
|
+
// ----- react-hooks/gating -----
|
|
11695
|
+
type ReactHooksGating = [] | [{
|
|
11696
|
+
[k: string]: unknown | undefined;
|
|
11697
|
+
}];
|
|
11698
|
+
// ----- react-hooks/globals -----
|
|
11699
|
+
type ReactHooksGlobals = [] | [{
|
|
11700
|
+
[k: string]: unknown | undefined;
|
|
11701
|
+
}];
|
|
11702
|
+
// ----- react-hooks/hooks -----
|
|
11703
|
+
type ReactHooksHooks = [] | [{
|
|
11704
|
+
[k: string]: unknown | undefined;
|
|
11705
|
+
}];
|
|
11706
|
+
// ----- react-hooks/immutability -----
|
|
11707
|
+
type ReactHooksImmutability = [] | [{
|
|
11708
|
+
[k: string]: unknown | undefined;
|
|
11709
|
+
}];
|
|
11710
|
+
// ----- react-hooks/incompatible-library -----
|
|
11711
|
+
type ReactHooksIncompatibleLibrary = [] | [{
|
|
11712
|
+
[k: string]: unknown | undefined;
|
|
11713
|
+
}];
|
|
11714
|
+
// ----- react-hooks/invariant -----
|
|
11715
|
+
type ReactHooksInvariant = [] | [{
|
|
11716
|
+
[k: string]: unknown | undefined;
|
|
11717
|
+
}];
|
|
11718
|
+
// ----- react-hooks/memoized-effect-dependencies -----
|
|
11719
|
+
type ReactHooksMemoizedEffectDependencies = [] | [{
|
|
11720
|
+
[k: string]: unknown | undefined;
|
|
11721
|
+
}];
|
|
11722
|
+
// ----- react-hooks/no-deriving-state-in-effects -----
|
|
11723
|
+
type ReactHooksNoDerivingStateInEffects = [] | [{
|
|
11724
|
+
[k: string]: unknown | undefined;
|
|
11725
|
+
}];
|
|
11726
|
+
// ----- react-hooks/preserve-manual-memoization -----
|
|
11727
|
+
type ReactHooksPreserveManualMemoization = [] | [{
|
|
11728
|
+
[k: string]: unknown | undefined;
|
|
11729
|
+
}];
|
|
11730
|
+
// ----- react-hooks/purity -----
|
|
11731
|
+
type ReactHooksPurity = [] | [{
|
|
11732
|
+
[k: string]: unknown | undefined;
|
|
11733
|
+
}];
|
|
11734
|
+
// ----- react-hooks/refs -----
|
|
11735
|
+
type ReactHooksRefs = [] | [{
|
|
11736
|
+
[k: string]: unknown | undefined;
|
|
11737
|
+
}];
|
|
11738
|
+
// ----- react-hooks/rule-suppression -----
|
|
11739
|
+
type ReactHooksRuleSuppression = [] | [{
|
|
11740
|
+
[k: string]: unknown | undefined;
|
|
11741
|
+
}];
|
|
11742
|
+
// ----- react-hooks/rules-of-hooks -----
|
|
11743
|
+
type ReactHooksRulesOfHooks = [] | [{
|
|
11744
|
+
additionalHooks?: string;
|
|
11745
|
+
}];
|
|
11746
|
+
// ----- react-hooks/set-state-in-effect -----
|
|
11747
|
+
type ReactHooksSetStateInEffect = [] | [{
|
|
11748
|
+
[k: string]: unknown | undefined;
|
|
11749
|
+
}];
|
|
11750
|
+
// ----- react-hooks/set-state-in-render -----
|
|
11751
|
+
type ReactHooksSetStateInRender = [] | [{
|
|
11752
|
+
[k: string]: unknown | undefined;
|
|
11753
|
+
}];
|
|
11754
|
+
// ----- react-hooks/static-components -----
|
|
11755
|
+
type ReactHooksStaticComponents = [] | [{
|
|
11756
|
+
[k: string]: unknown | undefined;
|
|
11757
|
+
}];
|
|
11758
|
+
// ----- react-hooks/syntax -----
|
|
11759
|
+
type ReactHooksSyntax = [] | [{
|
|
11760
|
+
[k: string]: unknown | undefined;
|
|
11761
|
+
}];
|
|
11762
|
+
// ----- react-hooks/todo -----
|
|
11763
|
+
type ReactHooksTodo = [] | [{
|
|
11764
|
+
[k: string]: unknown | undefined;
|
|
11765
|
+
}];
|
|
11766
|
+
// ----- react-hooks/unsupported-syntax -----
|
|
11767
|
+
type ReactHooksUnsupportedSyntax = [] | [{
|
|
11768
|
+
[k: string]: unknown | undefined;
|
|
11769
|
+
}];
|
|
11770
|
+
// ----- react-hooks/use-memo -----
|
|
11771
|
+
type ReactHooksUseMemo = [] | [{
|
|
11772
|
+
[k: string]: unknown | undefined;
|
|
11773
|
+
}];
|
|
11774
|
+
// ----- react-hooks/void-use-memo -----
|
|
11775
|
+
type ReactHooksVoidUseMemo = [] | [{
|
|
11776
|
+
[k: string]: unknown | undefined;
|
|
11576
11777
|
}];
|
|
11577
11778
|
// ----- react-naming-convention/component-name -----
|
|
11578
11779
|
type ReactNamingConventionComponentName = [] | [(("PascalCase" | "CONSTANT_CASE") | {
|
|
@@ -11599,6 +11800,20 @@ type ReactRefreshOnlyExportComponents = [] | [{
|
|
|
11599
11800
|
customHOCs?: string[];
|
|
11600
11801
|
checkJS?: boolean;
|
|
11601
11802
|
}];
|
|
11803
|
+
// ----- react/jsx-shorthand-boolean -----
|
|
11804
|
+
type ReactJsxShorthandBoolean = [] | [(-1 | 1)];
|
|
11805
|
+
// ----- react/jsx-shorthand-fragment -----
|
|
11806
|
+
type ReactJsxShorthandFragment = [] | [(-1 | 1)];
|
|
11807
|
+
// ----- react/no-forbidden-props -----
|
|
11808
|
+
type ReactNoForbiddenProps = [] | [{
|
|
11809
|
+
forbid?: (string | {
|
|
11810
|
+
excludedNodes?: string[];
|
|
11811
|
+
prop: string;
|
|
11812
|
+
} | {
|
|
11813
|
+
includedNodes?: string[];
|
|
11814
|
+
prop: string;
|
|
11815
|
+
})[];
|
|
11816
|
+
}];
|
|
11602
11817
|
// ----- react/no-useless-fragment -----
|
|
11603
11818
|
type ReactNoUselessFragment = [] | [{
|
|
11604
11819
|
allowExpressions?: boolean;
|
|
@@ -13940,6 +14155,10 @@ type TsNoUnnecessaryTypeAssertion = [] | [{
|
|
|
13940
14155
|
checkLiteralConstAssertions?: boolean;
|
|
13941
14156
|
typesToIgnore?: string[];
|
|
13942
14157
|
}];
|
|
14158
|
+
// ----- ts/no-unsafe-member-access -----
|
|
14159
|
+
type TsNoUnsafeMemberAccess = [] | [{
|
|
14160
|
+
allowOptionalChaining?: boolean;
|
|
14161
|
+
}];
|
|
13943
14162
|
// ----- ts/no-unused-expressions -----
|
|
13944
14163
|
type TsNoUnusedExpressions = [] | [{
|
|
13945
14164
|
allowShortCircuit?: boolean;
|
|
@@ -13957,6 +14176,7 @@ type TsNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
13957
14176
|
destructuredArrayIgnorePattern?: string;
|
|
13958
14177
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
13959
14178
|
ignoreRestSiblings?: boolean;
|
|
14179
|
+
ignoreUsingDeclarations?: boolean;
|
|
13960
14180
|
reportUsedIgnorePattern?: boolean;
|
|
13961
14181
|
vars?: ("all" | "local");
|
|
13962
14182
|
varsIgnorePattern?: string;
|
|
@@ -14426,6 +14646,7 @@ type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
|
14426
14646
|
destructuredArrayIgnorePattern?: string;
|
|
14427
14647
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
14428
14648
|
ignoreRestSiblings?: boolean;
|
|
14649
|
+
ignoreUsingDeclarations?: boolean;
|
|
14429
14650
|
reportUsedIgnorePattern?: boolean;
|
|
14430
14651
|
vars?: ("all" | "local");
|
|
14431
14652
|
varsIgnorePattern?: string;
|
|
@@ -14439,6 +14660,7 @@ type UnusedImportsNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
14439
14660
|
destructuredArrayIgnorePattern?: string;
|
|
14440
14661
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
14441
14662
|
ignoreRestSiblings?: boolean;
|
|
14663
|
+
ignoreUsingDeclarations?: boolean;
|
|
14442
14664
|
reportUsedIgnorePattern?: boolean;
|
|
14443
14665
|
vars?: ("all" | "local");
|
|
14444
14666
|
varsIgnorePattern?: string;
|
|
@@ -16019,7 +16241,7 @@ interface OptionsVue {
|
|
|
16019
16241
|
*/
|
|
16020
16242
|
sfcBlocks?: boolean | Options;
|
|
16021
16243
|
}
|
|
16022
|
-
type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides) | (OptionsTypeScriptParserOptions & OptionsOverrides);
|
|
16244
|
+
type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides & OptionsTypeScriptErasableOnly) | (OptionsTypeScriptParserOptions & OptionsOverrides & OptionsTypeScriptErasableOnly);
|
|
16023
16245
|
interface OptionsFormatters {
|
|
16024
16246
|
/**
|
|
16025
16247
|
* 启用对 CSS、Less、Sass 和 SCSS 的格式化支持.
|
|
@@ -16150,6 +16372,15 @@ interface OptionsProjectType {
|
|
|
16150
16372
|
*/
|
|
16151
16373
|
type?: 'app' | 'lib';
|
|
16152
16374
|
}
|
|
16375
|
+
interface OptionsTypeScriptErasableOnly {
|
|
16376
|
+
/**
|
|
16377
|
+
* 启用可擦除语法规则
|
|
16378
|
+
*
|
|
16379
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only
|
|
16380
|
+
* @default false
|
|
16381
|
+
*/
|
|
16382
|
+
erasableOnly?: boolean;
|
|
16383
|
+
}
|
|
16153
16384
|
interface OptionsRegExp {
|
|
16154
16385
|
/**
|
|
16155
16386
|
* Override rulelevels
|
|
@@ -16195,7 +16426,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
16195
16426
|
*
|
|
16196
16427
|
* @default 根据依赖关系自动检测
|
|
16197
16428
|
*/
|
|
16198
|
-
typescript?: boolean |
|
|
16429
|
+
typescript?: boolean | OptionsTypescript;
|
|
16199
16430
|
/**
|
|
16200
16431
|
* 启用 JSX 相关规则.
|
|
16201
16432
|
*
|
|
@@ -16474,7 +16705,7 @@ declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverri
|
|
|
16474
16705
|
declare function toml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
16475
16706
|
//#endregion
|
|
16476
16707
|
//#region src/configs/typescript.d.ts
|
|
16477
|
-
declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsProjectType): Promise<TypedFlatConfigItem[]>;
|
|
16708
|
+
declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsProjectType & OptionsTypeScriptErasableOnly): Promise<TypedFlatConfigItem[]>;
|
|
16478
16709
|
//#endregion
|
|
16479
16710
|
//#region src/configs/unicorn.d.ts
|
|
16480
16711
|
declare function unicorn(options?: OptionsUnicorn & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
@@ -16561,4 +16792,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
16561
16792
|
declare function isInEditorEnv(): boolean;
|
|
16562
16793
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
16563
16794
|
//#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, lincy, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
16795
|
+
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, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, lincy, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|