@luxass/eslint-config 4.17.0 → 4.18.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.cjs +76 -14
- package/dist/index.d.cts +138 -99
- package/dist/index.d.ts +138 -99
- package/dist/index.js +75 -14
- package/package.json +68 -68
package/dist/index.d.cts
CHANGED
|
@@ -283,6 +283,8 @@ declare function node(): TypedFlatConfigItem[];
|
|
|
283
283
|
*/
|
|
284
284
|
declare function perfectionist(): Promise<TypedFlatConfigItem[]>;
|
|
285
285
|
|
|
286
|
+
declare function pnpm(): Promise<TypedFlatConfigItem[]>;
|
|
287
|
+
|
|
286
288
|
interface ReactOptions {
|
|
287
289
|
/**
|
|
288
290
|
* Override rules.
|
|
@@ -3354,122 +3356,142 @@ interface RuleOptions {
|
|
|
3354
3356
|
*/
|
|
3355
3357
|
'radix'?: Linter.RuleEntry<Radix>
|
|
3356
3358
|
/**
|
|
3357
|
-
*
|
|
3359
|
+
* Disallow `children` in void DOM elements.
|
|
3358
3360
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
3359
3361
|
*/
|
|
3360
3362
|
'react-dom/no-children-in-void-dom-elements'?: Linter.RuleEntry<[]>
|
|
3361
3363
|
/**
|
|
3362
|
-
*
|
|
3364
|
+
* Disallow `dangerouslySetInnerHTML`.
|
|
3363
3365
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
3364
3366
|
*/
|
|
3365
3367
|
'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>
|
|
3366
3368
|
/**
|
|
3367
|
-
*
|
|
3369
|
+
* Disallow `dangerouslySetInnerHTML` and `children` at the same time.
|
|
3368
3370
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
3369
3371
|
*/
|
|
3370
3372
|
'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>
|
|
3371
3373
|
/**
|
|
3372
|
-
*
|
|
3374
|
+
* Disallow `findDOMNode`.
|
|
3373
3375
|
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
3374
3376
|
*/
|
|
3375
3377
|
'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>
|
|
3376
3378
|
/**
|
|
3377
|
-
*
|
|
3379
|
+
* Disallow `flushSync`.
|
|
3378
3380
|
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
3379
3381
|
*/
|
|
3380
3382
|
'react-dom/no-flush-sync'?: Linter.RuleEntry<[]>
|
|
3381
3383
|
/**
|
|
3382
|
-
*
|
|
3384
|
+
* Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()`.
|
|
3385
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
3386
|
+
*/
|
|
3387
|
+
'react-dom/no-hydrate'?: Linter.RuleEntry<[]>
|
|
3388
|
+
/**
|
|
3389
|
+
* Enforces explicit `type` attribute for `button` elements.
|
|
3383
3390
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
3384
3391
|
*/
|
|
3385
3392
|
'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>
|
|
3386
3393
|
/**
|
|
3387
|
-
*
|
|
3394
|
+
* Enforces explicit `sandbox` attribute for `iframe` elements.
|
|
3388
3395
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
3389
3396
|
*/
|
|
3390
3397
|
'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
3391
3398
|
/**
|
|
3392
|
-
*
|
|
3399
|
+
* Enforces the absence of a `namespace` in React elements.
|
|
3393
3400
|
* @see https://eslint-react.xyz/docs/rules/dom-no-namespace
|
|
3394
3401
|
*/
|
|
3395
3402
|
'react-dom/no-namespace'?: Linter.RuleEntry<[]>
|
|
3396
3403
|
/**
|
|
3397
|
-
*
|
|
3404
|
+
* Replaces usages of `ReactDom.render()` with `createRoot(node).render()`.
|
|
3405
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
3406
|
+
*/
|
|
3407
|
+
'react-dom/no-render'?: Linter.RuleEntry<[]>
|
|
3408
|
+
/**
|
|
3409
|
+
* Disallow the return value of `ReactDOM.render`.
|
|
3398
3410
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
3399
3411
|
*/
|
|
3400
3412
|
'react-dom/no-render-return-value'?: Linter.RuleEntry<[]>
|
|
3401
3413
|
/**
|
|
3402
|
-
*
|
|
3414
|
+
* Disallow `javascript:` URLs as attribute values.
|
|
3403
3415
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
3404
3416
|
*/
|
|
3405
3417
|
'react-dom/no-script-url'?: Linter.RuleEntry<[]>
|
|
3406
3418
|
/**
|
|
3407
|
-
*
|
|
3419
|
+
* Disallow unknown `DOM` property.
|
|
3408
3420
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
3409
3421
|
*/
|
|
3410
3422
|
'react-dom/no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>
|
|
3411
3423
|
/**
|
|
3412
|
-
*
|
|
3424
|
+
* Enforces `sandbox` attribute for `iframe` elements is not set to unsafe combinations.
|
|
3413
3425
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
3414
3426
|
*/
|
|
3415
3427
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
3416
3428
|
/**
|
|
3417
|
-
*
|
|
3429
|
+
* Disallow `target="_blank"` without `rel="noreferrer noopener"`.
|
|
3418
3430
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
3419
3431
|
*/
|
|
3420
3432
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
|
|
3421
3433
|
/**
|
|
3422
|
-
*
|
|
3434
|
+
* Replaces usages of `useFormState` with `useActionState`.
|
|
3435
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
3436
|
+
*/
|
|
3437
|
+
'react-dom/no-use-form-state'?: Linter.RuleEntry<[]>
|
|
3438
|
+
/**
|
|
3439
|
+
* Disallow `children` in void DOM elements.
|
|
3423
3440
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
3424
3441
|
*/
|
|
3425
3442
|
'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>
|
|
3426
3443
|
/**
|
|
3427
|
-
*
|
|
3428
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
3444
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3445
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3429
3446
|
*/
|
|
3430
3447
|
'react-hooks-extra/ensure-custom-hooks-using-other-hooks'?: Linter.RuleEntry<[]>
|
|
3431
3448
|
/**
|
|
3432
|
-
*
|
|
3449
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
3433
3450
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
3434
3451
|
*/
|
|
3435
3452
|
'react-hooks-extra/ensure-use-callback-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
3436
3453
|
/**
|
|
3437
|
-
*
|
|
3454
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
3438
3455
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
3439
3456
|
*/
|
|
3440
3457
|
'react-hooks-extra/ensure-use-memo-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
3441
3458
|
/**
|
|
3442
|
-
*
|
|
3459
|
+
* Disallow direct calls to the `set` function of `useState` in `useEffect`.
|
|
3443
3460
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
3444
3461
|
*/
|
|
3445
3462
|
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
|
|
3446
3463
|
/**
|
|
3447
|
-
*
|
|
3464
|
+
* Disallow direct calls to the `set` function of `useState` in `useLayoutEffect`.
|
|
3448
3465
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
|
|
3449
3466
|
*/
|
|
3450
3467
|
'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
|
|
3451
3468
|
/**
|
|
3452
|
-
*
|
|
3453
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
3469
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3470
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3454
3471
|
*/
|
|
3455
3472
|
'react-hooks-extra/no-redundant-custom-hook'?: Linter.RuleEntry<[]>
|
|
3456
3473
|
/**
|
|
3457
|
-
*
|
|
3474
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
3458
3475
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
3459
3476
|
*/
|
|
3460
3477
|
'react-hooks-extra/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>
|
|
3461
3478
|
/**
|
|
3462
|
-
*
|
|
3479
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
3463
3480
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
3464
3481
|
*/
|
|
3465
3482
|
'react-hooks-extra/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>
|
|
3466
3483
|
/**
|
|
3467
|
-
*
|
|
3468
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
3484
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3485
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3486
|
+
*/
|
|
3487
|
+
'react-hooks-extra/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>
|
|
3488
|
+
/**
|
|
3489
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3490
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3469
3491
|
*/
|
|
3470
3492
|
'react-hooks-extra/no-useless-custom-hooks'?: Linter.RuleEntry<[]>
|
|
3471
3493
|
/**
|
|
3472
|
-
*
|
|
3494
|
+
* Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
|
|
3473
3495
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
3474
3496
|
*/
|
|
3475
3497
|
'react-hooks-extra/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>
|
|
@@ -3484,334 +3506,339 @@ interface RuleOptions {
|
|
|
3484
3506
|
*/
|
|
3485
3507
|
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<[]>
|
|
3486
3508
|
/**
|
|
3487
|
-
*
|
|
3509
|
+
* Enforces naming conventions for components.
|
|
3488
3510
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
3489
3511
|
*/
|
|
3490
3512
|
'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
|
|
3491
3513
|
/**
|
|
3492
|
-
*
|
|
3514
|
+
* Enforces context name to be a valid component name with the suffix `Context`.
|
|
3493
3515
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
3494
3516
|
*/
|
|
3495
3517
|
'react-naming-convention/context-name'?: Linter.RuleEntry<[]>
|
|
3496
3518
|
/**
|
|
3497
|
-
*
|
|
3519
|
+
* Enforces consistent file naming conventions.
|
|
3498
3520
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename
|
|
3499
3521
|
*/
|
|
3500
3522
|
'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>
|
|
3501
3523
|
/**
|
|
3502
|
-
*
|
|
3524
|
+
* Enforces consistent file naming conventions.
|
|
3503
3525
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
|
|
3504
3526
|
*/
|
|
3505
3527
|
'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>
|
|
3506
3528
|
/**
|
|
3507
|
-
*
|
|
3529
|
+
* Enforces destructuring and symmetric naming of `useState` hook value and setter.
|
|
3508
3530
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
3509
3531
|
*/
|
|
3510
3532
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
3511
3533
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
3512
3534
|
/**
|
|
3513
|
-
*
|
|
3535
|
+
* Prevents leaked `addEventListener` in a component or custom Hook.
|
|
3514
3536
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
3515
3537
|
*/
|
|
3516
3538
|
'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]>
|
|
3517
3539
|
/**
|
|
3518
|
-
*
|
|
3540
|
+
* Prevents leaked `setInterval` in a component or custom Hook.
|
|
3519
3541
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
3520
3542
|
*/
|
|
3521
3543
|
'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]>
|
|
3522
3544
|
/**
|
|
3523
|
-
*
|
|
3545
|
+
* Prevents leaked `ResizeObserver` in a component or custom Hook.
|
|
3524
3546
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
3525
3547
|
*/
|
|
3526
3548
|
'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]>
|
|
3527
3549
|
/**
|
|
3528
|
-
*
|
|
3550
|
+
* Prevents leaked `setTimeout` in a component or custom Hook.
|
|
3529
3551
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
3530
3552
|
*/
|
|
3531
3553
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
3532
3554
|
/**
|
|
3533
|
-
*
|
|
3555
|
+
* Enforces explicit boolean values for boolean attributes.
|
|
3534
3556
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
3535
3557
|
*/
|
|
3536
3558
|
'react/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
3537
3559
|
/**
|
|
3538
|
-
*
|
|
3560
|
+
* Enforces explicit `<Fragment>` components instead of the shorthand `<>` or `</>` syntax.
|
|
3539
3561
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
3540
3562
|
*/
|
|
3541
3563
|
'react/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
3542
3564
|
/**
|
|
3543
|
-
*
|
|
3565
|
+
* Disallow useless `forwardRef` calls on components that don't use `ref`s.
|
|
3544
3566
|
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
3545
3567
|
*/
|
|
3546
3568
|
'react/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
|
|
3547
3569
|
/**
|
|
3548
|
-
*
|
|
3549
|
-
* @see https://eslint-react.xyz/docs/rules/no-duplicate-
|
|
3570
|
+
* Disallow duplicate props in JSX elements.
|
|
3571
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
3550
3572
|
*/
|
|
3551
3573
|
'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>
|
|
3552
3574
|
/**
|
|
3553
|
-
*
|
|
3554
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3575
|
+
* Disallow undefined variables in JSX.
|
|
3576
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
3577
|
+
*/
|
|
3578
|
+
'react/jsx-no-undef'?: Linter.RuleEntry<[]>
|
|
3579
|
+
/**
|
|
3580
|
+
* Marks variables used in JSX elements as used.
|
|
3581
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
3555
3582
|
*/
|
|
3556
3583
|
'react/jsx-uses-vars'?: Linter.RuleEntry<[]>
|
|
3557
3584
|
/**
|
|
3558
|
-
*
|
|
3585
|
+
* Disallow accessing `this.state` inside `setState` calls.
|
|
3559
3586
|
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
3560
3587
|
*/
|
|
3561
3588
|
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>
|
|
3562
3589
|
/**
|
|
3563
|
-
*
|
|
3590
|
+
* Disallow an item's index in the array as its key.
|
|
3564
3591
|
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
3565
3592
|
*/
|
|
3566
3593
|
'react/no-array-index-key'?: Linter.RuleEntry<[]>
|
|
3567
3594
|
/**
|
|
3568
|
-
*
|
|
3595
|
+
* Disallow `Children.count`.
|
|
3569
3596
|
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
3570
3597
|
*/
|
|
3571
3598
|
'react/no-children-count'?: Linter.RuleEntry<[]>
|
|
3572
3599
|
/**
|
|
3573
|
-
*
|
|
3600
|
+
* Disallow 'Children.forEach'.
|
|
3574
3601
|
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
3575
3602
|
*/
|
|
3576
3603
|
'react/no-children-for-each'?: Linter.RuleEntry<[]>
|
|
3577
3604
|
/**
|
|
3578
|
-
*
|
|
3605
|
+
* Disallow `Children.map`.
|
|
3579
3606
|
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
3580
3607
|
*/
|
|
3581
3608
|
'react/no-children-map'?: Linter.RuleEntry<[]>
|
|
3582
3609
|
/**
|
|
3583
|
-
*
|
|
3610
|
+
* Disallow `Children.only`.
|
|
3584
3611
|
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
3585
3612
|
*/
|
|
3586
3613
|
'react/no-children-only'?: Linter.RuleEntry<[]>
|
|
3587
3614
|
/**
|
|
3588
|
-
*
|
|
3615
|
+
* Disallow passing `children` as a prop.
|
|
3589
3616
|
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
3590
3617
|
*/
|
|
3591
3618
|
'react/no-children-prop'?: Linter.RuleEntry<[]>
|
|
3592
3619
|
/**
|
|
3593
|
-
*
|
|
3620
|
+
* Disallow `Children.toArray`.
|
|
3594
3621
|
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
3595
3622
|
*/
|
|
3596
3623
|
'react/no-children-to-array'?: Linter.RuleEntry<[]>
|
|
3597
3624
|
/**
|
|
3598
|
-
*
|
|
3625
|
+
* Disallow class components.
|
|
3599
3626
|
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
3600
3627
|
*/
|
|
3601
3628
|
'react/no-class-component'?: Linter.RuleEntry<[]>
|
|
3602
3629
|
/**
|
|
3603
|
-
*
|
|
3630
|
+
* Disallow `cloneElement`.
|
|
3604
3631
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
3605
3632
|
*/
|
|
3606
3633
|
'react/no-clone-element'?: Linter.RuleEntry<[]>
|
|
3607
3634
|
/**
|
|
3608
|
-
*
|
|
3635
|
+
* Prevents comments from being inserted as text nodes.
|
|
3609
3636
|
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
3610
3637
|
*/
|
|
3611
3638
|
'react/no-comment-textnodes'?: Linter.RuleEntry<[]>
|
|
3612
3639
|
/**
|
|
3613
|
-
*
|
|
3640
|
+
* Disallow complex conditional rendering in JSX expressions.
|
|
3614
3641
|
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
3615
3642
|
*/
|
|
3616
3643
|
'react/no-complex-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
3617
3644
|
/**
|
|
3618
|
-
*
|
|
3645
|
+
* Disallow complex conditional rendering in JSX expressions.
|
|
3619
3646
|
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
3620
3647
|
*/
|
|
3621
3648
|
'react/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
3622
3649
|
/**
|
|
3623
|
-
*
|
|
3650
|
+
* Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
|
|
3624
3651
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
3625
3652
|
*/
|
|
3626
3653
|
'react/no-component-will-mount'?: Linter.RuleEntry<[]>
|
|
3627
3654
|
/**
|
|
3628
|
-
*
|
|
3655
|
+
* Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.
|
|
3629
3656
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
3630
3657
|
*/
|
|
3631
3658
|
'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
3632
3659
|
/**
|
|
3633
|
-
*
|
|
3660
|
+
* Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.
|
|
3634
3661
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
3635
3662
|
*/
|
|
3636
3663
|
'react/no-component-will-update'?: Linter.RuleEntry<[]>
|
|
3637
3664
|
/**
|
|
3638
|
-
*
|
|
3665
|
+
* Replace usages of `<Context.Provider>` with `<Context>`.
|
|
3639
3666
|
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
3640
3667
|
*/
|
|
3641
3668
|
'react/no-context-provider'?: Linter.RuleEntry<[]>
|
|
3642
3669
|
/**
|
|
3643
|
-
*
|
|
3670
|
+
* Disallow `createRef` in function components.
|
|
3644
3671
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
3645
3672
|
*/
|
|
3646
3673
|
'react/no-create-ref'?: Linter.RuleEntry<[]>
|
|
3647
3674
|
/**
|
|
3648
|
-
*
|
|
3675
|
+
* Disallow `defaultProps` property in favor of ES6 default parameters.
|
|
3649
3676
|
* @see https://eslint-react.xyz/docs/rules/no-default-props
|
|
3650
3677
|
*/
|
|
3651
3678
|
'react/no-default-props'?: Linter.RuleEntry<[]>
|
|
3652
3679
|
/**
|
|
3653
|
-
*
|
|
3680
|
+
* Disallow direct mutation of `this.state`.
|
|
3654
3681
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
3655
3682
|
*/
|
|
3656
3683
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>
|
|
3657
3684
|
/**
|
|
3658
|
-
*
|
|
3659
|
-
* @see https://eslint-react.xyz/docs/rules/no-duplicate-
|
|
3685
|
+
* Disallow duplicate props in JSX elements.
|
|
3686
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
3660
3687
|
*/
|
|
3661
3688
|
'react/no-duplicate-jsx-props'?: Linter.RuleEntry<[]>
|
|
3662
3689
|
/**
|
|
3663
|
-
*
|
|
3690
|
+
* Disallow duplicate `key` on elements in the same array or a list of `children`.
|
|
3664
3691
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
3665
3692
|
*/
|
|
3666
3693
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>
|
|
3667
3694
|
/**
|
|
3668
|
-
*
|
|
3695
|
+
* Replaces usages of `forwardRef` with passing `ref` as a prop.
|
|
3669
3696
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
3670
3697
|
*/
|
|
3671
3698
|
'react/no-forward-ref'?: Linter.RuleEntry<[]>
|
|
3672
3699
|
/**
|
|
3673
|
-
*
|
|
3700
|
+
* Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects).
|
|
3674
3701
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
3675
3702
|
*/
|
|
3676
3703
|
'react/no-implicit-key'?: Linter.RuleEntry<[]>
|
|
3677
3704
|
/**
|
|
3678
|
-
*
|
|
3705
|
+
* Prevents problematic leaked values from being rendered.
|
|
3679
3706
|
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
3680
3707
|
*/
|
|
3681
3708
|
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
3682
3709
|
/**
|
|
3683
|
-
*
|
|
3710
|
+
* Enforces that all components have a `displayName` which can be used in devtools.
|
|
3684
3711
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
3685
3712
|
*/
|
|
3686
3713
|
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>
|
|
3687
3714
|
/**
|
|
3688
|
-
*
|
|
3715
|
+
* Enforces that all contexts have a `displayName` which can be used in devtools.
|
|
3689
3716
|
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
3690
3717
|
*/
|
|
3691
3718
|
'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>
|
|
3692
3719
|
/**
|
|
3693
|
-
*
|
|
3720
|
+
* Disallow missing `key` on items in list rendering.
|
|
3694
3721
|
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
3695
3722
|
*/
|
|
3696
3723
|
'react/no-missing-key'?: Linter.RuleEntry<[]>
|
|
3697
3724
|
/**
|
|
3698
|
-
*
|
|
3725
|
+
* Disallow nesting component definitions inside other components.
|
|
3699
3726
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
3700
3727
|
*/
|
|
3701
3728
|
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>
|
|
3702
3729
|
/**
|
|
3703
|
-
*
|
|
3730
|
+
* Disallow nesting component definitions inside other components.
|
|
3704
3731
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
3705
3732
|
*/
|
|
3706
3733
|
'react/no-nested-components'?: Linter.RuleEntry<[]>
|
|
3707
3734
|
/**
|
|
3708
|
-
*
|
|
3735
|
+
* Disallow `propTypes` in favor of TypeScript or another type-checking solution.
|
|
3709
3736
|
* @see https://eslint-react.xyz/docs/rules/no-prop-types
|
|
3710
3737
|
*/
|
|
3711
3738
|
'react/no-prop-types'?: Linter.RuleEntry<[]>
|
|
3712
3739
|
/**
|
|
3713
|
-
*
|
|
3740
|
+
* Disallow `shouldComponentUpdate` when extending `React.PureComponent`.
|
|
3714
3741
|
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
3715
3742
|
*/
|
|
3716
3743
|
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>
|
|
3717
3744
|
/**
|
|
3718
|
-
*
|
|
3745
|
+
* Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks.
|
|
3719
3746
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
3720
3747
|
*/
|
|
3721
3748
|
'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>
|
|
3722
3749
|
/**
|
|
3723
|
-
*
|
|
3750
|
+
* Disallows calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks.
|
|
3724
3751
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
3725
3752
|
*/
|
|
3726
3753
|
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
|
|
3727
3754
|
/**
|
|
3728
|
-
*
|
|
3755
|
+
* Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
|
|
3729
3756
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
3730
3757
|
*/
|
|
3731
3758
|
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
|
|
3732
3759
|
/**
|
|
3733
|
-
*
|
|
3760
|
+
* Disallow deprecated string `refs`.
|
|
3734
3761
|
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
3735
3762
|
*/
|
|
3736
3763
|
'react/no-string-refs'?: Linter.RuleEntry<[]>
|
|
3737
3764
|
/**
|
|
3738
|
-
*
|
|
3765
|
+
* Warns the usage of `UNSAFE_componentWillMount` in class components.
|
|
3739
3766
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
3740
3767
|
*/
|
|
3741
3768
|
'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>
|
|
3742
3769
|
/**
|
|
3743
|
-
*
|
|
3770
|
+
* Warns the usage of `UNSAFE_componentWillReceiveProps` in class components.
|
|
3744
3771
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
3745
3772
|
*/
|
|
3746
3773
|
'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
3747
3774
|
/**
|
|
3748
|
-
*
|
|
3775
|
+
* Warns the usage of `UNSAFE_componentWillUpdate` in class components.
|
|
3749
3776
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
3750
3777
|
*/
|
|
3751
3778
|
'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>
|
|
3752
3779
|
/**
|
|
3753
|
-
*
|
|
3780
|
+
* Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`.
|
|
3754
3781
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
3755
3782
|
*/
|
|
3756
3783
|
'react/no-unstable-context-value'?: Linter.RuleEntry<[]>
|
|
3757
3784
|
/**
|
|
3758
|
-
*
|
|
3785
|
+
* Prevents using referential-type values as default props in object destructuring.
|
|
3759
3786
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
3760
3787
|
*/
|
|
3761
3788
|
'react/no-unstable-default-props'?: Linter.RuleEntry<[]>
|
|
3762
3789
|
/**
|
|
3763
|
-
*
|
|
3790
|
+
* Warns unused class component methods and properties.
|
|
3764
3791
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
3765
3792
|
*/
|
|
3766
3793
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
3767
3794
|
/**
|
|
3768
|
-
*
|
|
3795
|
+
* Warns unused class component state.
|
|
3769
3796
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
3770
3797
|
*/
|
|
3771
3798
|
'react/no-unused-state'?: Linter.RuleEntry<[]>
|
|
3772
3799
|
/**
|
|
3773
|
-
*
|
|
3800
|
+
* Replaces usages of `useContext` with `use`.
|
|
3774
3801
|
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
3775
3802
|
*/
|
|
3776
3803
|
'react/no-use-context'?: Linter.RuleEntry<[]>
|
|
3777
3804
|
/**
|
|
3778
|
-
*
|
|
3805
|
+
* Disallow useless `forwardRef` calls on components that don't use `ref`s.
|
|
3779
3806
|
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
3780
3807
|
*/
|
|
3781
3808
|
'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>
|
|
3782
3809
|
/**
|
|
3783
|
-
*
|
|
3810
|
+
* Disallow useless fragment elements.
|
|
3784
3811
|
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
3785
3812
|
*/
|
|
3786
3813
|
'react/no-useless-fragment'?: Linter.RuleEntry<ReactNoUselessFragment>
|
|
3787
3814
|
/**
|
|
3788
|
-
*
|
|
3815
|
+
* Enforces destructuring assignment for component props and context.
|
|
3789
3816
|
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
3790
3817
|
*/
|
|
3791
3818
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
3792
3819
|
/**
|
|
3793
|
-
*
|
|
3820
|
+
* Enforces React is imported via a namespace import.
|
|
3794
3821
|
* @see https://eslint-react.xyz/docs/rules/prefer-react-namespace-import
|
|
3795
3822
|
*/
|
|
3796
3823
|
'react/prefer-react-namespace-import'?: Linter.RuleEntry<[]>
|
|
3797
3824
|
/**
|
|
3798
|
-
*
|
|
3825
|
+
* Enforces read-only props in components.
|
|
3799
3826
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
3800
3827
|
*/
|
|
3801
3828
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
|
3802
3829
|
/**
|
|
3803
|
-
*
|
|
3830
|
+
* Enforces shorthand syntax for boolean attributes.
|
|
3804
3831
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-boolean
|
|
3805
3832
|
*/
|
|
3806
3833
|
'react/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
3807
3834
|
/**
|
|
3808
|
-
*
|
|
3835
|
+
* Enforces shorthand syntax for fragments.
|
|
3809
3836
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
3810
3837
|
*/
|
|
3811
3838
|
'react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
3812
3839
|
/**
|
|
3813
|
-
*
|
|
3814
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3840
|
+
* Marks variables used in JSX elements as used.
|
|
3841
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
3815
3842
|
*/
|
|
3816
3843
|
'react/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
3817
3844
|
/**
|
|
@@ -17093,7 +17120,8 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
17093
17120
|
type ConfigNames = 'luxass/astro/setup' | 'luxass/astro/rules' | 'luxass/eslint-comments' | 'luxass/formatter/setup' | 'luxass/imports' | 'luxass/javascript/setup' | 'luxass/javascript/rules' | 'luxass/disables/cli' | 'luxass/jsdoc/rules' | 'luxass/jsonc/setup' | 'luxass/jsonc/rules' | 'luxass/markdown/setup' | 'luxass/markdown/processor' | 'luxass/markdown/parser' | 'luxass/markdown/disables' | 'luxass/node' | 'luxass/react/setup' | 'luxass/react/rules' | 'luxass/sort/package-json' | 'luxass/perfectionist/setup' | 'luxass/stylistic' | 'luxass/tailwindcss' | 'luxass/sort/tsconfig' | 'luxass/ignores' | 'luxass/test/setup' | 'luxass/test/rules' | 'luxass/toml/setup' | 'luxass/toml/rules' | 'luxass/typescript/setup' | 'luxass/typescript/parser' | 'luxass/typescript/rules' | 'luxass/unicorn/rules' | 'luxass/unocss' | 'luxass/vue/setup' | 'luxass/vue/rules' | 'luxass/yaml/setup' | 'luxass/yaml/rules' | 'luxass/yaml/pnpm-workspace' | 'luxass/disables/scripts' | 'luxass/disables/cli' | 'luxass/disables/bin' | 'luxass/disables/dts' | 'luxass/disables/cjs' | 'luxass/disables/github-actions' | 'luxass/disables/config-files' | 'luxass/jsx/setup' | 'luxass/regexp/rules'
|
|
17094
17121
|
|
|
17095
17122
|
type Awaitable<T> = T | Promise<T>;
|
|
17096
|
-
|
|
17123
|
+
interface Rules extends RuleOptions {
|
|
17124
|
+
}
|
|
17097
17125
|
|
|
17098
17126
|
type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
|
|
17099
17127
|
/**
|
|
@@ -17270,6 +17298,17 @@ interface ConfigOptions {
|
|
|
17270
17298
|
* @default true
|
|
17271
17299
|
*/
|
|
17272
17300
|
regexp?: boolean | RegExpOptions;
|
|
17301
|
+
/**
|
|
17302
|
+
* Enable pnpm (workspace/catalogs) support.
|
|
17303
|
+
*
|
|
17304
|
+
* Currently it's disabled by default, as it's still experimental.
|
|
17305
|
+
* In the future it will be smartly enabled based on the project usage.
|
|
17306
|
+
*
|
|
17307
|
+
* @see https://github.com/antfu/pnpm-workspace-utils
|
|
17308
|
+
* @experimental
|
|
17309
|
+
* @default false
|
|
17310
|
+
*/
|
|
17311
|
+
pnpm?: boolean;
|
|
17273
17312
|
}
|
|
17274
17313
|
|
|
17275
17314
|
/**
|
|
@@ -17477,4 +17516,4 @@ declare function isPackageInScope(name: string): boolean;
|
|
|
17477
17516
|
declare function isInEditorEnv(): boolean;
|
|
17478
17517
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
17479
17518
|
|
|
17480
|
-
export { type AstroOptions, type Awaitable, type ConfigNames, type ConfigOptions, type FormattersOptions, GLOB_ASTRO, GLOB_ASTRO_TS, 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_NEXTJS_OG, GLOB_NEXTJS_ROUTES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type ImportsOptions, type JSDOCOptions, type JSONOptions, type JavaScriptOptions, type MarkdownOptions, type ProjectType, type ReactOptions, type RegExpOptions, type ResolvedOptions, type Rules, type StylisticConfig, type StylisticOptions, type TOMLOptions, type TailwindCSSOptions, type TestOptions, type TypeScriptOptions, type TypedFlatConfigItem, type UnicornOptions, type UnoCSSOptions, type UserConfigItem, type VueOptions, type YAMLOptions, astro, combine, comments, luxass as default, disables, ensure, formatters, getOverrides, ignores, imports, interop, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, luxass, markdown, node, parserPlain, perfectionist, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
17519
|
+
export { type AstroOptions, type Awaitable, type ConfigNames, type ConfigOptions, type FormattersOptions, GLOB_ASTRO, GLOB_ASTRO_TS, 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_NEXTJS_OG, GLOB_NEXTJS_ROUTES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type ImportsOptions, type JSDOCOptions, type JSONOptions, type JavaScriptOptions, type MarkdownOptions, type ProjectType, type ReactOptions, type RegExpOptions, type ResolvedOptions, type Rules, type StylisticConfig, type StylisticOptions, type TOMLOptions, type TailwindCSSOptions, type TestOptions, type TypeScriptOptions, type TypedFlatConfigItem, type UnicornOptions, type UnoCSSOptions, type UserConfigItem, type VueOptions, type YAMLOptions, astro, combine, comments, luxass as default, disables, ensure, formatters, getOverrides, ignores, imports, interop, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, luxass, markdown, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|