@liwo/eslint-config 0.1.1 → 0.2.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/index.d.ts +187 -88
- package/package.json +43 -43
package/dist/index.d.ts
CHANGED
|
@@ -387,6 +387,11 @@ interface RuleOptions {
|
|
|
387
387
|
* @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/consistent-type-specifier-style/README.md
|
|
388
388
|
*/
|
|
389
389
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>;
|
|
390
|
+
/**
|
|
391
|
+
* Ensure all exports appear after other statements.
|
|
392
|
+
* @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/exports-last/README.md
|
|
393
|
+
*/
|
|
394
|
+
'import/exports-last'?: Linter.RuleEntry<[]>;
|
|
390
395
|
/**
|
|
391
396
|
* Ensure all imports appear before other statements.
|
|
392
397
|
* @see https://github.com/9romise/eslint-plugin-import-lite/blob/main/src/rules/first/README.md
|
|
@@ -689,6 +694,11 @@ interface RuleOptions {
|
|
|
689
694
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header
|
|
690
695
|
*/
|
|
691
696
|
'jsdoc/require-property-type'?: Linter.RuleEntry<[]>;
|
|
697
|
+
/**
|
|
698
|
+
* Requires that Promise rejections are documented with `@rejects` tags.
|
|
699
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-rejects.md#repos-sticky-header
|
|
700
|
+
*/
|
|
701
|
+
'jsdoc/require-rejects'?: Linter.RuleEntry<JsdocRequireRejects>;
|
|
692
702
|
/**
|
|
693
703
|
* Requires that returns are documented with `@returns`.
|
|
694
704
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header
|
|
@@ -2535,97 +2545,97 @@ interface RuleOptions {
|
|
|
2535
2545
|
*/
|
|
2536
2546
|
'radix'?: Linter.RuleEntry<Radix>;
|
|
2537
2547
|
/**
|
|
2538
|
-
*
|
|
2548
|
+
* Disallows DOM elements from using 'dangerouslySetInnerHTML'.
|
|
2539
2549
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
2540
2550
|
*/
|
|
2541
2551
|
'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>;
|
|
2542
2552
|
/**
|
|
2543
|
-
*
|
|
2553
|
+
* Disallows DOM elements from using 'dangerouslySetInnerHTML' and 'children' at the same time.
|
|
2544
2554
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
2545
2555
|
*/
|
|
2546
2556
|
'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>;
|
|
2547
2557
|
/**
|
|
2548
|
-
*
|
|
2558
|
+
* Disallows 'findDOMNode'.
|
|
2549
2559
|
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
2550
2560
|
*/
|
|
2551
2561
|
'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>;
|
|
2552
2562
|
/**
|
|
2553
|
-
*
|
|
2563
|
+
* Disallows 'flushSync'.
|
|
2554
2564
|
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
2555
2565
|
*/
|
|
2556
2566
|
'react-dom/no-flush-sync'?: Linter.RuleEntry<[]>;
|
|
2557
2567
|
/**
|
|
2558
|
-
* Replaces
|
|
2568
|
+
* Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'.
|
|
2559
2569
|
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
2560
2570
|
*/
|
|
2561
2571
|
'react-dom/no-hydrate'?: Linter.RuleEntry<[]>;
|
|
2562
2572
|
/**
|
|
2563
|
-
* Enforces explicit
|
|
2573
|
+
* Enforces an explicit 'type' attribute for 'button' elements.
|
|
2564
2574
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
2565
2575
|
*/
|
|
2566
2576
|
'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>;
|
|
2567
2577
|
/**
|
|
2568
|
-
* Enforces explicit
|
|
2578
|
+
* Enforces an explicit 'sandbox' attribute for 'iframe' elements.
|
|
2569
2579
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
2570
2580
|
*/
|
|
2571
2581
|
'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
2572
2582
|
/**
|
|
2573
|
-
* Enforces the absence of a
|
|
2583
|
+
* Enforces the absence of a 'namespace' in React elements.
|
|
2574
2584
|
* @see https://eslint-react.xyz/docs/rules/dom-no-namespace
|
|
2575
2585
|
*/
|
|
2576
2586
|
'react-dom/no-namespace'?: Linter.RuleEntry<[]>;
|
|
2577
2587
|
/**
|
|
2578
|
-
* Replaces
|
|
2588
|
+
* Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'.
|
|
2579
2589
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
2580
2590
|
*/
|
|
2581
2591
|
'react-dom/no-render'?: Linter.RuleEntry<[]>;
|
|
2582
2592
|
/**
|
|
2583
|
-
*
|
|
2593
|
+
* Disallows the return value of 'ReactDOM.render'.
|
|
2584
2594
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
2585
2595
|
*/
|
|
2586
2596
|
'react-dom/no-render-return-value'?: Linter.RuleEntry<[]>;
|
|
2587
2597
|
/**
|
|
2588
|
-
*
|
|
2598
|
+
* Disallows 'javascript:' URLs as attribute values.
|
|
2589
2599
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
2590
2600
|
*/
|
|
2591
2601
|
'react-dom/no-script-url'?: Linter.RuleEntry<[]>;
|
|
2592
2602
|
/**
|
|
2593
|
-
* Disallows the use of string style prop.
|
|
2603
|
+
* Disallows the use of string style prop in JSX. Use an object instead.
|
|
2594
2604
|
* @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
2595
2605
|
*/
|
|
2596
2606
|
'react-dom/no-string-style-prop'?: Linter.RuleEntry<[]>;
|
|
2597
2607
|
/**
|
|
2598
|
-
*
|
|
2608
|
+
* Disallows unknown 'DOM' properties.
|
|
2599
2609
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
2600
2610
|
*/
|
|
2601
2611
|
'react-dom/no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>;
|
|
2602
2612
|
/**
|
|
2603
|
-
* Enforces
|
|
2613
|
+
* Enforces 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
|
|
2604
2614
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
2605
2615
|
*/
|
|
2606
2616
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
2607
2617
|
/**
|
|
2608
|
-
*
|
|
2618
|
+
* Disallows 'target="_blank"' without 'rel="noreferrer noopener"'.
|
|
2609
2619
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
2610
2620
|
*/
|
|
2611
2621
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>;
|
|
2612
2622
|
/**
|
|
2613
|
-
* Replaces
|
|
2623
|
+
* Replaces usage of 'useFormState' with 'useActionState'.
|
|
2614
2624
|
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
2615
2625
|
*/
|
|
2616
2626
|
'react-dom/no-use-form-state'?: Linter.RuleEntry<[]>;
|
|
2617
2627
|
/**
|
|
2618
|
-
*
|
|
2628
|
+
* Disallows 'children' in void DOM elements.
|
|
2619
2629
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
2620
2630
|
*/
|
|
2621
2631
|
'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>;
|
|
2622
2632
|
/**
|
|
2623
|
-
* Enforces React
|
|
2633
|
+
* Enforces importing React DOM via a namespace import.
|
|
2624
2634
|
* @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
|
|
2625
2635
|
*/
|
|
2626
2636
|
'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
2627
2637
|
/**
|
|
2628
|
-
*
|
|
2638
|
+
* Disallows direct calls to the ['set' function](https://react.dev/reference/react/useState#setstate) of 'useState' in 'useEffect'.
|
|
2629
2639
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
2630
2640
|
*/
|
|
2631
2641
|
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
|
|
@@ -2753,83 +2763,93 @@ interface RuleOptions {
|
|
|
2753
2763
|
*/
|
|
2754
2764
|
'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>;
|
|
2755
2765
|
/**
|
|
2756
|
-
* Enforces context name to be a valid component name with the suffix
|
|
2766
|
+
* Enforces the context name to be a valid component name with the suffix 'Context'.
|
|
2757
2767
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
2758
2768
|
*/
|
|
2759
2769
|
'react-naming-convention/context-name'?: Linter.RuleEntry<[]>;
|
|
2760
2770
|
/**
|
|
2761
|
-
* Enforces consistent file
|
|
2771
|
+
* Enforces consistent file-naming conventions.
|
|
2762
2772
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename
|
|
2763
2773
|
*/
|
|
2764
2774
|
'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>;
|
|
2765
2775
|
/**
|
|
2766
|
-
* Enforces consistent file
|
|
2776
|
+
* Enforces consistent use of the JSX file extension.
|
|
2767
2777
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
|
|
2768
2778
|
*/
|
|
2769
2779
|
'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>;
|
|
2770
2780
|
/**
|
|
2771
|
-
* Enforces
|
|
2781
|
+
* Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
|
|
2782
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
|
|
2783
|
+
*/
|
|
2784
|
+
'react-naming-convention/ref-name'?: Linter.RuleEntry<[]>;
|
|
2785
|
+
/**
|
|
2786
|
+
* Enforces destructuring and symmetric naming of the 'useState' hook value and setter.
|
|
2772
2787
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
2773
2788
|
*/
|
|
2774
|
-
'react-naming-convention/use-state'?: Linter.RuleEntry<
|
|
2789
|
+
'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>;
|
|
2775
2790
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
2776
2791
|
/**
|
|
2777
|
-
*
|
|
2792
|
+
* Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'.
|
|
2778
2793
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
2779
2794
|
*/
|
|
2780
2795
|
'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]>;
|
|
2781
2796
|
/**
|
|
2782
|
-
*
|
|
2797
|
+
* Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
|
|
2783
2798
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
2784
2799
|
*/
|
|
2785
2800
|
'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]>;
|
|
2786
2801
|
/**
|
|
2787
|
-
*
|
|
2802
|
+
* Enforces that every 'ResizeObserver' created in a component or custom hook has a corresponding 'ResizeObserver.disconnect()'.
|
|
2788
2803
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
2789
2804
|
*/
|
|
2790
2805
|
'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]>;
|
|
2791
2806
|
/**
|
|
2792
|
-
*
|
|
2807
|
+
* Enforces that every 'setTimeout' in a component or custom hook has a corresponding 'clearTimeout'.
|
|
2793
2808
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
2794
2809
|
*/
|
|
2795
2810
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
2796
2811
|
/**
|
|
2797
|
-
*
|
|
2812
|
+
* Prevents unnecessary dollar signs ('$') from being inserted before an expression in JSX.
|
|
2813
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
2814
|
+
*/
|
|
2815
|
+
'react/jsx-dollar'?: Linter.RuleEntry<[]>;
|
|
2816
|
+
/**
|
|
2817
|
+
* Enforces that the 'key' prop is placed before the spread prop in JSX elements when using the new JSX transform.
|
|
2798
2818
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
2799
2819
|
*/
|
|
2800
2820
|
'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
|
|
2801
2821
|
/**
|
|
2802
|
-
* Prevents
|
|
2822
|
+
* Prevents comment strings (e.g., beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
|
|
2803
2823
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
|
|
2804
2824
|
*/
|
|
2805
2825
|
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
2806
2826
|
/**
|
|
2807
|
-
*
|
|
2827
|
+
* Disallows duplicate props in JSX elements.
|
|
2808
2828
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
2809
2829
|
*/
|
|
2810
2830
|
'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>;
|
|
2811
2831
|
/**
|
|
2812
|
-
* Disallows 'IIFE' in JSX
|
|
2832
|
+
* Disallows 'IIFE' in JSX.
|
|
2813
2833
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-iife
|
|
2814
2834
|
*/
|
|
2815
2835
|
'react/jsx-no-iife'?: Linter.RuleEntry<[]>;
|
|
2816
2836
|
/**
|
|
2817
|
-
*
|
|
2837
|
+
* Prevents using variables in JSX that are not defined in the scope.
|
|
2818
2838
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
2819
2839
|
*/
|
|
2820
2840
|
'react/jsx-no-undef'?: Linter.RuleEntry<[]>;
|
|
2821
2841
|
/**
|
|
2822
|
-
* Enforces shorthand syntax for boolean attributes.
|
|
2842
|
+
* Enforces the use of shorthand syntax for boolean attributes.
|
|
2823
2843
|
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
|
|
2824
2844
|
*/
|
|
2825
2845
|
'react/jsx-shorthand-boolean'?: Linter.RuleEntry<ReactJsxShorthandBoolean>;
|
|
2826
2846
|
/**
|
|
2827
|
-
* Enforces shorthand syntax for fragments.
|
|
2847
|
+
* Enforces the use of shorthand syntax for fragments.
|
|
2828
2848
|
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
|
|
2829
2849
|
*/
|
|
2830
2850
|
'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>;
|
|
2831
2851
|
/**
|
|
2832
|
-
* Marks React variables as used when JSX is
|
|
2852
|
+
* Marks React variables as used when JSX is present.
|
|
2833
2853
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-react
|
|
2834
2854
|
*/
|
|
2835
2855
|
'react/jsx-uses-react'?: Linter.RuleEntry<[]>;
|
|
@@ -2839,107 +2859,108 @@ interface RuleOptions {
|
|
|
2839
2859
|
*/
|
|
2840
2860
|
'react/jsx-uses-vars'?: Linter.RuleEntry<[]>;
|
|
2841
2861
|
/**
|
|
2842
|
-
*
|
|
2862
|
+
* Disallows accessing 'this.state' inside 'setState' calls.
|
|
2843
2863
|
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
2844
2864
|
*/
|
|
2845
2865
|
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
2846
2866
|
/**
|
|
2847
|
-
*
|
|
2867
|
+
* Disallows using an item's index in the array as its key.
|
|
2848
2868
|
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
2849
2869
|
*/
|
|
2850
2870
|
'react/no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
2851
2871
|
/**
|
|
2852
|
-
*
|
|
2872
|
+
* Disallows the use of 'Children.count' from the 'react' package.
|
|
2853
2873
|
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
2854
2874
|
*/
|
|
2855
2875
|
'react/no-children-count'?: Linter.RuleEntry<[]>;
|
|
2856
2876
|
/**
|
|
2857
|
-
*
|
|
2877
|
+
* Disallows the use of 'Children.forEach' from the 'react' package.
|
|
2858
2878
|
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
2859
2879
|
*/
|
|
2860
2880
|
'react/no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
2861
2881
|
/**
|
|
2862
|
-
*
|
|
2882
|
+
* Disallows the use of 'Children.map' from the 'react' package.
|
|
2863
2883
|
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
2864
2884
|
*/
|
|
2865
2885
|
'react/no-children-map'?: Linter.RuleEntry<[]>;
|
|
2866
2886
|
/**
|
|
2867
|
-
*
|
|
2887
|
+
* Disallows the use of 'Children.only' from the 'react' package.
|
|
2868
2888
|
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
2869
2889
|
*/
|
|
2870
2890
|
'react/no-children-only'?: Linter.RuleEntry<[]>;
|
|
2871
2891
|
/**
|
|
2872
|
-
*
|
|
2892
|
+
* Disallows passing 'children' as a prop.
|
|
2873
2893
|
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
2874
2894
|
*/
|
|
2875
2895
|
'react/no-children-prop'?: Linter.RuleEntry<[]>;
|
|
2876
2896
|
/**
|
|
2877
|
-
*
|
|
2897
|
+
* Disallows the use of 'Children.toArray' from the 'react' package.
|
|
2878
2898
|
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
2879
2899
|
*/
|
|
2880
2900
|
'react/no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
2881
2901
|
/**
|
|
2882
|
-
*
|
|
2902
|
+
* Disallows class components except for error boundaries.
|
|
2883
2903
|
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
2884
2904
|
*/
|
|
2885
2905
|
'react/no-class-component'?: Linter.RuleEntry<[]>;
|
|
2886
2906
|
/**
|
|
2887
|
-
*
|
|
2907
|
+
* Disallows 'cloneElement'.
|
|
2888
2908
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
2889
2909
|
*/
|
|
2890
2910
|
'react/no-clone-element'?: Linter.RuleEntry<[]>;
|
|
2891
2911
|
/**
|
|
2892
|
-
*
|
|
2912
|
+
* Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
|
|
2893
2913
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
2894
2914
|
*/
|
|
2895
2915
|
'react/no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
2896
2916
|
/**
|
|
2897
|
-
*
|
|
2917
|
+
* Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
|
|
2898
2918
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
2899
2919
|
*/
|
|
2900
2920
|
'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
2901
2921
|
/**
|
|
2902
|
-
*
|
|
2922
|
+
* Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
|
|
2903
2923
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
2904
2924
|
*/
|
|
2905
2925
|
'react/no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
2906
2926
|
/**
|
|
2907
|
-
*
|
|
2927
|
+
* Replaces usage of '<Context.Provider>' with '<Context>'.
|
|
2908
2928
|
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
2909
2929
|
*/
|
|
2910
2930
|
'react/no-context-provider'?: Linter.RuleEntry<[]>;
|
|
2911
2931
|
/**
|
|
2912
|
-
*
|
|
2932
|
+
* Disallows 'createRef' in function components.
|
|
2913
2933
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
2914
2934
|
*/
|
|
2915
2935
|
'react/no-create-ref'?: Linter.RuleEntry<[]>;
|
|
2916
2936
|
/**
|
|
2917
|
-
*
|
|
2937
|
+
* Disallows the 'defaultProps' property in favor of ES6 default parameters.
|
|
2918
2938
|
* @see https://eslint-react.xyz/docs/rules/no-default-props
|
|
2919
2939
|
*/
|
|
2920
2940
|
'react/no-default-props'?: Linter.RuleEntry<[]>;
|
|
2921
2941
|
/**
|
|
2922
|
-
*
|
|
2942
|
+
* Disallows direct mutation of 'this.state'.
|
|
2923
2943
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
2924
2944
|
*/
|
|
2925
2945
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
2926
2946
|
/**
|
|
2927
|
-
*
|
|
2947
|
+
* Prevents duplicate 'key' props on sibling elements when rendering lists.
|
|
2928
2948
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
2929
2949
|
*/
|
|
2930
2950
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
2931
2951
|
/**
|
|
2932
|
-
*
|
|
2952
|
+
* Disallows certain props on components.
|
|
2933
2953
|
* @see https://eslint-react.xyz/docs/rules/no-forbidden-props
|
|
2954
|
+
* @deprecated
|
|
2934
2955
|
*/
|
|
2935
2956
|
'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>;
|
|
2936
2957
|
/**
|
|
2937
|
-
* Replaces
|
|
2958
|
+
* Replaces usage of 'forwardRef' with passing 'ref' as a prop.
|
|
2938
2959
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
2939
2960
|
*/
|
|
2940
2961
|
'react/no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
2941
2962
|
/**
|
|
2942
|
-
* Prevents
|
|
2963
|
+
* Prevents 'key' from not being explicitly specified (e.g., spreading 'key' from objects).
|
|
2943
2964
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
2944
2965
|
*/
|
|
2945
2966
|
'react/no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
@@ -2949,57 +2970,57 @@ interface RuleOptions {
|
|
|
2949
2970
|
*/
|
|
2950
2971
|
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
2951
2972
|
/**
|
|
2952
|
-
* Enforces that all components have a
|
|
2973
|
+
* Enforces that all components have a 'displayName' that can be used in devtools.
|
|
2953
2974
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
2954
2975
|
*/
|
|
2955
2976
|
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
2956
2977
|
/**
|
|
2957
|
-
* Enforces that all contexts have a
|
|
2978
|
+
* Enforces that all contexts have a 'displayName' that can be used in devtools.
|
|
2958
2979
|
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
2959
2980
|
*/
|
|
2960
2981
|
'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
2961
2982
|
/**
|
|
2962
|
-
*
|
|
2983
|
+
* Disallows missing 'key' on items in list rendering.
|
|
2963
2984
|
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
2964
2985
|
*/
|
|
2965
2986
|
'react/no-missing-key'?: Linter.RuleEntry<[]>;
|
|
2966
2987
|
/**
|
|
2967
|
-
* Prevents incorrect usage of
|
|
2988
|
+
* Prevents incorrect usage of 'captureOwnerStack'.
|
|
2968
2989
|
* @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
2969
2990
|
*/
|
|
2970
2991
|
'react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
2971
2992
|
/**
|
|
2972
|
-
*
|
|
2993
|
+
* Disallows nesting component definitions inside other components.
|
|
2973
2994
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
2974
2995
|
*/
|
|
2975
2996
|
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
2976
2997
|
/**
|
|
2977
|
-
*
|
|
2998
|
+
* Disallows nesting lazy component declarations inside other components.
|
|
2978
2999
|
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
2979
3000
|
*/
|
|
2980
3001
|
'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
2981
3002
|
/**
|
|
2982
|
-
*
|
|
3003
|
+
* Disallows 'propTypes' in favor of TypeScript or another type-checking solution.
|
|
2983
3004
|
* @see https://eslint-react.xyz/docs/rules/no-prop-types
|
|
2984
3005
|
*/
|
|
2985
3006
|
'react/no-prop-types'?: Linter.RuleEntry<[]>;
|
|
2986
3007
|
/**
|
|
2987
|
-
*
|
|
3008
|
+
* Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
|
|
2988
3009
|
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
2989
3010
|
*/
|
|
2990
3011
|
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
|
|
2991
3012
|
/**
|
|
2992
|
-
*
|
|
3013
|
+
* Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
|
|
2993
3014
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
2994
3015
|
*/
|
|
2995
3016
|
'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
2996
3017
|
/**
|
|
2997
|
-
*
|
|
3018
|
+
* Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
|
|
2998
3019
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
2999
3020
|
*/
|
|
3000
3021
|
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
3001
3022
|
/**
|
|
3002
|
-
*
|
|
3023
|
+
* Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
|
|
3003
3024
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
3004
3025
|
*/
|
|
3005
3026
|
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
@@ -3009,42 +3030,47 @@ interface RuleOptions {
|
|
|
3009
3030
|
*/
|
|
3010
3031
|
'react/no-string-refs'?: Linter.RuleEntry<[]>;
|
|
3011
3032
|
/**
|
|
3012
|
-
*
|
|
3033
|
+
* Disallows unnecessary 'key' props on elements.
|
|
3013
3034
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
|
|
3014
3035
|
*/
|
|
3015
3036
|
'react/no-unnecessary-key'?: Linter.RuleEntry<[]>;
|
|
3016
3037
|
/**
|
|
3017
|
-
*
|
|
3038
|
+
* Disallows unnecessary usage of 'useCallback'.
|
|
3018
3039
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
3019
3040
|
*/
|
|
3020
3041
|
'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
3021
3042
|
/**
|
|
3022
|
-
*
|
|
3043
|
+
* Disallows unnecessary usage of 'useMemo'.
|
|
3023
3044
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
3024
3045
|
*/
|
|
3025
3046
|
'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
3026
3047
|
/**
|
|
3027
|
-
* Enforces that a function with the
|
|
3048
|
+
* Enforces that a function with the 'use' prefix uses at least one Hook inside it.
|
|
3028
3049
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
3029
3050
|
*/
|
|
3030
3051
|
'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
3031
3052
|
/**
|
|
3032
|
-
*
|
|
3053
|
+
* Disallows unnecessary usage of 'useRef'.
|
|
3054
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-ref
|
|
3055
|
+
*/
|
|
3056
|
+
'react/no-unnecessary-use-ref'?: Linter.RuleEntry<[]>;
|
|
3057
|
+
/**
|
|
3058
|
+
* Warns about the use of 'UNSAFE_componentWillMount' in class components.
|
|
3033
3059
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
3034
3060
|
*/
|
|
3035
3061
|
'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
3036
3062
|
/**
|
|
3037
|
-
* Warns the
|
|
3063
|
+
* Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
|
|
3038
3064
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
3039
3065
|
*/
|
|
3040
3066
|
'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
3041
3067
|
/**
|
|
3042
|
-
* Warns the
|
|
3068
|
+
* Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
|
|
3043
3069
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
3044
3070
|
*/
|
|
3045
3071
|
'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
3046
3072
|
/**
|
|
3047
|
-
* Prevents non-stable values (i.e
|
|
3073
|
+
* Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
|
|
3048
3074
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
3049
3075
|
*/
|
|
3050
3076
|
'react/no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
@@ -3052,34 +3078,34 @@ interface RuleOptions {
|
|
|
3052
3078
|
* Prevents using referential-type values as default props in object destructuring.
|
|
3053
3079
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
3054
3080
|
*/
|
|
3055
|
-
'react/no-unstable-default-props'?: Linter.RuleEntry<
|
|
3081
|
+
'react/no-unstable-default-props'?: Linter.RuleEntry<ReactNoUnstableDefaultProps>;
|
|
3056
3082
|
/**
|
|
3057
|
-
* Warns unused class component methods and properties.
|
|
3083
|
+
* Warns about unused class component methods and properties.
|
|
3058
3084
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
3059
3085
|
*/
|
|
3060
3086
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
3061
3087
|
/**
|
|
3062
|
-
* Warns component props that are defined but never used.
|
|
3088
|
+
* Warns about component props that are defined but never used.
|
|
3063
3089
|
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
3064
3090
|
*/
|
|
3065
3091
|
'react/no-unused-props'?: Linter.RuleEntry<[]>;
|
|
3066
3092
|
/**
|
|
3067
|
-
* Warns unused class component state.
|
|
3093
|
+
* Warns about unused class component state.
|
|
3068
3094
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
3069
3095
|
*/
|
|
3070
3096
|
'react/no-unused-state'?: Linter.RuleEntry<[]>;
|
|
3071
3097
|
/**
|
|
3072
|
-
* Replaces
|
|
3098
|
+
* Replaces usage of 'useContext' with 'use'.
|
|
3073
3099
|
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
3074
3100
|
*/
|
|
3075
3101
|
'react/no-use-context'?: Linter.RuleEntry<[]>;
|
|
3076
3102
|
/**
|
|
3077
|
-
*
|
|
3103
|
+
* Disallows useless 'forwardRef' calls on components that don't use 'ref's.
|
|
3078
3104
|
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
3079
3105
|
*/
|
|
3080
3106
|
'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>;
|
|
3081
3107
|
/**
|
|
3082
|
-
*
|
|
3108
|
+
* Disallows useless fragment elements.
|
|
3083
3109
|
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
3084
3110
|
*/
|
|
3085
3111
|
'react/no-useless-fragment'?: Linter.RuleEntry<ReactNoUselessFragment>;
|
|
@@ -3089,7 +3115,7 @@ interface RuleOptions {
|
|
|
3089
3115
|
*/
|
|
3090
3116
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
3091
3117
|
/**
|
|
3092
|
-
* Enforces React
|
|
3118
|
+
* Enforces importing React via a namespace import.
|
|
3093
3119
|
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
3094
3120
|
*/
|
|
3095
3121
|
'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
@@ -3099,7 +3125,7 @@ interface RuleOptions {
|
|
|
3099
3125
|
*/
|
|
3100
3126
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>;
|
|
3101
3127
|
/**
|
|
3102
|
-
* Enforces function calls made inside
|
|
3128
|
+
* Enforces wrapping function calls made inside 'useState' in an 'initializer function'.
|
|
3103
3129
|
* @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
|
|
3104
3130
|
*/
|
|
3105
3131
|
'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>;
|
|
@@ -4118,6 +4144,11 @@ interface RuleOptions {
|
|
|
4118
4144
|
* @deprecated
|
|
4119
4145
|
*/
|
|
4120
4146
|
'template-tag-spacing'?: Linter.RuleEntry<TemplateTagSpacing>;
|
|
4147
|
+
/**
|
|
4148
|
+
* enforce using `.each` or `.for` consistently
|
|
4149
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-each-for.md
|
|
4150
|
+
*/
|
|
4151
|
+
'test/consistent-each-for'?: Linter.RuleEntry<TestConsistentEachFor>;
|
|
4121
4152
|
/**
|
|
4122
4153
|
* require test file pattern
|
|
4123
4154
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
@@ -4264,6 +4295,11 @@ interface RuleOptions {
|
|
|
4264
4295
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
|
|
4265
4296
|
*/
|
|
4266
4297
|
'test/no-test-return-statement'?: Linter.RuleEntry<[]>;
|
|
4298
|
+
/**
|
|
4299
|
+
* Disallow unnecessary async function wrapper for expected promises
|
|
4300
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-unneeded-async-expect-function.md
|
|
4301
|
+
*/
|
|
4302
|
+
'test/no-unneeded-async-expect-function'?: Linter.RuleEntry<[]>;
|
|
4267
4303
|
/**
|
|
4268
4304
|
* Enforce padding around `afterAll` blocks
|
|
4269
4305
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
|
|
@@ -4340,7 +4376,7 @@ interface RuleOptions {
|
|
|
4340
4376
|
*/
|
|
4341
4377
|
'test/prefer-each'?: Linter.RuleEntry<[]>;
|
|
4342
4378
|
/**
|
|
4343
|
-
* enforce using the built-in
|
|
4379
|
+
* enforce using the built-in equality matchers
|
|
4344
4380
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
|
|
4345
4381
|
*/
|
|
4346
4382
|
'test/prefer-equality-matcher'?: Linter.RuleEntry<[]>;
|
|
@@ -4373,7 +4409,7 @@ interface RuleOptions {
|
|
|
4373
4409
|
* prefer dynamic import in mock
|
|
4374
4410
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
|
|
4375
4411
|
*/
|
|
4376
|
-
'test/prefer-import-in-mock'?: Linter.RuleEntry<
|
|
4412
|
+
'test/prefer-import-in-mock'?: Linter.RuleEntry<TestPreferImportInMock>;
|
|
4377
4413
|
/**
|
|
4378
4414
|
* enforce importing Vitest globals
|
|
4379
4415
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
|
|
@@ -4389,6 +4425,11 @@ interface RuleOptions {
|
|
|
4389
4425
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
|
|
4390
4426
|
*/
|
|
4391
4427
|
'test/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>;
|
|
4428
|
+
/**
|
|
4429
|
+
* Prefer mock return shorthands
|
|
4430
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
|
|
4431
|
+
*/
|
|
4432
|
+
'test/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>;
|
|
4392
4433
|
/**
|
|
4393
4434
|
* enforce including a hint with external snapshots
|
|
4394
4435
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
|
|
@@ -4434,6 +4475,11 @@ interface RuleOptions {
|
|
|
4434
4475
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
|
|
4435
4476
|
*/
|
|
4436
4477
|
'test/prefer-to-contain'?: Linter.RuleEntry<[]>;
|
|
4478
|
+
/**
|
|
4479
|
+
* Suggest using `toHaveBeenCalledTimes()`
|
|
4480
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-been-called-times.md
|
|
4481
|
+
*/
|
|
4482
|
+
'test/prefer-to-have-been-called-times'?: Linter.RuleEntry<[]>;
|
|
4437
4483
|
/**
|
|
4438
4484
|
* enforce using toHaveLength()
|
|
4439
4485
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
|
|
@@ -4449,6 +4495,11 @@ interface RuleOptions {
|
|
|
4449
4495
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
|
|
4450
4496
|
*/
|
|
4451
4497
|
'test/prefer-vi-mocked'?: Linter.RuleEntry<[]>;
|
|
4498
|
+
/**
|
|
4499
|
+
* ensure that every `expect.poll` call is awaited
|
|
4500
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-awaited-expect-poll.md
|
|
4501
|
+
*/
|
|
4502
|
+
'test/require-awaited-expect-poll'?: Linter.RuleEntry<[]>;
|
|
4452
4503
|
/**
|
|
4453
4504
|
* require setup and teardown to be within a hook
|
|
4454
4505
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
@@ -5053,6 +5104,11 @@ interface RuleOptions {
|
|
|
5053
5104
|
* @see https://typescript-eslint.io/rules/no-unused-expressions
|
|
5054
5105
|
*/
|
|
5055
5106
|
'ts/no-unused-expressions'?: Linter.RuleEntry<TsNoUnusedExpressions>;
|
|
5107
|
+
/**
|
|
5108
|
+
* Disallow unused private class members
|
|
5109
|
+
* @see https://typescript-eslint.io/rules/no-unused-private-class-members
|
|
5110
|
+
*/
|
|
5111
|
+
'ts/no-unused-private-class-members'?: Linter.RuleEntry<[]>;
|
|
5056
5112
|
/**
|
|
5057
5113
|
* Disallow unused variables
|
|
5058
5114
|
* @see https://typescript-eslint.io/rules/no-unused-vars
|
|
@@ -5068,6 +5124,11 @@ interface RuleOptions {
|
|
|
5068
5124
|
* @see https://typescript-eslint.io/rules/no-useless-constructor
|
|
5069
5125
|
*/
|
|
5070
5126
|
'ts/no-useless-constructor'?: Linter.RuleEntry<[]>;
|
|
5127
|
+
/**
|
|
5128
|
+
* Disallow default values that will never be used
|
|
5129
|
+
* @see https://typescript-eslint.io/rules/no-useless-default-assignment
|
|
5130
|
+
*/
|
|
5131
|
+
'ts/no-useless-default-assignment'?: Linter.RuleEntry<[]>;
|
|
5071
5132
|
/**
|
|
5072
5133
|
* Disallow empty exports that don't change anything in a module file
|
|
5073
5134
|
* @see https://typescript-eslint.io/rules/no-useless-empty-export
|
|
@@ -6500,6 +6561,11 @@ interface RuleOptions {
|
|
|
6500
6561
|
* @see https://eslint.vuejs.org/rules/no-duplicate-attributes.html
|
|
6501
6562
|
*/
|
|
6502
6563
|
'vue/no-duplicate-attributes'?: Linter.RuleEntry<VueNoDuplicateAttributes>;
|
|
6564
|
+
/**
|
|
6565
|
+
* disallow duplication of class names in class attributes
|
|
6566
|
+
* @see https://eslint.vuejs.org/rules/no-duplicate-class-names.html
|
|
6567
|
+
*/
|
|
6568
|
+
'vue/no-duplicate-class-names'?: Linter.RuleEntry<[]>;
|
|
6503
6569
|
/**
|
|
6504
6570
|
* disallow the `<template>` `<script>` `<style>` block to be empty
|
|
6505
6571
|
* @see https://eslint.vuejs.org/rules/no-empty-component-block.html
|
|
@@ -7835,6 +7901,7 @@ type JsdocCheckExamples = [] | [{
|
|
|
7835
7901
|
}];
|
|
7836
7902
|
// ----- jsdoc/check-indentation -----
|
|
7837
7903
|
type JsdocCheckIndentation = [] | [{
|
|
7904
|
+
allowIndentedSections?: boolean;
|
|
7838
7905
|
excludeTags?: string[];
|
|
7839
7906
|
}];
|
|
7840
7907
|
// ----- jsdoc/check-line-alignment -----
|
|
@@ -8181,6 +8248,14 @@ type JsdocRequireParamType = [] | [{
|
|
|
8181
8248
|
defaultDestructuredRootType?: string;
|
|
8182
8249
|
setDefaultDestructuredRootType?: boolean;
|
|
8183
8250
|
}];
|
|
8251
|
+
// ----- jsdoc/require-rejects -----
|
|
8252
|
+
type JsdocRequireRejects = [] | [{
|
|
8253
|
+
contexts?: (string | {
|
|
8254
|
+
comment?: string;
|
|
8255
|
+
context?: string;
|
|
8256
|
+
})[];
|
|
8257
|
+
exemptedBy?: string[];
|
|
8258
|
+
}];
|
|
8184
8259
|
// ----- jsdoc/require-returns -----
|
|
8185
8260
|
type JsdocRequireReturns = [] | [{
|
|
8186
8261
|
checkConstructors?: boolean;
|
|
@@ -8271,6 +8346,9 @@ type JsdocSortTags = [] | [{
|
|
|
8271
8346
|
linesBetween?: number;
|
|
8272
8347
|
reportIntraTagGroupSpacing?: boolean;
|
|
8273
8348
|
reportTagGroupSpacing?: boolean;
|
|
8349
|
+
tagExceptions?: {
|
|
8350
|
+
[k: string]: number;
|
|
8351
|
+
};
|
|
8274
8352
|
tagSequence?: {
|
|
8275
8353
|
tags?: string[];
|
|
8276
8354
|
}[];
|
|
@@ -11861,6 +11939,11 @@ type ReactNamingConventionFilenameExtension = [] | [(("always" | "as-needed") |
|
|
|
11861
11939
|
extensions?: string[];
|
|
11862
11940
|
ignoreFilesWithoutCode?: boolean;
|
|
11863
11941
|
})];
|
|
11942
|
+
// ----- react-naming-convention/use-state -----
|
|
11943
|
+
type ReactNamingConventionUseState = [] | [{
|
|
11944
|
+
enforceAssignment?: boolean;
|
|
11945
|
+
enforceSetterName?: boolean;
|
|
11946
|
+
}];
|
|
11864
11947
|
// ----- react-refresh/only-export-components -----
|
|
11865
11948
|
type ReactRefreshOnlyExportComponents = [] | [{
|
|
11866
11949
|
allowExportNames?: string[];
|
|
@@ -11882,8 +11965,13 @@ type ReactNoForbiddenProps = [] | [{
|
|
|
11882
11965
|
prop: string;
|
|
11883
11966
|
})[];
|
|
11884
11967
|
}];
|
|
11968
|
+
// ----- react/no-unstable-default-props -----
|
|
11969
|
+
type ReactNoUnstableDefaultProps = [] | [{
|
|
11970
|
+
safeDefaultProps?: string[];
|
|
11971
|
+
}];
|
|
11885
11972
|
// ----- react/no-useless-fragment -----
|
|
11886
11973
|
type ReactNoUselessFragment = [] | [{
|
|
11974
|
+
allowEmptyFragment?: boolean;
|
|
11887
11975
|
allowExpressions?: boolean;
|
|
11888
11976
|
}];
|
|
11889
11977
|
// ----- regexp/hexadecimal-escape -----
|
|
@@ -13346,6 +13434,13 @@ type SwitchColonSpacing = [] | [{
|
|
|
13346
13434
|
type TemplateCurlySpacing = [] | [("always" | "never")];
|
|
13347
13435
|
// ----- template-tag-spacing -----
|
|
13348
13436
|
type TemplateTagSpacing = [] | [("always" | "never")];
|
|
13437
|
+
// ----- test/consistent-each-for -----
|
|
13438
|
+
type TestConsistentEachFor = [] | [{
|
|
13439
|
+
test?: ("each" | "for");
|
|
13440
|
+
it?: ("each" | "for");
|
|
13441
|
+
describe?: ("each" | "for");
|
|
13442
|
+
suite?: ("each" | "for");
|
|
13443
|
+
}];
|
|
13349
13444
|
// ----- test/consistent-test-filename -----
|
|
13350
13445
|
type TestConsistentTestFilename = [] | [{
|
|
13351
13446
|
pattern?: string;
|
|
@@ -13379,7 +13474,7 @@ type TestNoFocusedTests = [] | [{
|
|
|
13379
13474
|
}];
|
|
13380
13475
|
// ----- test/no-hooks -----
|
|
13381
13476
|
type TestNoHooks = [] | [{
|
|
13382
|
-
allow?:
|
|
13477
|
+
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[];
|
|
13383
13478
|
}];
|
|
13384
13479
|
// ----- test/no-large-snapshots -----
|
|
13385
13480
|
type TestNoLargeSnapshots = [] | [{
|
|
@@ -13414,6 +13509,10 @@ type TestPreferExpectAssertions = [] | [{
|
|
|
13414
13509
|
onlyFunctionsWithExpectInLoop?: boolean;
|
|
13415
13510
|
onlyFunctionsWithExpectInCallback?: boolean;
|
|
13416
13511
|
}];
|
|
13512
|
+
// ----- test/prefer-import-in-mock -----
|
|
13513
|
+
type TestPreferImportInMock = [] | [{
|
|
13514
|
+
fixable?: boolean;
|
|
13515
|
+
}];
|
|
13417
13516
|
// ----- test/prefer-lowercase-title -----
|
|
13418
13517
|
type TestPreferLowercaseTitle = [] | [{
|
|
13419
13518
|
ignore?: ("describe" | "test" | "it")[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liwo/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "ESLint config by Liwo",
|
|
6
6
|
"author": "Aoang <aoang@x2oe.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,65 +48,65 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@antfu/install-pkg": "1.1.0",
|
|
50
50
|
"@clack/prompts": "0.11.0",
|
|
51
|
-
"@eslint-community/eslint-plugin-eslint-comments": "4.
|
|
52
|
-
"@eslint-react/eslint-plugin": "2.2
|
|
53
|
-
"@eslint/markdown": "7.5.
|
|
54
|
-
"@stylistic/eslint-plugin": "5.
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
56
|
-
"@typescript-eslint/parser": "8.
|
|
57
|
-
"@vitest/eslint-plugin": "1.4
|
|
51
|
+
"@eslint-community/eslint-plugin-eslint-comments": "4.6.0",
|
|
52
|
+
"@eslint-react/eslint-plugin": "2.7.2",
|
|
53
|
+
"@eslint/markdown": "7.5.1",
|
|
54
|
+
"@stylistic/eslint-plugin": "5.6.1",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "8.51.0",
|
|
56
|
+
"@typescript-eslint/parser": "8.51.0",
|
|
57
|
+
"@vitest/eslint-plugin": "1.6.4",
|
|
58
58
|
"eslint-config-flat-gitignore": "2.1.0",
|
|
59
59
|
"eslint-flat-config-utils": "2.1.4",
|
|
60
60
|
"eslint-merge-processors": "2.0.0",
|
|
61
61
|
"eslint-plugin-antfu": "3.1.1",
|
|
62
|
-
"eslint-plugin-command": "3.
|
|
63
|
-
"eslint-plugin-format": "1.0
|
|
64
|
-
"eslint-plugin-import-lite": "0.
|
|
65
|
-
"eslint-plugin-jsdoc": "61.
|
|
62
|
+
"eslint-plugin-command": "3.4.0",
|
|
63
|
+
"eslint-plugin-format": "1.1.0",
|
|
64
|
+
"eslint-plugin-import-lite": "0.4.0",
|
|
65
|
+
"eslint-plugin-jsdoc": "61.5.0",
|
|
66
66
|
"eslint-plugin-jsonc": "2.21.0",
|
|
67
67
|
"eslint-plugin-n": "17.23.1",
|
|
68
68
|
"eslint-plugin-no-only-tests": "3.3.0",
|
|
69
69
|
"eslint-plugin-perfectionist": "4.15.1",
|
|
70
|
-
"eslint-plugin-pnpm": "1.3
|
|
70
|
+
"eslint-plugin-pnpm": "1.4.3",
|
|
71
71
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
72
|
-
"eslint-plugin-react-refresh": "0.4.
|
|
72
|
+
"eslint-plugin-react-refresh": "0.4.26",
|
|
73
73
|
"eslint-plugin-regexp": "2.10.0",
|
|
74
|
-
"eslint-plugin-toml": "0.
|
|
74
|
+
"eslint-plugin-toml": "1.0.3",
|
|
75
75
|
"eslint-plugin-unicorn": "62.0.0",
|
|
76
76
|
"eslint-plugin-unused-imports": "4.3.0",
|
|
77
|
-
"eslint-plugin-vue": "10.
|
|
78
|
-
"eslint-plugin-yml": "1.19.
|
|
77
|
+
"eslint-plugin-vue": "10.6.2",
|
|
78
|
+
"eslint-plugin-yml": "1.19.1",
|
|
79
79
|
"eslint-processor-vue-blocks": "2.0.0",
|
|
80
|
-
"globals": "
|
|
81
|
-
"jsonc-eslint-parser": "2.4.
|
|
80
|
+
"globals": "17.0.0",
|
|
81
|
+
"jsonc-eslint-parser": "2.4.2",
|
|
82
82
|
"local-pkg": "1.1.2",
|
|
83
83
|
"parse-gitignore": "2.0.0",
|
|
84
|
-
"toml-eslint-parser": "0.10.
|
|
84
|
+
"toml-eslint-parser": "0.10.1",
|
|
85
85
|
"vue-eslint-parser": "10.2.0",
|
|
86
|
-
"yaml-eslint-parser": "1.3.
|
|
86
|
+
"yaml-eslint-parser": "1.3.2"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@eslint/config-inspector": "
|
|
90
|
-
"@prettier/plugin-xml": "
|
|
91
|
-
"@types/node": "
|
|
92
|
-
"@unocss/eslint-plugin": "
|
|
93
|
-
"bumpp": "
|
|
94
|
-
"eslint": "
|
|
95
|
-
"eslint-plugin-vuejs-accessibility": "
|
|
96
|
-
"eslint-typegen": "
|
|
97
|
-
"execa": "
|
|
98
|
-
"lint-staged": "
|
|
99
|
-
"pnpm-workspace-yaml": "
|
|
100
|
-
"prettier-plugin-slidev": "
|
|
101
|
-
"react": "
|
|
102
|
-
"simple-git-hooks": "
|
|
103
|
-
"tinyglobby": "
|
|
104
|
-
"tsdown": "
|
|
105
|
-
"tsx": "
|
|
106
|
-
"typescript": "
|
|
107
|
-
"vitest": "
|
|
108
|
-
"vue": "
|
|
109
|
-
"@liwo/eslint-config": "0.
|
|
89
|
+
"@eslint/config-inspector": "1.4.2",
|
|
90
|
+
"@prettier/plugin-xml": "3.4.2",
|
|
91
|
+
"@types/node": "25.0.3",
|
|
92
|
+
"@unocss/eslint-plugin": "66.6.0",
|
|
93
|
+
"bumpp": "10.3.2",
|
|
94
|
+
"eslint": "9.39.2",
|
|
95
|
+
"eslint-plugin-vuejs-accessibility": "2.4.1",
|
|
96
|
+
"eslint-typegen": "2.3.0",
|
|
97
|
+
"execa": "9.6.1",
|
|
98
|
+
"lint-staged": "16.2.7",
|
|
99
|
+
"pnpm-workspace-yaml": "1.4.3",
|
|
100
|
+
"prettier-plugin-slidev": "1.0.5",
|
|
101
|
+
"react": "19.2.3",
|
|
102
|
+
"simple-git-hooks": "2.13.1",
|
|
103
|
+
"tinyglobby": "0.2.15",
|
|
104
|
+
"tsdown": "0.18.4",
|
|
105
|
+
"tsx": "4.21.0",
|
|
106
|
+
"typescript": "5.9.3",
|
|
107
|
+
"vitest": "4.0.16",
|
|
108
|
+
"vue": "3.5.26",
|
|
109
|
+
"@liwo/eslint-config": "0.2.0"
|
|
110
110
|
},
|
|
111
111
|
"simple-git-hooks": {
|
|
112
112
|
"pre-commit": "npx lint-staged"
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"format": "eslint --fix .",
|
|
128
128
|
"gen": "tsx scripts/typegen.ts",
|
|
129
129
|
"test": "vitest",
|
|
130
|
-
"release": "bumpp",
|
|
130
|
+
"release": "bumpp --sign",
|
|
131
131
|
"typecheck": "tsc --noEmit"
|
|
132
132
|
}
|
|
133
133
|
}
|