@2digits/eslint-config 2.3.2 → 2.3.4
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.cjs.map +1 -1
- package/dist/index.d.cts +136 -81
- package/dist/index.d.ts +136 -81
- package/dist/index.js.map +1 -1
- package/package.json +19 -19
package/dist/index.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
|
10
10
|
interface RuleOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Enforce giving proper names to type parameters when there are two or more
|
|
13
|
-
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.1.
|
|
13
|
+
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.1.3/packages/eslint/src/rules/type-param-names.ts
|
|
14
14
|
*/
|
|
15
15
|
'@2digits/type-param-names'?: Linter.RuleEntry<[]>
|
|
16
16
|
/**
|
|
@@ -785,6 +785,11 @@ Backward pagination arguments
|
|
|
785
785
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-values.md#repos-sticky-header
|
|
786
786
|
*/
|
|
787
787
|
'jsdoc/check-values'?: Linter.RuleEntry<JsdocCheckValues>
|
|
788
|
+
/**
|
|
789
|
+
* Converts non-JSDoc comments preceding or following nodes into JSDoc ones
|
|
790
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/convert-to-jsdoc-comments.md#repos-sticky-header
|
|
791
|
+
*/
|
|
792
|
+
'jsdoc/convert-to-jsdoc-comments'?: Linter.RuleEntry<JsdocConvertToJsdocComments>
|
|
788
793
|
/**
|
|
789
794
|
* Expects specific tags to be empty of any content.
|
|
790
795
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header
|
|
@@ -959,6 +964,11 @@ Backward pagination arguments
|
|
|
959
964
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header
|
|
960
965
|
*/
|
|
961
966
|
'jsdoc/require-returns-type'?: Linter.RuleEntry<JsdocRequireReturnsType>
|
|
967
|
+
/**
|
|
968
|
+
* Requires template tags for each generic type parameter
|
|
969
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header
|
|
970
|
+
*/
|
|
971
|
+
'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate>
|
|
962
972
|
/**
|
|
963
973
|
* Requires that throw statements are documented.
|
|
964
974
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
|
|
@@ -2398,289 +2408,294 @@ Backward pagination arguments
|
|
|
2398
2408
|
'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>
|
|
2399
2409
|
/**
|
|
2400
2410
|
* disallow passing 'children' to void DOM elements
|
|
2401
|
-
* @see https://eslint-react.xyz/rules/dom-no-children-in-void-dom-elements
|
|
2411
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-children-in-void-dom-elements
|
|
2402
2412
|
*/
|
|
2403
2413
|
'react-dom/no-children-in-void-dom-elements'?: Linter.RuleEntry<[]>
|
|
2404
2414
|
/**
|
|
2405
2415
|
* disallow when a DOM component is using 'dangerouslySetInnerHTML'
|
|
2406
|
-
* @see https://eslint-react.xyz/rules/dom-no-dangerously-set-innerhtml
|
|
2416
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
2407
2417
|
*/
|
|
2408
2418
|
'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>
|
|
2409
2419
|
/**
|
|
2410
2420
|
* disallow when a DOM component is using both 'children' and 'dangerouslySetInnerHTML'
|
|
2411
|
-
* @see https://eslint-react.xyz/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
2421
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
2412
2422
|
*/
|
|
2413
2423
|
'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>
|
|
2414
2424
|
/**
|
|
2415
2425
|
* disallow 'findDOMNode'
|
|
2416
|
-
* @see https://eslint-react.xyz/rules/dom-no-find-dom-node
|
|
2426
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
2417
2427
|
*/
|
|
2418
2428
|
'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>
|
|
2419
2429
|
/**
|
|
2420
2430
|
* enforce that button component have an explicit 'type' attribute
|
|
2421
|
-
* @see https://eslint-react.xyz/rules/dom-no-missing-button-type
|
|
2431
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
2422
2432
|
*/
|
|
2423
2433
|
'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>
|
|
2424
2434
|
/**
|
|
2425
2435
|
* enforce that 'iframe' component have an explicit 'sandbox' attribute
|
|
2426
|
-
* @see https://eslint-react.xyz/rules/dom-no-missing-iframe-sandbox
|
|
2436
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
2427
2437
|
*/
|
|
2428
2438
|
'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
2429
2439
|
/**
|
|
2430
2440
|
* enforce that namespaces are not used in React elements
|
|
2431
|
-
* @see https://eslint-react.xyz/rules/dom-no-namespace
|
|
2441
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-namespace
|
|
2432
2442
|
*/
|
|
2433
2443
|
'react-dom/no-namespace'?: Linter.RuleEntry<[]>
|
|
2434
2444
|
/**
|
|
2435
2445
|
* disallow usage of the return value of 'ReactDOM.render'
|
|
2436
|
-
* @see https://eslint-react.xyz/rules/dom-no-render-return-value
|
|
2446
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
2437
2447
|
*/
|
|
2438
2448
|
'react-dom/no-render-return-value'?: Linter.RuleEntry<[]>
|
|
2439
2449
|
/**
|
|
2440
2450
|
* disallow 'javascript:' URLs as JSX event handler prop's value
|
|
2441
|
-
* @see https://eslint-react.xyz/rules/dom-no-script-url
|
|
2451
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
2442
2452
|
*/
|
|
2443
2453
|
'react-dom/no-script-url'?: Linter.RuleEntry<[]>
|
|
2444
2454
|
/**
|
|
2445
2455
|
* disallow unsafe iframe 'sandbox' attribute combinations
|
|
2446
|
-
* @see https://eslint-react.xyz/rules/dom-no-unsafe-iframe-sandbox
|
|
2456
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
2447
2457
|
*/
|
|
2448
2458
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
2449
2459
|
/**
|
|
2450
|
-
* disallow 'target="_blank"' on an external link without 'rel="noreferrer noopener"'
|
|
2451
|
-
* @see https://eslint-react.xyz/rules/dom-no-unsafe-target-blank
|
|
2460
|
+
* disallow 'target="_blank"' on an external link without 'rel="noreferrer noopener"'
|
|
2461
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
2452
2462
|
*/
|
|
2453
2463
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
|
|
2454
2464
|
/**
|
|
2455
2465
|
* enforce boolean attributes notation in JSX
|
|
2456
|
-
* @see https://eslint-react.xyz/rules/avoid-shorthand-boolean
|
|
2466
|
+
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
2457
2467
|
*/
|
|
2458
2468
|
'react-extra/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
2459
2469
|
/**
|
|
2460
2470
|
* enforce using fragment component instead of shorthand fragment syntax
|
|
2461
|
-
* @see https://eslint-react.xyz/rules/avoid-shorthand-fragment
|
|
2471
|
+
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
2462
2472
|
*/
|
|
2463
2473
|
'react-extra/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
2464
2474
|
/**
|
|
2465
2475
|
* require all 'forwardRef' components include a 'ref' parameter
|
|
2466
|
-
* @see https://eslint-react.xyz/rules/ensure-forward-ref-using-ref
|
|
2476
|
+
* @see https://eslint-react.xyz/docs/rules/ensure-forward-ref-using-ref
|
|
2467
2477
|
*/
|
|
2468
2478
|
'react-extra/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
|
|
2469
2479
|
/**
|
|
2470
2480
|
* disallow accessing 'this.state' within 'setState'
|
|
2471
|
-
* @see https://eslint-react.xyz/rules/no-access-state-in-setstate
|
|
2481
|
+
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
2472
2482
|
*/
|
|
2473
2483
|
'react-extra/no-access-state-in-setstate'?: Linter.RuleEntry<[]>
|
|
2474
2484
|
/**
|
|
2475
2485
|
* disallow using Array index as key
|
|
2476
|
-
* @see https://eslint-react.xyz/rules/no-array-index-key
|
|
2486
|
+
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
2477
2487
|
*/
|
|
2478
2488
|
'react-extra/no-array-index-key'?: Linter.RuleEntry<[]>
|
|
2479
2489
|
/**
|
|
2480
2490
|
* disallow 'Children.count'
|
|
2481
|
-
* @see https://eslint-react.xyz/rules/no-children-count
|
|
2491
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
2482
2492
|
*/
|
|
2483
2493
|
'react-extra/no-children-count'?: Linter.RuleEntry<[]>
|
|
2484
2494
|
/**
|
|
2485
2495
|
* disallow 'Children.forEach'
|
|
2486
|
-
* @see https://eslint-react.xyz/rules/no-children-for-each
|
|
2496
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
2487
2497
|
*/
|
|
2488
2498
|
'react-extra/no-children-for-each'?: Linter.RuleEntry<[]>
|
|
2489
2499
|
/**
|
|
2490
2500
|
* disallow 'Children.map'
|
|
2491
|
-
* @see https://eslint-react.xyz/rules/no-children-map
|
|
2501
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
2492
2502
|
*/
|
|
2493
2503
|
'react-extra/no-children-map'?: Linter.RuleEntry<[]>
|
|
2494
2504
|
/**
|
|
2495
2505
|
* disallow 'Children.only'
|
|
2496
|
-
* @see https://eslint-react.xyz/rules/no-children-only
|
|
2506
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
2497
2507
|
*/
|
|
2498
2508
|
'react-extra/no-children-only'?: Linter.RuleEntry<[]>
|
|
2499
2509
|
/**
|
|
2500
2510
|
* disallow passing of 'children' as props
|
|
2501
|
-
* @see https://eslint-react.xyz/rules/no-children-prop
|
|
2511
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
2502
2512
|
*/
|
|
2503
2513
|
'react-extra/no-children-prop'?: Linter.RuleEntry<[]>
|
|
2504
2514
|
/**
|
|
2505
2515
|
* disallow 'Children.toArray'
|
|
2506
|
-
* @see https://eslint-react.xyz/rules/no-children-to-array
|
|
2516
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
2507
2517
|
*/
|
|
2508
2518
|
'react-extra/no-children-to-array'?: Linter.RuleEntry<[]>
|
|
2509
2519
|
/**
|
|
2510
2520
|
* disallow class component
|
|
2511
|
-
* @see https://eslint-react.xyz/rules/no-class-component
|
|
2521
|
+
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
2512
2522
|
*/
|
|
2513
2523
|
'react-extra/no-class-component'?: Linter.RuleEntry<[]>
|
|
2514
2524
|
/**
|
|
2515
2525
|
* disallow 'cloneElement'
|
|
2516
|
-
* @see https://eslint-react.xyz/rules/no-clone-element
|
|
2526
|
+
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
2517
2527
|
*/
|
|
2518
2528
|
'react-extra/no-clone-element'?: Linter.RuleEntry<[]>
|
|
2519
2529
|
/**
|
|
2520
2530
|
* disallow comments from being inserted as text nodes
|
|
2521
|
-
* @see https://eslint-react.xyz/rules/no-comment-textnodes
|
|
2531
|
+
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
2522
2532
|
*/
|
|
2523
2533
|
'react-extra/no-comment-textnodes'?: Linter.RuleEntry<[]>
|
|
2524
2534
|
/**
|
|
2525
2535
|
* disallow complicated conditional rendering
|
|
2526
|
-
* @see https://eslint-react.xyz/rules/no-complicated-conditional-rendering
|
|
2536
|
+
* @see https://eslint-react.xyz/docs/rules/no-complicated-conditional-rendering
|
|
2527
2537
|
* @deprecated
|
|
2528
2538
|
*/
|
|
2529
2539
|
'react-extra/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2530
2540
|
/**
|
|
2531
2541
|
* disallow usage of 'componentWillMount'
|
|
2532
|
-
* @see https://eslint-react.xyz/rules/no-component-will-mount
|
|
2542
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
2533
2543
|
*/
|
|
2534
2544
|
'react-extra/no-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2535
2545
|
/**
|
|
2536
2546
|
* disallow usage of 'componentWillReceiveProps'
|
|
2537
|
-
* @see https://eslint-react.xyz/rules/no-component-will-receive-props
|
|
2547
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
2538
2548
|
*/
|
|
2539
2549
|
'react-extra/no-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2540
2550
|
/**
|
|
2541
2551
|
* disallow usage of 'componentWillUpdate'
|
|
2542
|
-
* @see https://eslint-react.xyz/rules/no-component-will-update
|
|
2552
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
2543
2553
|
*/
|
|
2544
2554
|
'react-extra/no-component-will-update'?: Linter.RuleEntry<[]>
|
|
2545
2555
|
/**
|
|
2546
2556
|
* disallow 'createRef' in function components
|
|
2547
|
-
* @see https://eslint-react.xyz/rules/no-create-ref
|
|
2557
|
+
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
2548
2558
|
*/
|
|
2549
2559
|
'react-extra/no-create-ref'?: Linter.RuleEntry<[]>
|
|
2550
2560
|
/**
|
|
2551
2561
|
* disallow direct mutation of state
|
|
2552
|
-
* @see https://eslint-react.xyz/rules/no-direct-mutation-state
|
|
2562
|
+
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
2553
2563
|
*/
|
|
2554
2564
|
'react-extra/no-direct-mutation-state'?: Linter.RuleEntry<[]>
|
|
2555
2565
|
/**
|
|
2556
2566
|
* disallow duplicate keys in 'key' prop when rendering list
|
|
2557
|
-
* @see https://eslint-react.xyz/rules/no-duplicate-key
|
|
2567
|
+
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
2558
2568
|
*/
|
|
2559
2569
|
'react-extra/no-duplicate-key'?: Linter.RuleEntry<[]>
|
|
2560
2570
|
/**
|
|
2561
2571
|
* disallow spreading 'key' from objects.
|
|
2562
|
-
* @see https://eslint-react.xyz/rules/no-implicit-key
|
|
2572
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
2563
2573
|
* @deprecated
|
|
2564
2574
|
*/
|
|
2565
2575
|
'react-extra/no-implicit-key'?: Linter.RuleEntry<[]>
|
|
2566
2576
|
/**
|
|
2567
2577
|
* disallow problematic leaked values from being rendered
|
|
2568
|
-
* @see https://eslint-react.xyz/rules/no-leaked-conditional-rendering
|
|
2578
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
2569
2579
|
*/
|
|
2570
2580
|
'react-extra/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2571
2581
|
/**
|
|
2572
2582
|
* require 'displayName' for memo and forwardRef components
|
|
2573
|
-
* @see https://eslint-react.xyz/rules/no-missing-component-display-name
|
|
2583
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
2574
2584
|
*/
|
|
2575
2585
|
'react-extra/no-missing-component-display-name'?: Linter.RuleEntry<[]>
|
|
2576
2586
|
/**
|
|
2577
2587
|
* require 'key' prop when rendering list
|
|
2578
|
-
* @see https://eslint-react.xyz/rules/no-missing-key
|
|
2588
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
2579
2589
|
*/
|
|
2580
2590
|
'react-extra/no-missing-key'?: Linter.RuleEntry<[]>
|
|
2581
2591
|
/**
|
|
2582
2592
|
* disallow usage of unstable nested components
|
|
2583
|
-
* @see https://eslint-react.xyz/rules/no-nested-components
|
|
2593
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-components
|
|
2584
2594
|
*/
|
|
2585
2595
|
'react-extra/no-nested-components'?: Linter.RuleEntry<[]>
|
|
2586
2596
|
/**
|
|
2587
2597
|
* disallow usage of 'shouldComponentUpdate' in class component extends 'React.PureComponent'
|
|
2588
|
-
* @see https://eslint-react.xyz/rules/no-redundant-should-component-update
|
|
2598
|
+
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
2589
2599
|
*/
|
|
2590
2600
|
'react-extra/no-redundant-should-component-update'?: Linter.RuleEntry<[]>
|
|
2591
2601
|
/**
|
|
2592
2602
|
* disallow 'setState' in 'componentDidMount'
|
|
2593
|
-
* @see https://eslint-react.xyz/rules/no-set-state-in-component-did-mount
|
|
2603
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
2594
2604
|
*/
|
|
2595
2605
|
'react-extra/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>
|
|
2596
2606
|
/**
|
|
2597
2607
|
* disallow 'setState' in 'componentDidUpdate'
|
|
2598
|
-
* @see https://eslint-react.xyz/rules/no-set-state-in-component-did-update
|
|
2608
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
2599
2609
|
*/
|
|
2600
2610
|
'react-extra/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
|
|
2601
2611
|
/**
|
|
2602
2612
|
* disallow 'setState' in 'componentWillUpdate'
|
|
2603
|
-
* @see https://eslint-react.xyz/rules/no-set-state-in-component-will-update
|
|
2613
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
2604
2614
|
*/
|
|
2605
2615
|
'react-extra/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
|
|
2606
2616
|
/**
|
|
2607
2617
|
* disallow using deprecated string refs
|
|
2608
|
-
* @see https://eslint-react.xyz/rules/no-string-refs
|
|
2618
|
+
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
2609
2619
|
*/
|
|
2610
2620
|
'react-extra/no-string-refs'?: Linter.RuleEntry<[]>
|
|
2611
2621
|
/**
|
|
2612
2622
|
* disallow usage of 'UNSAFE_componentWillMount'
|
|
2613
|
-
* @see https://eslint-react.xyz/rules/no-unsafe-component-will-mount
|
|
2623
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
2614
2624
|
*/
|
|
2615
2625
|
'react-extra/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2616
2626
|
/**
|
|
2617
2627
|
* disallow usage of 'UNSAFE_componentWillReceiveProps'
|
|
2618
|
-
* @see https://eslint-react.xyz/rules/no-unsafe-component-will-receive-props
|
|
2628
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
2619
2629
|
*/
|
|
2620
2630
|
'react-extra/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2621
2631
|
/**
|
|
2622
2632
|
* disallow usage of 'UNSAFE_componentWillUpdate'
|
|
2623
|
-
* @see https://eslint-react.xyz/rules/no-unsafe-component-will-update
|
|
2633
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
2624
2634
|
*/
|
|
2625
2635
|
'react-extra/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>
|
|
2626
2636
|
/**
|
|
2627
2637
|
* disallow passing constructed values to context providers
|
|
2628
|
-
* @see https://eslint-react.xyz/rules/no-unstable-context-value
|
|
2638
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
2629
2639
|
*/
|
|
2630
2640
|
'react-extra/no-unstable-context-value'?: Linter.RuleEntry<[]>
|
|
2631
2641
|
/**
|
|
2632
2642
|
* disallow usage of unstable value as default param in function component
|
|
2633
|
-
* @see https://eslint-react.xyz/rules/no-unstable-default-props
|
|
2643
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
2634
2644
|
*/
|
|
2635
2645
|
'react-extra/no-unstable-default-props'?: Linter.RuleEntry<[]>
|
|
2636
2646
|
/**
|
|
2637
2647
|
* disallow unused class component members
|
|
2638
|
-
* @see https://eslint-react.xyz/rules/no-unused-class-component-members
|
|
2648
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
2639
2649
|
*/
|
|
2640
2650
|
'react-extra/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
2641
2651
|
/**
|
|
2642
|
-
* Prevents unused state of class component
|
|
2643
|
-
* @see https://eslint-react.xyz/rules/no-unused-state
|
|
2652
|
+
* Prevents unused state of class component
|
|
2653
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
2644
2654
|
*/
|
|
2645
2655
|
'react-extra/no-unused-state'?: Linter.RuleEntry<[]>
|
|
2646
2656
|
/**
|
|
2647
2657
|
* disallow unnecessary fragments
|
|
2648
|
-
* @see https://eslint-react.xyz/rules/no-useless-fragment
|
|
2658
|
+
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
2649
2659
|
*/
|
|
2650
2660
|
'react-extra/no-useless-fragment'?: Linter.RuleEntry<[]>
|
|
2651
2661
|
/**
|
|
2652
2662
|
* enforce using destructuring assignment in component props and context
|
|
2653
|
-
* @see https://eslint-react.xyz/rules/prefer-destructuring-assignment
|
|
2663
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
2654
2664
|
*/
|
|
2655
2665
|
'react-extra/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
2666
|
+
/**
|
|
2667
|
+
* enforce that component props are read-only
|
|
2668
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
2669
|
+
*/
|
|
2670
|
+
'react-extra/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
|
2656
2671
|
/**
|
|
2657
2672
|
* enforce boolean attributes notation in JSX
|
|
2658
|
-
* @see https://eslint-react.xyz/rules/prefer-shorthand-boolean
|
|
2673
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-boolean
|
|
2659
2674
|
*/
|
|
2660
2675
|
'react-extra/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
2661
2676
|
/**
|
|
2662
2677
|
* enforce using fragment syntax instead of Fragment component
|
|
2663
|
-
* @see https://eslint-react.xyz/rules/prefer-shorthand-fragment
|
|
2678
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
2664
2679
|
*/
|
|
2665
2680
|
'react-extra/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
2666
2681
|
/**
|
|
2667
2682
|
* enforce custom hooks using other hooks
|
|
2668
|
-
* @see https://eslint-react.xyz/rules/hooks-extra-ensure-custom-hooks-using-other-hooks
|
|
2683
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-ensure-custom-hooks-using-other-hooks
|
|
2669
2684
|
*/
|
|
2670
2685
|
'react-hooks-extra/ensure-custom-hooks-using-other-hooks'?: Linter.RuleEntry<[]>
|
|
2671
2686
|
/**
|
|
2672
2687
|
* enforce 'useCallback' has non-empty dependencies array
|
|
2673
|
-
* @see https://eslint-react.xyz/rules/hooks-extra-ensure-use-callback-has-non-empty-deps
|
|
2688
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-ensure-use-callback-has-non-empty-deps
|
|
2674
2689
|
*/
|
|
2675
2690
|
'react-hooks-extra/ensure-use-callback-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
2676
2691
|
/**
|
|
2677
2692
|
* enforce 'useMemo' has non-empty dependencies array
|
|
2678
|
-
* @see https://eslint-react.xyz/rules/hooks-extra-ensure-use-memo-has-non-empty-deps
|
|
2693
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-ensure-use-memo-has-non-empty-deps
|
|
2679
2694
|
*/
|
|
2680
2695
|
'react-hooks-extra/ensure-use-memo-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
2681
2696
|
/**
|
|
2682
2697
|
* disallow function calls in 'useState' that aren't wrapped in an initializer function
|
|
2683
|
-
* @see https://eslint-react.xyz/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
2698
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
2684
2699
|
*/
|
|
2685
2700
|
'react-hooks-extra/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>
|
|
2686
2701
|
/**
|
|
@@ -2695,22 +2710,22 @@ Backward pagination arguments
|
|
|
2695
2710
|
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<[]>
|
|
2696
2711
|
/**
|
|
2697
2712
|
* enforce component naming convention to 'PascalCase' or 'CONSTANT_CASE'
|
|
2698
|
-
* @see https://eslint-react.xyz/rules/naming-convention-component-name
|
|
2713
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
2699
2714
|
*/
|
|
2700
2715
|
'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
|
|
2701
2716
|
/**
|
|
2702
2717
|
* enforce naming convention for JSX filenames
|
|
2703
|
-
* @see https://eslint-react.xyz/rules/naming-convention-filename
|
|
2718
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename
|
|
2704
2719
|
*/
|
|
2705
2720
|
'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>
|
|
2706
2721
|
/**
|
|
2707
2722
|
* enforce naming convention for JSX file extensions
|
|
2708
|
-
* @see https://eslint-react.xyz/rules/naming-convention-filename-extension
|
|
2723
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
|
|
2709
2724
|
*/
|
|
2710
2725
|
'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>
|
|
2711
2726
|
/**
|
|
2712
2727
|
* enforce destructuring and symmetric naming of 'useState' hook value and setter variables
|
|
2713
|
-
* @see https://eslint-react.xyz/rules/naming-convention-use-state
|
|
2728
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
2714
2729
|
*/
|
|
2715
2730
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
2716
2731
|
/**
|
|
@@ -3874,6 +3889,11 @@ Backward pagination arguments
|
|
|
3874
3889
|
* @see https://typescript-eslint.io/rules/no-empty-interface
|
|
3875
3890
|
*/
|
|
3876
3891
|
'ts/no-empty-interface'?: Linter.RuleEntry<TsNoEmptyInterface>
|
|
3892
|
+
/**
|
|
3893
|
+
* Disallow accidentally using the "empty object" type
|
|
3894
|
+
* @see https://typescript-eslint.io/rules/no-empty-object-type
|
|
3895
|
+
*/
|
|
3896
|
+
'ts/no-empty-object-type'?: Linter.RuleEntry<TsNoEmptyObjectType>
|
|
3877
3897
|
/**
|
|
3878
3898
|
* Disallow the `any` type
|
|
3879
3899
|
* @see https://typescript-eslint.io/rules/no-explicit-any
|
|
@@ -4043,6 +4063,11 @@ Backward pagination arguments
|
|
|
4043
4063
|
* @see https://typescript-eslint.io/rules/no-unnecessary-condition
|
|
4044
4064
|
*/
|
|
4045
4065
|
'ts/no-unnecessary-condition'?: Linter.RuleEntry<TsNoUnnecessaryCondition>
|
|
4066
|
+
/**
|
|
4067
|
+
* Disallow unnecessary assignment of constructor property parameter
|
|
4068
|
+
* @see https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment
|
|
4069
|
+
*/
|
|
4070
|
+
'ts/no-unnecessary-parameter-property-assignment'?: Linter.RuleEntry<[]>
|
|
4046
4071
|
/**
|
|
4047
4072
|
* Disallow unnecessary namespace qualifiers
|
|
4048
4073
|
* @see https://typescript-eslint.io/rules/no-unnecessary-qualifier
|
|
@@ -4068,6 +4093,11 @@ Backward pagination arguments
|
|
|
4068
4093
|
* @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint
|
|
4069
4094
|
*/
|
|
4070
4095
|
'ts/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]>
|
|
4096
|
+
/**
|
|
4097
|
+
* Disallow type parameters that only appear once
|
|
4098
|
+
* @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
|
|
4099
|
+
*/
|
|
4100
|
+
'ts/no-unnecessary-type-parameters'?: Linter.RuleEntry<[]>
|
|
4071
4101
|
/**
|
|
4072
4102
|
* Disallow calling a function with a value with type `any`
|
|
4073
4103
|
* @see https://typescript-eslint.io/rules/no-unsafe-argument
|
|
@@ -5661,6 +5691,25 @@ type JsdocCheckValues = []|[{
|
|
|
5661
5691
|
licensePattern?: string
|
|
5662
5692
|
numericOnlyVariation?: boolean
|
|
5663
5693
|
}]
|
|
5694
|
+
// ----- jsdoc/convert-to-jsdoc-comments -----
|
|
5695
|
+
type JsdocConvertToJsdocComments = []|[{
|
|
5696
|
+
allowedPrefixes?: string[]
|
|
5697
|
+
contexts?: (string | {
|
|
5698
|
+
context?: string
|
|
5699
|
+
inlineCommentBlock?: boolean
|
|
5700
|
+
})[]
|
|
5701
|
+
contextsAfter?: (string | {
|
|
5702
|
+
context?: string
|
|
5703
|
+
inlineCommentBlock?: boolean
|
|
5704
|
+
})[]
|
|
5705
|
+
contextsBeforeAndAfter?: (string | {
|
|
5706
|
+
context?: string
|
|
5707
|
+
inlineCommentBlock?: boolean
|
|
5708
|
+
})[]
|
|
5709
|
+
enableFixer?: boolean
|
|
5710
|
+
enforceJsdocLineStyle?: ("multi" | "single")
|
|
5711
|
+
lineOrBlockStyle?: ("block" | "line" | "both")
|
|
5712
|
+
}]
|
|
5664
5713
|
// ----- jsdoc/empty-tags -----
|
|
5665
5714
|
type JsdocEmptyTags = []|[{
|
|
5666
5715
|
tags?: string[]
|
|
@@ -5948,6 +5997,10 @@ type JsdocRequireReturnsType = []|[{
|
|
|
5948
5997
|
context?: string
|
|
5949
5998
|
})[]
|
|
5950
5999
|
}]
|
|
6000
|
+
// ----- jsdoc/require-template -----
|
|
6001
|
+
type JsdocRequireTemplate = []|[{
|
|
6002
|
+
requireSeparateTemplates?: boolean
|
|
6003
|
+
}]
|
|
5951
6004
|
// ----- jsdoc/require-throws -----
|
|
5952
6005
|
type JsdocRequireThrows = []|[{
|
|
5953
6006
|
contexts?: (string | {
|
|
@@ -6760,18 +6813,11 @@ type NoRestrictedImports = ((string | {
|
|
|
6760
6813
|
importNames?: string[]
|
|
6761
6814
|
allowImportNames?: string[]
|
|
6762
6815
|
})[]
|
|
6763
|
-
patterns?: (string[] | {
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
group: [string, ...(string)[]]
|
|
6770
|
-
importNamePattern?: string
|
|
6771
|
-
allowImportNamePattern?: string
|
|
6772
|
-
message?: string
|
|
6773
|
-
caseSensitive?: boolean
|
|
6774
|
-
}[])
|
|
6816
|
+
patterns?: (string[] | ({
|
|
6817
|
+
[k: string]: unknown | undefined
|
|
6818
|
+
} | {
|
|
6819
|
+
[k: string]: unknown | undefined
|
|
6820
|
+
})[])
|
|
6775
6821
|
}])
|
|
6776
6822
|
// ----- no-restricted-modules -----
|
|
6777
6823
|
type NoRestrictedModules = ((string | {
|
|
@@ -8967,6 +9013,12 @@ type TsNoEmptyFunction = []|[{
|
|
|
8967
9013
|
type TsNoEmptyInterface = []|[{
|
|
8968
9014
|
allowSingleExtends?: boolean
|
|
8969
9015
|
}]
|
|
9016
|
+
// ----- ts/no-empty-object-type -----
|
|
9017
|
+
type TsNoEmptyObjectType = []|[{
|
|
9018
|
+
allowInterfaces?: ("always" | "never" | "with-single-extends")
|
|
9019
|
+
allowObjectTypes?: ("always" | "in-type-alias-with-name" | "never")
|
|
9020
|
+
allowWithName?: string
|
|
9021
|
+
}]
|
|
8970
9022
|
// ----- ts/no-explicit-any -----
|
|
8971
9023
|
type TsNoExplicitAny = []|[{
|
|
8972
9024
|
|
|
@@ -9000,10 +9052,6 @@ type TsNoExtraneousClass = []|[{
|
|
|
9000
9052
|
}]
|
|
9001
9053
|
// ----- ts/no-floating-promises -----
|
|
9002
9054
|
type TsNoFloatingPromises = []|[{
|
|
9003
|
-
|
|
9004
|
-
ignoreVoid?: boolean
|
|
9005
|
-
|
|
9006
|
-
ignoreIIFE?: boolean
|
|
9007
9055
|
allowForKnownSafePromises?: (string | {
|
|
9008
9056
|
from: "file"
|
|
9009
9057
|
name: (string | [string, ...(string)[]])
|
|
@@ -9016,6 +9064,12 @@ type TsNoFloatingPromises = []|[{
|
|
|
9016
9064
|
name: (string | [string, ...(string)[]])
|
|
9017
9065
|
package: string
|
|
9018
9066
|
})[]
|
|
9067
|
+
|
|
9068
|
+
checkThenables?: boolean
|
|
9069
|
+
|
|
9070
|
+
ignoreVoid?: boolean
|
|
9071
|
+
|
|
9072
|
+
ignoreIIFE?: boolean
|
|
9019
9073
|
}]
|
|
9020
9074
|
// ----- ts/no-inferrable-types -----
|
|
9021
9075
|
type TsNoInferrableTypes = []|[{
|
|
@@ -9100,7 +9154,8 @@ type TsNoRestrictedImports = ((string | {
|
|
|
9100
9154
|
|
|
9101
9155
|
allowImportNames?: [string, ...(string)[]]
|
|
9102
9156
|
|
|
9103
|
-
group
|
|
9157
|
+
group?: [string, ...(string)[]]
|
|
9158
|
+
regex?: string
|
|
9104
9159
|
importNamePattern?: string
|
|
9105
9160
|
allowImportNamePattern?: string
|
|
9106
9161
|
message?: string
|