@infernodesign/eslint-config 1.27.0 → 2.1.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/cli.js +8 -8
- package/dist/index.d.ts +519 -113
- package/dist/index.js +37 -101
- package/package.json +31 -31
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import { cac } from "cac";
|
|
|
8
8
|
import parse from "parse-gitignore";
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.
|
|
11
|
+
var version = "2.1.0";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/cli/constants.ts
|
|
14
14
|
const vscodeSettingsString = `
|
|
@@ -186,18 +186,18 @@ async function updateEslintFiles(result) {
|
|
|
186
186
|
//#endregion
|
|
187
187
|
//#region src/cli/constants-generated.ts
|
|
188
188
|
const versionsMap = {
|
|
189
|
-
"@eslint-react/eslint-plugin": "^
|
|
190
|
-
"@next/eslint-plugin-next": "^16.2.
|
|
191
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
189
|
+
"@eslint-react/eslint-plugin": "^4.2.3",
|
|
190
|
+
"@next/eslint-plugin-next": "^16.2.2",
|
|
191
|
+
"@unocss/eslint-plugin": "^66.6.8",
|
|
192
192
|
"astro-eslint-parser": "^1.4.0",
|
|
193
|
-
"eslint": "^10.
|
|
194
|
-
"eslint-plugin-astro": "^1.
|
|
193
|
+
"eslint": "^10.2.0",
|
|
194
|
+
"eslint-plugin-astro": "^1.7.0",
|
|
195
195
|
"eslint-plugin-better-tailwindcss": "^4.3.2",
|
|
196
196
|
"eslint-plugin-format": "^2.0.1",
|
|
197
197
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
198
198
|
"eslint-plugin-solid": "^0.14.5",
|
|
199
|
-
"eslint-plugin-storybook": "^10.3.
|
|
200
|
-
"eslint-plugin-svelte": "^3.
|
|
199
|
+
"eslint-plugin-storybook": "^10.3.5",
|
|
200
|
+
"eslint-plugin-svelte": "^3.17.0",
|
|
201
201
|
"prettier-plugin-astro": "^0.14.1",
|
|
202
202
|
"prettier-plugin-slidev": "^1.0.5",
|
|
203
203
|
"svelte-eslint-parser": "^1.6.0"
|
package/dist/index.d.ts
CHANGED
|
@@ -322,6 +322,11 @@ interface RuleOptions {
|
|
|
322
322
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/
|
|
323
323
|
*/
|
|
324
324
|
'astro/no-exports-from-components'?: Linter.RuleEntry<[]>;
|
|
325
|
+
/**
|
|
326
|
+
* disallow `prerender` export outside of pages/ directory
|
|
327
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/
|
|
328
|
+
*/
|
|
329
|
+
'astro/no-prerender-export-outside-pages'?: Linter.RuleEntry<[]>;
|
|
325
330
|
/**
|
|
326
331
|
* disallow use of `set:html` to prevent XSS attack
|
|
327
332
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/
|
|
@@ -3059,6 +3064,11 @@ interface RuleOptions {
|
|
|
3059
3064
|
* @see https://perfectionist.dev/rules/sort-array-includes
|
|
3060
3065
|
*/
|
|
3061
3066
|
'perfectionist/sort-array-includes'?: Linter.RuleEntry<PerfectionistSortArrayIncludes>;
|
|
3067
|
+
/**
|
|
3068
|
+
* Enforce sorted arrays.
|
|
3069
|
+
* @see https://perfectionist.dev/rules/sort-arrays
|
|
3070
|
+
*/
|
|
3071
|
+
'perfectionist/sort-arrays'?: Linter.RuleEntry<PerfectionistSortArrays>;
|
|
3062
3072
|
/**
|
|
3063
3073
|
* Enforce sorted classes.
|
|
3064
3074
|
* @see https://perfectionist.dev/rules/sort-classes
|
|
@@ -3292,182 +3302,167 @@ interface RuleOptions {
|
|
|
3292
3302
|
* @see https://eslint.org/docs/latest/rules/radix
|
|
3293
3303
|
*/
|
|
3294
3304
|
'radix'?: Linter.RuleEntry<Radix>;
|
|
3305
|
+
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
3306
|
+
/**
|
|
3307
|
+
* Disallows higher order functions that define components or hooks inside them.
|
|
3308
|
+
* @see https://eslint-react.xyz/docs/rules/component-hook-factories
|
|
3309
|
+
*/
|
|
3310
|
+
'react/component-hook-factories'?: Linter.RuleEntry<[]>;
|
|
3295
3311
|
/**
|
|
3296
3312
|
* Disallows DOM elements from using 'dangerouslySetInnerHTML'.
|
|
3297
3313
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
3298
3314
|
*/
|
|
3299
|
-
'react-
|
|
3315
|
+
'react/dom-no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>;
|
|
3300
3316
|
/**
|
|
3301
3317
|
* Disallows DOM elements from using 'dangerouslySetInnerHTML' and 'children' at the same time.
|
|
3302
3318
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
3303
3319
|
*/
|
|
3304
|
-
'react-
|
|
3320
|
+
'react/dom-no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>;
|
|
3305
3321
|
/**
|
|
3306
3322
|
* Disallows 'findDOMNode'.
|
|
3307
3323
|
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
3308
3324
|
*/
|
|
3309
|
-
'react-
|
|
3325
|
+
'react/dom-no-find-dom-node'?: Linter.RuleEntry<[]>;
|
|
3310
3326
|
/**
|
|
3311
3327
|
* Disallows 'flushSync'.
|
|
3312
3328
|
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
3313
3329
|
*/
|
|
3314
|
-
'react-
|
|
3330
|
+
'react/dom-no-flush-sync'?: Linter.RuleEntry<[]>;
|
|
3315
3331
|
/**
|
|
3316
3332
|
* Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'.
|
|
3317
3333
|
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
3318
3334
|
*/
|
|
3319
|
-
'react-
|
|
3335
|
+
'react/dom-no-hydrate'?: Linter.RuleEntry<[]>;
|
|
3320
3336
|
/**
|
|
3321
3337
|
* Enforces an explicit 'type' attribute for 'button' elements.
|
|
3322
3338
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
3323
3339
|
*/
|
|
3324
|
-
'react-
|
|
3340
|
+
'react/dom-no-missing-button-type'?: Linter.RuleEntry<[]>;
|
|
3325
3341
|
/**
|
|
3326
3342
|
* Enforces an explicit 'sandbox' attribute for 'iframe' elements.
|
|
3327
3343
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
3328
3344
|
*/
|
|
3329
|
-
'react-
|
|
3330
|
-
/**
|
|
3331
|
-
* Enforces the absence of a 'namespace' in React elements.
|
|
3332
|
-
* @see https://eslint-react.xyz/docs/rules/dom-no-namespace
|
|
3333
|
-
*/
|
|
3334
|
-
'react-dom/no-namespace'?: Linter.RuleEntry<[]>;
|
|
3345
|
+
'react/dom-no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
3335
3346
|
/**
|
|
3336
3347
|
* Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'.
|
|
3337
3348
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
3338
3349
|
*/
|
|
3339
|
-
'react-
|
|
3350
|
+
'react/dom-no-render'?: Linter.RuleEntry<[]>;
|
|
3340
3351
|
/**
|
|
3341
3352
|
* Disallows the return value of 'ReactDOM.render'.
|
|
3342
3353
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
3343
3354
|
*/
|
|
3344
|
-
'react-
|
|
3355
|
+
'react/dom-no-render-return-value'?: Linter.RuleEntry<[]>;
|
|
3345
3356
|
/**
|
|
3346
3357
|
* Disallows 'javascript:' URLs as attribute values.
|
|
3347
3358
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
3348
3359
|
*/
|
|
3349
|
-
'react-
|
|
3360
|
+
'react/dom-no-script-url'?: Linter.RuleEntry<[]>;
|
|
3350
3361
|
/**
|
|
3351
3362
|
* Disallows the use of string style prop in JSX. Use an object instead.
|
|
3352
3363
|
* @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
3353
3364
|
*/
|
|
3354
|
-
'react-
|
|
3365
|
+
'react/dom-no-string-style-prop'?: Linter.RuleEntry<[]>;
|
|
3355
3366
|
/**
|
|
3356
3367
|
* Disallows unknown 'DOM' properties.
|
|
3357
3368
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
3358
3369
|
*/
|
|
3359
|
-
'react-
|
|
3370
|
+
'react/dom-no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>;
|
|
3360
3371
|
/**
|
|
3361
3372
|
* Enforces that the 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
|
|
3362
3373
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
3363
3374
|
*/
|
|
3364
|
-
'react-
|
|
3375
|
+
'react/dom-no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
3365
3376
|
/**
|
|
3366
3377
|
* Disallows 'target="_blank"' without 'rel="noreferrer noopener"'.
|
|
3367
3378
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
3368
3379
|
*/
|
|
3369
|
-
'react-
|
|
3380
|
+
'react/dom-no-unsafe-target-blank'?: Linter.RuleEntry<[]>;
|
|
3370
3381
|
/**
|
|
3371
3382
|
* Replaces usage of 'useFormState' with 'useActionState'.
|
|
3372
3383
|
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
3373
3384
|
*/
|
|
3374
|
-
'react-
|
|
3385
|
+
'react/dom-no-use-form-state'?: Linter.RuleEntry<[]>;
|
|
3375
3386
|
/**
|
|
3376
3387
|
* Disallows 'children' in void DOM elements.
|
|
3377
3388
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
3378
3389
|
*/
|
|
3379
|
-
'react-
|
|
3390
|
+
'react/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
|
|
3380
3391
|
/**
|
|
3381
3392
|
* Enforces importing React DOM via a namespace import.
|
|
3382
3393
|
* @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
|
|
3383
3394
|
*/
|
|
3384
|
-
'react-
|
|
3385
|
-
/**
|
|
3386
|
-
* Enforces the context name to be a valid component name with the suffix 'Context'.
|
|
3387
|
-
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
3388
|
-
*/
|
|
3389
|
-
'react-naming-convention/context-name'?: Linter.RuleEntry<[]>;
|
|
3390
|
-
/**
|
|
3391
|
-
* Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
|
|
3392
|
-
* @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
|
|
3393
|
-
*/
|
|
3394
|
-
'react-naming-convention/id-name'?: Linter.RuleEntry<[]>;
|
|
3395
|
-
/**
|
|
3396
|
-
* Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
|
|
3397
|
-
* @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
|
|
3398
|
-
*/
|
|
3399
|
-
'react-naming-convention/ref-name'?: Linter.RuleEntry<[]>;
|
|
3400
|
-
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
3395
|
+
'react/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
3401
3396
|
/**
|
|
3402
|
-
* Validates
|
|
3403
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3397
|
+
* Validates usage of Error Boundaries instead of try/catch for errors in child components.
|
|
3398
|
+
* @see https://eslint-react.xyz/docs/rules/error-boundaries
|
|
3404
3399
|
*/
|
|
3405
|
-
'react
|
|
3400
|
+
'react/error-boundaries'?: Linter.RuleEntry<[]>;
|
|
3406
3401
|
/**
|
|
3407
|
-
*
|
|
3408
|
-
* @see https://
|
|
3402
|
+
* Verifies the list of dependencies for Hooks like 'useEffect' and similar.
|
|
3403
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
3409
3404
|
*/
|
|
3410
|
-
'react
|
|
3405
|
+
'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>;
|
|
3411
3406
|
/**
|
|
3412
|
-
*
|
|
3413
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3407
|
+
* Validates against mutating props, state, and other values that are immutable.
|
|
3408
|
+
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3414
3409
|
*/
|
|
3415
|
-
'react
|
|
3410
|
+
'react/immutability'?: Linter.RuleEntry<[]>;
|
|
3416
3411
|
/**
|
|
3417
|
-
*
|
|
3418
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3412
|
+
* Disallows passing 'children' as a prop.
|
|
3413
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
3419
3414
|
*/
|
|
3420
|
-
'react-
|
|
3415
|
+
'react/jsx-no-children-prop'?: Linter.RuleEntry<[]>;
|
|
3421
3416
|
/**
|
|
3422
|
-
*
|
|
3423
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3417
|
+
* Disallows passing 'children' as a prop when children are also passed as nested content.
|
|
3418
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-prop-with-children
|
|
3424
3419
|
*/
|
|
3425
|
-
'react-
|
|
3420
|
+
'react/jsx-no-children-prop-with-children'?: Linter.RuleEntry<[]>;
|
|
3426
3421
|
/**
|
|
3427
|
-
*
|
|
3428
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3422
|
+
* Prevents comment strings from being accidentally inserted into a JSX element's text nodes.
|
|
3423
|
+
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
3429
3424
|
*/
|
|
3430
|
-
'react/
|
|
3425
|
+
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
3431
3426
|
/**
|
|
3432
|
-
*
|
|
3433
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3427
|
+
* Prevent patterns that cause deoptimization when using the automatic JSX runtime.
|
|
3428
|
+
* @see https://eslint-react.xyz/docs/rules/no-key-after-spread
|
|
3434
3429
|
*/
|
|
3435
|
-
'react/
|
|
3430
|
+
'react/jsx-no-key-after-spread'?: Linter.RuleEntry<[]>;
|
|
3436
3431
|
/**
|
|
3437
|
-
*
|
|
3438
|
-
* @see https://
|
|
3432
|
+
* Catches `$` before `{expr}` in JSX — typically from template literal `${expr}` being copy-pasted into JSX without removing the `$`. The `$` "leaks" into the rendered output.
|
|
3433
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-dollar
|
|
3439
3434
|
*/
|
|
3440
|
-
'react/
|
|
3435
|
+
'react/jsx-no-leaked-dollar'?: Linter.RuleEntry<[]>;
|
|
3441
3436
|
/**
|
|
3442
|
-
*
|
|
3443
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3437
|
+
* Catches `;` at the start of JSX text nodes — typically from accidentally placing a statement-ending `;` inside JSX. The `;` "leaks" into the rendered output.
|
|
3438
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-semicolon
|
|
3444
3439
|
*/
|
|
3445
|
-
'react/
|
|
3440
|
+
'react/jsx-no-leaked-semicolon'?: Linter.RuleEntry<[]>;
|
|
3446
3441
|
/**
|
|
3447
|
-
*
|
|
3448
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3442
|
+
* Disallow JSX namespace syntax, as React does not support them.
|
|
3443
|
+
* @see https://eslint-react.xyz/docs/rules/no-namespace
|
|
3449
3444
|
*/
|
|
3450
|
-
'react/jsx-
|
|
3445
|
+
'react/jsx-no-namespace'?: Linter.RuleEntry<[]>;
|
|
3451
3446
|
/**
|
|
3452
|
-
*
|
|
3453
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3447
|
+
* Disallows useless fragment elements.
|
|
3448
|
+
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
3454
3449
|
*/
|
|
3455
|
-
'react/jsx-
|
|
3450
|
+
'react/jsx-no-useless-fragment'?: Linter.RuleEntry<ReactJsxNoUselessFragment>;
|
|
3456
3451
|
/**
|
|
3457
|
-
*
|
|
3458
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3452
|
+
* Enforces the context name to be a valid component name with the suffix 'Context'.
|
|
3453
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
3459
3454
|
*/
|
|
3460
|
-
'react/
|
|
3455
|
+
'react/naming-convention-context-name'?: Linter.RuleEntry<[]>;
|
|
3461
3456
|
/**
|
|
3462
|
-
* Enforces
|
|
3463
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3457
|
+
* Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
|
|
3458
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
|
|
3464
3459
|
*/
|
|
3465
|
-
'react/
|
|
3460
|
+
'react/naming-convention-id-name'?: Linter.RuleEntry<[]>;
|
|
3466
3461
|
/**
|
|
3467
|
-
* Enforces
|
|
3468
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3462
|
+
* Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
|
|
3463
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
|
|
3469
3464
|
*/
|
|
3470
|
-
'react/
|
|
3465
|
+
'react/naming-convention-ref-name'?: Linter.RuleEntry<[]>;
|
|
3471
3466
|
/**
|
|
3472
3467
|
* Disallows accessing 'this.state' inside 'setState' calls.
|
|
3473
3468
|
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
@@ -3498,11 +3493,6 @@ interface RuleOptions {
|
|
|
3498
3493
|
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
3499
3494
|
*/
|
|
3500
3495
|
'react/no-children-only'?: Linter.RuleEntry<[]>;
|
|
3501
|
-
/**
|
|
3502
|
-
* Disallows passing 'children' as a prop.
|
|
3503
|
-
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
3504
|
-
*/
|
|
3505
|
-
'react/no-children-prop'?: Linter.RuleEntry<[]>;
|
|
3506
3496
|
/**
|
|
3507
3497
|
* Disallows the use of 'Children.toArray' from the 'react' package.
|
|
3508
3498
|
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
@@ -3604,7 +3594,7 @@ interface RuleOptions {
|
|
|
3604
3594
|
*/
|
|
3605
3595
|
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
3606
3596
|
/**
|
|
3607
|
-
* Disallows nesting lazy component declarations inside other components.
|
|
3597
|
+
* Disallows nesting lazy component declarations inside other components or hooks.
|
|
3608
3598
|
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
3609
3599
|
*/
|
|
3610
3600
|
'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
@@ -3688,11 +3678,6 @@ interface RuleOptions {
|
|
|
3688
3678
|
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
3689
3679
|
*/
|
|
3690
3680
|
'react/no-use-context'?: Linter.RuleEntry<[]>;
|
|
3691
|
-
/**
|
|
3692
|
-
* Disallows useless fragment elements.
|
|
3693
|
-
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
3694
|
-
*/
|
|
3695
|
-
'react/no-useless-fragment'?: Linter.RuleEntry<ReactNoUselessFragment>;
|
|
3696
3681
|
/**
|
|
3697
3682
|
* Enforces destructuring assignment for component props and context.
|
|
3698
3683
|
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
@@ -3713,6 +3698,11 @@ interface RuleOptions {
|
|
|
3713
3698
|
* @see https://eslint-react.xyz/docs/rules/refs
|
|
3714
3699
|
*/
|
|
3715
3700
|
'react/refs'?: Linter.RuleEntry<[]>;
|
|
3701
|
+
/**
|
|
3702
|
+
* Validates and transforms React Client/Server Function definitions.
|
|
3703
|
+
* @see https://eslint-react.xyz/docs/rules/function-definition
|
|
3704
|
+
*/
|
|
3705
|
+
'react/rsc-function-definition'?: Linter.RuleEntry<[]>;
|
|
3716
3706
|
/**
|
|
3717
3707
|
* Enforces the Rules of Hooks.
|
|
3718
3708
|
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
@@ -3729,30 +3719,325 @@ interface RuleOptions {
|
|
|
3729
3719
|
*/
|
|
3730
3720
|
'react/set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
3731
3721
|
/**
|
|
3732
|
-
*
|
|
3733
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3722
|
+
* Validates against syntax that React Compiler does not support.
|
|
3723
|
+
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
3724
|
+
*/
|
|
3725
|
+
'react/unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
3726
|
+
/**
|
|
3727
|
+
* Validates that 'useMemo' is called with a callback that returns a value.
|
|
3728
|
+
* @see https://eslint-react.xyz/docs/rules/use-memo
|
|
3729
|
+
*/
|
|
3730
|
+
'react/use-memo'?: Linter.RuleEntry<[]>;
|
|
3731
|
+
/**
|
|
3732
|
+
* Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
|
|
3733
|
+
* @see https://eslint-react.xyz/docs/rules/use-state
|
|
3734
|
+
*/
|
|
3735
|
+
'react/use-state'?: Linter.RuleEntry<ReactUseState>;
|
|
3736
|
+
/**
|
|
3737
|
+
* Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'.
|
|
3738
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
3739
|
+
*/
|
|
3740
|
+
'react/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
|
|
3741
|
+
/**
|
|
3742
|
+
* Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
|
|
3743
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
3744
|
+
*/
|
|
3745
|
+
'react/web-api-no-leaked-interval'?: Linter.RuleEntry<[]>;
|
|
3746
|
+
/**
|
|
3747
|
+
* Enforces that every 'ResizeObserver' created in a component or custom hook has a corresponding 'ResizeObserver.disconnect()'.
|
|
3748
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
3749
|
+
*/
|
|
3750
|
+
'react/web-api-no-leaked-resize-observer'?: Linter.RuleEntry<[]>;
|
|
3751
|
+
/**
|
|
3752
|
+
* Enforces that every 'setTimeout' in a component or custom hook has a corresponding 'clearTimeout'.
|
|
3753
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
3754
|
+
*/
|
|
3755
|
+
'react/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
3756
|
+
/**
|
|
3757
|
+
* Disallows higher order functions that define components or hooks inside them.
|
|
3758
|
+
* @see https://eslint-react.xyz/docs/rules/component-hook-factories
|
|
3759
|
+
*/
|
|
3760
|
+
'react/x-component-hook-factories'?: Linter.RuleEntry<[]>;
|
|
3761
|
+
/**
|
|
3762
|
+
* Validates usage of Error Boundaries instead of try/catch for errors in child components.
|
|
3763
|
+
* @see https://eslint-react.xyz/docs/rules/error-boundaries
|
|
3764
|
+
*/
|
|
3765
|
+
'react/x-error-boundaries'?: Linter.RuleEntry<[]>;
|
|
3766
|
+
/**
|
|
3767
|
+
* Verifies the list of dependencies for Hooks like 'useEffect' and similar.
|
|
3768
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
3769
|
+
*/
|
|
3770
|
+
'react/x-exhaustive-deps'?: Linter.RuleEntry<ReactXExhaustiveDeps>;
|
|
3771
|
+
/**
|
|
3772
|
+
* Validates against mutating props, state, and other values that are immutable.
|
|
3773
|
+
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3774
|
+
*/
|
|
3775
|
+
'react/x-immutability'?: Linter.RuleEntry<[]>;
|
|
3776
|
+
/**
|
|
3777
|
+
* Disallows accessing 'this.state' inside 'setState' calls.
|
|
3778
|
+
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
3779
|
+
*/
|
|
3780
|
+
'react/x-no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
3781
|
+
/**
|
|
3782
|
+
* Disallows using an item's index in the array as its key.
|
|
3783
|
+
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
3784
|
+
*/
|
|
3785
|
+
'react/x-no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
3786
|
+
/**
|
|
3787
|
+
* Disallows the use of 'Children.count' from the 'react' package.
|
|
3788
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
3789
|
+
*/
|
|
3790
|
+
'react/x-no-children-count'?: Linter.RuleEntry<[]>;
|
|
3791
|
+
/**
|
|
3792
|
+
* Disallows the use of 'Children.forEach' from the 'react' package.
|
|
3793
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
3794
|
+
*/
|
|
3795
|
+
'react/x-no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
3796
|
+
/**
|
|
3797
|
+
* Disallows the use of 'Children.map' from the 'react' package.
|
|
3798
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
3799
|
+
*/
|
|
3800
|
+
'react/x-no-children-map'?: Linter.RuleEntry<[]>;
|
|
3801
|
+
/**
|
|
3802
|
+
* Disallows the use of 'Children.only' from the 'react' package.
|
|
3803
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
3804
|
+
*/
|
|
3805
|
+
'react/x-no-children-only'?: Linter.RuleEntry<[]>;
|
|
3806
|
+
/**
|
|
3807
|
+
* Disallows the use of 'Children.toArray' from the 'react' package.
|
|
3808
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
3809
|
+
*/
|
|
3810
|
+
'react/x-no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
3811
|
+
/**
|
|
3812
|
+
* Disallows class components except for error boundaries.
|
|
3813
|
+
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
3814
|
+
*/
|
|
3815
|
+
'react/x-no-class-component'?: Linter.RuleEntry<[]>;
|
|
3816
|
+
/**
|
|
3817
|
+
* Disallows 'cloneElement'.
|
|
3818
|
+
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
3819
|
+
*/
|
|
3820
|
+
'react/x-no-clone-element'?: Linter.RuleEntry<[]>;
|
|
3821
|
+
/**
|
|
3822
|
+
* Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
|
|
3823
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
3824
|
+
*/
|
|
3825
|
+
'react/x-no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
3826
|
+
/**
|
|
3827
|
+
* Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
|
|
3828
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
3829
|
+
*/
|
|
3830
|
+
'react/x-no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
3831
|
+
/**
|
|
3832
|
+
* Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
|
|
3833
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
3834
|
+
*/
|
|
3835
|
+
'react/x-no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
3836
|
+
/**
|
|
3837
|
+
* Replaces usage of '<Context.Provider>' with '<Context>'.
|
|
3838
|
+
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
3839
|
+
*/
|
|
3840
|
+
'react/x-no-context-provider'?: Linter.RuleEntry<[]>;
|
|
3841
|
+
/**
|
|
3842
|
+
* Disallows 'createRef' in function components.
|
|
3843
|
+
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
3844
|
+
*/
|
|
3845
|
+
'react/x-no-create-ref'?: Linter.RuleEntry<[]>;
|
|
3846
|
+
/**
|
|
3847
|
+
* Disallows direct mutation of 'this.state'.
|
|
3848
|
+
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
3849
|
+
*/
|
|
3850
|
+
'react/x-no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
3851
|
+
/**
|
|
3852
|
+
* Prevents duplicate 'key' props on sibling elements when rendering lists.
|
|
3853
|
+
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
3854
|
+
*/
|
|
3855
|
+
'react/x-no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
3856
|
+
/**
|
|
3857
|
+
* Replaces usage of 'forwardRef' with passing 'ref' as a prop.
|
|
3858
|
+
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
3859
|
+
*/
|
|
3860
|
+
'react/x-no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
3861
|
+
/**
|
|
3862
|
+
* Prevents implicitly passing the 'children' prop to components.
|
|
3863
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-children
|
|
3864
|
+
*/
|
|
3865
|
+
'react/x-no-implicit-children'?: Linter.RuleEntry<[]>;
|
|
3866
|
+
/**
|
|
3867
|
+
* Prevents implicitly passing the 'key' prop to components.
|
|
3868
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
3869
|
+
*/
|
|
3870
|
+
'react/x-no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
3871
|
+
/**
|
|
3872
|
+
* Prevents implicitly passing the 'ref' prop to components.
|
|
3873
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-ref
|
|
3874
|
+
*/
|
|
3875
|
+
'react/x-no-implicit-ref'?: Linter.RuleEntry<[]>;
|
|
3876
|
+
/**
|
|
3877
|
+
* Prevents problematic leaked values from being rendered.
|
|
3878
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
3879
|
+
*/
|
|
3880
|
+
'react/x-no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
3881
|
+
/**
|
|
3882
|
+
* Enforces that all components have a 'displayName' that can be used in DevTools.
|
|
3883
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
3884
|
+
*/
|
|
3885
|
+
'react/x-no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
3886
|
+
/**
|
|
3887
|
+
* Enforces that all contexts have a 'displayName' that can be used in DevTools.
|
|
3888
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
3889
|
+
*/
|
|
3890
|
+
'react/x-no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
3891
|
+
/**
|
|
3892
|
+
* Disallows missing 'key' on items in list rendering.
|
|
3893
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
3734
3894
|
*/
|
|
3735
|
-
'react/
|
|
3895
|
+
'react/x-no-missing-key'?: Linter.RuleEntry<[]>;
|
|
3736
3896
|
/**
|
|
3737
|
-
*
|
|
3738
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3897
|
+
* Prevents incorrect usage of 'captureOwnerStack'.
|
|
3898
|
+
* @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
3739
3899
|
*/
|
|
3740
|
-
'react/
|
|
3900
|
+
'react/x-no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
3901
|
+
/**
|
|
3902
|
+
* Disallows nesting component definitions inside other components.
|
|
3903
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
3904
|
+
*/
|
|
3905
|
+
'react/x-no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
3906
|
+
/**
|
|
3907
|
+
* Disallows nesting lazy component declarations inside other components or hooks.
|
|
3908
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
3909
|
+
*/
|
|
3910
|
+
'react/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
3911
|
+
/**
|
|
3912
|
+
* Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
|
|
3913
|
+
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
3914
|
+
*/
|
|
3915
|
+
'react/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
|
|
3916
|
+
/**
|
|
3917
|
+
* Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
|
|
3918
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
3919
|
+
*/
|
|
3920
|
+
'react/x-no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
3921
|
+
/**
|
|
3922
|
+
* Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
|
|
3923
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
3924
|
+
*/
|
|
3925
|
+
'react/x-no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
3926
|
+
/**
|
|
3927
|
+
* Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
|
|
3928
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
3929
|
+
*/
|
|
3930
|
+
'react/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
3931
|
+
/**
|
|
3932
|
+
* Disallows unnecessary usage of 'useCallback'.
|
|
3933
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
3934
|
+
*/
|
|
3935
|
+
'react/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
3936
|
+
/**
|
|
3937
|
+
* Disallows unnecessary usage of 'useMemo'.
|
|
3938
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
3939
|
+
*/
|
|
3940
|
+
'react/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
3941
|
+
/**
|
|
3942
|
+
* Enforces that a function with the 'use' prefix uses at least one Hook inside it.
|
|
3943
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
3944
|
+
*/
|
|
3945
|
+
'react/x-no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
3946
|
+
/**
|
|
3947
|
+
* Warns about the use of 'UNSAFE_componentWillMount' in class components.
|
|
3948
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
3949
|
+
*/
|
|
3950
|
+
'react/x-no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
3951
|
+
/**
|
|
3952
|
+
* Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
|
|
3953
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
3954
|
+
*/
|
|
3955
|
+
'react/x-no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
3956
|
+
/**
|
|
3957
|
+
* Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
|
|
3958
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
3959
|
+
*/
|
|
3960
|
+
'react/x-no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
3961
|
+
/**
|
|
3962
|
+
* Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
|
|
3963
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
3964
|
+
*/
|
|
3965
|
+
'react/x-no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
3966
|
+
/**
|
|
3967
|
+
* Prevents using referential-type values as default props in object destructuring.
|
|
3968
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
3969
|
+
*/
|
|
3970
|
+
'react/x-no-unstable-default-props'?: Linter.RuleEntry<ReactXNoUnstableDefaultProps>;
|
|
3971
|
+
/**
|
|
3972
|
+
* Warns about unused class component methods and properties.
|
|
3973
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
3974
|
+
*/
|
|
3975
|
+
'react/x-no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
3976
|
+
/**
|
|
3977
|
+
* Warns about component props that are defined but never used.
|
|
3978
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
3979
|
+
*/
|
|
3980
|
+
'react/x-no-unused-props'?: Linter.RuleEntry<[]>;
|
|
3981
|
+
/**
|
|
3982
|
+
* Warns about unused class component state.
|
|
3983
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
3984
|
+
*/
|
|
3985
|
+
'react/x-no-unused-state'?: Linter.RuleEntry<[]>;
|
|
3986
|
+
/**
|
|
3987
|
+
* Replaces usage of 'useContext' with 'use'.
|
|
3988
|
+
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
3989
|
+
*/
|
|
3990
|
+
'react/x-no-use-context'?: Linter.RuleEntry<[]>;
|
|
3991
|
+
/**
|
|
3992
|
+
* Enforces destructuring assignment for component props and context.
|
|
3993
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
3994
|
+
*/
|
|
3995
|
+
'react/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
3996
|
+
/**
|
|
3997
|
+
* Enforces importing React via a namespace import.
|
|
3998
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
3999
|
+
*/
|
|
4000
|
+
'react/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
4001
|
+
/**
|
|
4002
|
+
* Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
|
|
4003
|
+
* @see https://eslint-react.xyz/docs/rules/purity
|
|
4004
|
+
*/
|
|
4005
|
+
'react/x-purity'?: Linter.RuleEntry<[]>;
|
|
4006
|
+
/**
|
|
4007
|
+
* Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
|
|
4008
|
+
* @see https://eslint-react.xyz/docs/rules/refs
|
|
4009
|
+
*/
|
|
4010
|
+
'react/x-refs'?: Linter.RuleEntry<[]>;
|
|
4011
|
+
/**
|
|
4012
|
+
* Enforces the Rules of Hooks.
|
|
4013
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
4014
|
+
*/
|
|
4015
|
+
'react/x-rules-of-hooks'?: Linter.RuleEntry<ReactXRulesOfHooks>;
|
|
4016
|
+
/**
|
|
4017
|
+
* Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
|
|
4018
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-effect
|
|
4019
|
+
*/
|
|
4020
|
+
'react/x-set-state-in-effect'?: Linter.RuleEntry<[]>;
|
|
4021
|
+
/**
|
|
4022
|
+
* Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
|
|
4023
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-render
|
|
4024
|
+
*/
|
|
4025
|
+
'react/x-set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
3741
4026
|
/**
|
|
3742
4027
|
* Validates against syntax that React Compiler does not support.
|
|
3743
4028
|
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
3744
4029
|
*/
|
|
3745
|
-
'react/unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
4030
|
+
'react/x-unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
3746
4031
|
/**
|
|
3747
4032
|
* Validates that 'useMemo' is called with a callback that returns a value.
|
|
3748
4033
|
* @see https://eslint-react.xyz/docs/rules/use-memo
|
|
3749
4034
|
*/
|
|
3750
|
-
'react/use-memo'?: Linter.RuleEntry<[]>;
|
|
4035
|
+
'react/x-use-memo'?: Linter.RuleEntry<[]>;
|
|
3751
4036
|
/**
|
|
3752
4037
|
* Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
|
|
3753
4038
|
* @see https://eslint-react.xyz/docs/rules/use-state
|
|
3754
4039
|
*/
|
|
3755
|
-
'react/use-state'?: Linter.RuleEntry<
|
|
4040
|
+
'react/x-use-state'?: Linter.RuleEntry<ReactXUseState>;
|
|
3756
4041
|
/**
|
|
3757
4042
|
* disallow confusing quantifiers
|
|
3758
4043
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
|
|
@@ -11569,6 +11854,112 @@ type PerfectionistSortArrayIncludes = {
|
|
|
11569
11854
|
} | string)));
|
|
11570
11855
|
});
|
|
11571
11856
|
partitionByNewLine?: boolean;
|
|
11857
|
+
}[]; // ----- perfectionist/sort-arrays -----
|
|
11858
|
+
type PerfectionistSortArrays = {
|
|
11859
|
+
fallbackSort?: {
|
|
11860
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11861
|
+
order?: ("asc" | "desc");
|
|
11862
|
+
};
|
|
11863
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11864
|
+
specialCharacters?: ("remove" | "trim" | "keep");
|
|
11865
|
+
ignoreCase?: boolean;
|
|
11866
|
+
alphabet?: string;
|
|
11867
|
+
locales?: (string | string[]);
|
|
11868
|
+
order?: ("asc" | "desc");
|
|
11869
|
+
customGroups?: ({
|
|
11870
|
+
fallbackSort?: {
|
|
11871
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11872
|
+
order?: ("asc" | "desc");
|
|
11873
|
+
};
|
|
11874
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11875
|
+
groupName: string;
|
|
11876
|
+
newlinesInside?: ("ignore" | number);
|
|
11877
|
+
order?: ("asc" | "desc");
|
|
11878
|
+
anyOf: [{
|
|
11879
|
+
elementNamePattern?: (({
|
|
11880
|
+
pattern: string;
|
|
11881
|
+
flags?: string;
|
|
11882
|
+
} | string)[] | ({
|
|
11883
|
+
pattern: string;
|
|
11884
|
+
flags?: string;
|
|
11885
|
+
} | string));
|
|
11886
|
+
selector?: "literal";
|
|
11887
|
+
}, ...({
|
|
11888
|
+
elementNamePattern?: (({
|
|
11889
|
+
pattern: string;
|
|
11890
|
+
flags?: string;
|
|
11891
|
+
} | string)[] | ({
|
|
11892
|
+
pattern: string;
|
|
11893
|
+
flags?: string;
|
|
11894
|
+
} | string));
|
|
11895
|
+
selector?: "literal";
|
|
11896
|
+
})[]];
|
|
11897
|
+
} | {
|
|
11898
|
+
fallbackSort?: {
|
|
11899
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11900
|
+
order?: ("asc" | "desc");
|
|
11901
|
+
};
|
|
11902
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11903
|
+
groupName: string;
|
|
11904
|
+
newlinesInside?: ("ignore" | number);
|
|
11905
|
+
order?: ("asc" | "desc");
|
|
11906
|
+
elementNamePattern?: (({
|
|
11907
|
+
pattern: string;
|
|
11908
|
+
flags?: string;
|
|
11909
|
+
} | string)[] | ({
|
|
11910
|
+
pattern: string;
|
|
11911
|
+
flags?: string;
|
|
11912
|
+
} | string));
|
|
11913
|
+
selector?: "literal";
|
|
11914
|
+
})[];
|
|
11915
|
+
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
11916
|
+
groups?: (string | [string, ...(string)[]] | {
|
|
11917
|
+
newlinesBetween: ("ignore" | number);
|
|
11918
|
+
} | {
|
|
11919
|
+
group: (string | [string, ...(string)[]]);
|
|
11920
|
+
fallbackSort?: {
|
|
11921
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11922
|
+
order?: ("asc" | "desc");
|
|
11923
|
+
};
|
|
11924
|
+
commentAbove?: string;
|
|
11925
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11926
|
+
newlinesInside?: ("ignore" | number);
|
|
11927
|
+
order?: ("asc" | "desc");
|
|
11928
|
+
})[];
|
|
11929
|
+
newlinesBetween?: ("ignore" | number);
|
|
11930
|
+
useConfigurationIf: {
|
|
11931
|
+
allNamesMatchPattern?: (({
|
|
11932
|
+
pattern: string;
|
|
11933
|
+
flags?: string;
|
|
11934
|
+
} | string)[] | ({
|
|
11935
|
+
pattern: string;
|
|
11936
|
+
flags?: string;
|
|
11937
|
+
} | string));
|
|
11938
|
+
matchesAstSelector?: string;
|
|
11939
|
+
};
|
|
11940
|
+
partitionByComment?: (boolean | (({
|
|
11941
|
+
pattern: string;
|
|
11942
|
+
flags?: string;
|
|
11943
|
+
} | string)[] | ({
|
|
11944
|
+
pattern: string;
|
|
11945
|
+
flags?: string;
|
|
11946
|
+
} | string)) | {
|
|
11947
|
+
block?: (boolean | (({
|
|
11948
|
+
pattern: string;
|
|
11949
|
+
flags?: string;
|
|
11950
|
+
} | string)[] | ({
|
|
11951
|
+
pattern: string;
|
|
11952
|
+
flags?: string;
|
|
11953
|
+
} | string)));
|
|
11954
|
+
line?: (boolean | (({
|
|
11955
|
+
pattern: string;
|
|
11956
|
+
flags?: string;
|
|
11957
|
+
} | string)[] | ({
|
|
11958
|
+
pattern: string;
|
|
11959
|
+
flags?: string;
|
|
11960
|
+
} | string)));
|
|
11961
|
+
});
|
|
11962
|
+
partitionByNewLine?: boolean;
|
|
11572
11963
|
}[]; // ----- perfectionist/sort-classes -----
|
|
11573
11964
|
type PerfectionistSortClasses = {
|
|
11574
11965
|
fallbackSort?: {
|
|
@@ -14050,31 +14441,29 @@ type Quotes = [] | [("single" | "double" | "backtick")] | [("single" | "double"
|
|
|
14050
14441
|
avoidEscape?: boolean;
|
|
14051
14442
|
allowTemplateLiterals?: boolean;
|
|
14052
14443
|
})]; // ----- radix -----
|
|
14053
|
-
type Radix = [] | [("always" | "as-needed")]; // ----- react-
|
|
14054
|
-
type ReactDomNoUnknownProperty = [] | [{
|
|
14055
|
-
ignore?: string[];
|
|
14056
|
-
requireDataLowercase?: boolean;
|
|
14057
|
-
}]; // ----- react-refresh/only-export-components -----
|
|
14444
|
+
type Radix = [] | [("always" | "as-needed")]; // ----- react-refresh/only-export-components -----
|
|
14058
14445
|
type ReactRefreshOnlyExportComponents = [] | [{
|
|
14059
14446
|
extraHOCs?: string[];
|
|
14060
14447
|
allowExportNames?: string[];
|
|
14061
14448
|
allowConstantExport?: boolean;
|
|
14062
14449
|
checkJS?: boolean;
|
|
14450
|
+
}]; // ----- react/dom-no-unknown-property -----
|
|
14451
|
+
type ReactDomNoUnknownProperty = [] | [{
|
|
14452
|
+
ignore?: string[];
|
|
14453
|
+
requireDataLowercase?: boolean;
|
|
14063
14454
|
}]; // ----- react/exhaustive-deps -----
|
|
14064
14455
|
type ReactExhaustiveDeps = [] | [{
|
|
14065
14456
|
additionalHooks?: string;
|
|
14066
14457
|
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
14067
14458
|
experimental_autoDependenciesHooks?: string[];
|
|
14068
14459
|
requireExplicitEffectDeps?: boolean;
|
|
14069
|
-
}]; // ----- react/jsx-
|
|
14070
|
-
type
|
|
14071
|
-
type ReactJsxShorthandFragment = [] | [(-1 | 1)]; // ----- react/no-unstable-default-props -----
|
|
14072
|
-
type ReactNoUnstableDefaultProps = [] | [{
|
|
14073
|
-
safeDefaultProps?: string[];
|
|
14074
|
-
}]; // ----- react/no-useless-fragment -----
|
|
14075
|
-
type ReactNoUselessFragment = [] | [{
|
|
14460
|
+
}]; // ----- react/jsx-no-useless-fragment -----
|
|
14461
|
+
type ReactJsxNoUselessFragment = [] | [{
|
|
14076
14462
|
allowEmptyFragment?: boolean;
|
|
14077
14463
|
allowExpressions?: boolean;
|
|
14464
|
+
}]; // ----- react/no-unstable-default-props -----
|
|
14465
|
+
type ReactNoUnstableDefaultProps = [] | [{
|
|
14466
|
+
safeDefaultProps?: string[];
|
|
14078
14467
|
}]; // ----- react/rules-of-hooks -----
|
|
14079
14468
|
type ReactRulesOfHooks = [] | [{
|
|
14080
14469
|
additionalHooks?: string;
|
|
@@ -14083,6 +14472,23 @@ type ReactUseState = [] | [{
|
|
|
14083
14472
|
enforceAssignment?: boolean;
|
|
14084
14473
|
enforceLazyInitialization?: boolean;
|
|
14085
14474
|
enforceSetterName?: boolean;
|
|
14475
|
+
}]; // ----- react/x-exhaustive-deps -----
|
|
14476
|
+
type ReactXExhaustiveDeps = [] | [{
|
|
14477
|
+
additionalHooks?: string;
|
|
14478
|
+
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
14479
|
+
experimental_autoDependenciesHooks?: string[];
|
|
14480
|
+
requireExplicitEffectDeps?: boolean;
|
|
14481
|
+
}]; // ----- react/x-no-unstable-default-props -----
|
|
14482
|
+
type ReactXNoUnstableDefaultProps = [] | [{
|
|
14483
|
+
safeDefaultProps?: string[];
|
|
14484
|
+
}]; // ----- react/x-rules-of-hooks -----
|
|
14485
|
+
type ReactXRulesOfHooks = [] | [{
|
|
14486
|
+
additionalHooks?: string;
|
|
14487
|
+
}]; // ----- react/x-use-state -----
|
|
14488
|
+
type ReactXUseState = [] | [{
|
|
14489
|
+
enforceAssignment?: boolean;
|
|
14490
|
+
enforceLazyInitialization?: boolean;
|
|
14491
|
+
enforceSetterName?: boolean;
|
|
14086
14492
|
}]; // ----- regexp/hexadecimal-escape -----
|
|
14087
14493
|
type RegexpHexadecimalEscape = [] | [("always" | "never")]; // ----- regexp/letter-case -----
|
|
14088
14494
|
type RegexpLetterCase = [] | [{
|
|
@@ -18598,7 +19004,7 @@ declare function comments(): Promise<TypedFlatConfigItem[]>;
|
|
|
18598
19004
|
declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
18599
19005
|
//#endregion
|
|
18600
19006
|
//#region src/configs/e18e.d.ts
|
|
18601
|
-
declare function e18e(options?:
|
|
19007
|
+
declare function e18e(options?: OptionsE18e & OptionsProjectType & OptionsIsInEditor): Promise<TypedFlatConfigItem[]>;
|
|
18602
19008
|
//#endregion
|
|
18603
19009
|
//#region src/configs/formatters.d.ts
|
|
18604
19010
|
declare function formatters(options?: true | OptionsFormatters, stylistic?: StylisticConfig): Promise<TypedFlatConfigItem[]>;
|
package/dist/index.js
CHANGED
|
@@ -102,48 +102,57 @@ const GLOB_ALL_SRC = [
|
|
|
102
102
|
GLOB_HTML
|
|
103
103
|
];
|
|
104
104
|
const GLOB_EXCLUDE = [
|
|
105
|
-
"
|
|
105
|
+
"**/.agents",
|
|
106
|
+
"**/.antigravity",
|
|
106
107
|
"**/.bmad",
|
|
107
|
-
"**/.
|
|
108
|
-
"**/.
|
|
108
|
+
"**/.context",
|
|
109
|
+
"**/.codex",
|
|
109
110
|
"**/.claude",
|
|
110
111
|
"**/.cursor",
|
|
112
|
+
"**/.windsurf",
|
|
113
|
+
"**/.*/skills",
|
|
114
|
+
"**/AGENTS.md",
|
|
115
|
+
"**/.idea",
|
|
116
|
+
"**/.vscode",
|
|
117
|
+
"**/.zed",
|
|
118
|
+
"**/__snapshots__",
|
|
119
|
+
"**/coverage",
|
|
120
|
+
"**/.cache",
|
|
111
121
|
"**/.eslintcache",
|
|
122
|
+
"**/.temp",
|
|
123
|
+
"**/.tmp",
|
|
124
|
+
"**/.vitepress/cache",
|
|
125
|
+
"**/temp",
|
|
126
|
+
"**/tmp",
|
|
112
127
|
"**/.history",
|
|
113
|
-
"**/.idea",
|
|
114
128
|
"**/.next",
|
|
115
129
|
"**/.nuxt",
|
|
116
130
|
"**/.output",
|
|
117
131
|
"**/.svelte-kit",
|
|
118
|
-
"**/.temp",
|
|
119
|
-
"**/.tmp",
|
|
120
132
|
"**/.turbo",
|
|
121
133
|
"**/.vercel",
|
|
122
134
|
"**/.vite-inspect",
|
|
123
|
-
"**/.vitepress/cache",
|
|
124
|
-
"**/.vscode",
|
|
125
|
-
"**/.windsurf",
|
|
126
|
-
"**/.yarn",
|
|
127
135
|
"**/*.min.*",
|
|
128
136
|
"**/auto-import?(s).d.ts",
|
|
129
137
|
"**/build",
|
|
130
|
-
"**/bun.lock",
|
|
131
|
-
"**/bun.lockb",
|
|
132
|
-
"**/CHANGELOG*.md",
|
|
133
138
|
"**/components.d.ts",
|
|
134
|
-
"**/coverage",
|
|
135
139
|
"**/dist",
|
|
136
|
-
"**/LICENSE*",
|
|
137
140
|
"**/next-env.d.ts",
|
|
138
|
-
"**/node_modules",
|
|
139
141
|
"**/out",
|
|
140
142
|
"**/output",
|
|
143
|
+
"**/vite.config.*.timestamp-*",
|
|
144
|
+
"**/.changeset",
|
|
145
|
+
"**/.private",
|
|
146
|
+
"**/private",
|
|
147
|
+
"**/CHANGELOG*.md",
|
|
148
|
+
"**/LICENSE*.md",
|
|
149
|
+
"**/.yarn",
|
|
150
|
+
"**/bun.lock",
|
|
151
|
+
"**/bun.lockb",
|
|
141
152
|
"**/package-lock.json",
|
|
142
153
|
"**/pnpm-lock.yaml",
|
|
143
|
-
"**/
|
|
144
|
-
"**/tmp",
|
|
154
|
+
"**/node_modules",
|
|
145
155
|
"**/vendor",
|
|
146
|
-
"**/vite.config.*.timestamp-*",
|
|
147
156
|
"**/yarn.lock"
|
|
148
157
|
];
|
|
149
158
|
const GLOB_SEARCH_EXCLUDE = new Set([
|
|
@@ -469,7 +478,7 @@ async function disables() {
|
|
|
469
478
|
//#endregion
|
|
470
479
|
//#region src/configs/e18e.ts
|
|
471
480
|
async function e18e(options = {}) {
|
|
472
|
-
const { isInEditor = false, modernization = true, moduleReplacements = isInEditor, overrides = {}, performanceImprovements = true } = options;
|
|
481
|
+
const { isInEditor = false, modernization = true, type = "app", moduleReplacements = type === "lib" && isInEditor, overrides = {}, performanceImprovements = true } = options;
|
|
473
482
|
const configs = pluginE18e.configs;
|
|
474
483
|
return [{
|
|
475
484
|
name: "config/e18e/rules",
|
|
@@ -478,6 +487,8 @@ async function e18e(options = {}) {
|
|
|
478
487
|
...modernization ? { ...configs.modernization.rules } : {},
|
|
479
488
|
...moduleReplacements ? { ...configs.moduleReplacements.rules } : {},
|
|
480
489
|
...performanceImprovements ? { ...configs.performanceImprovements.rules } : {},
|
|
490
|
+
"e18e/prefer-array-at": "off",
|
|
491
|
+
"e18e/prefer-array-from-map": "off",
|
|
481
492
|
"e18e/prefer-array-to-reversed": "off",
|
|
482
493
|
"e18e/prefer-array-to-sorted": "off",
|
|
483
494
|
"e18e/prefer-array-to-spliced": "off",
|
|
@@ -1754,31 +1765,22 @@ const ReactRouterPackages = [
|
|
|
1754
1765
|
"@react-router/dev"
|
|
1755
1766
|
];
|
|
1756
1767
|
const NextJsPackages = ["next"];
|
|
1757
|
-
const ReactCompilerPackages = ["babel-plugin-react-compiler"];
|
|
1758
1768
|
async function react(options = {}) {
|
|
1759
|
-
const { files = [GLOB_SRC], filesTypeAware = [GLOB_TS, GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], overrides = {},
|
|
1769
|
+
const { files = [GLOB_SRC], filesTypeAware = [GLOB_TS, GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], overrides = {}, tsconfigPath } = options;
|
|
1760
1770
|
await ensurePackages(["@eslint-react/eslint-plugin", "eslint-plugin-react-refresh"]);
|
|
1761
1771
|
const isTypeAware = !!tsconfigPath;
|
|
1762
|
-
const typeAwareRules = {
|
|
1763
|
-
"react/no-implicit-key": "error",
|
|
1764
|
-
"react/no-leaked-conditional-rendering": "warn"
|
|
1765
|
-
};
|
|
1772
|
+
const typeAwareRules = { "react/no-leaked-conditional-rendering": "error" };
|
|
1766
1773
|
const [pluginReact, pluginReactRefresh] = await Promise.all([interopDefault(import("@eslint-react/eslint-plugin")), interopDefault(import("eslint-plugin-react-refresh"))]);
|
|
1767
1774
|
const isAllowConstantExport = ReactRefreshAllowConstantExportPackages.some((i) => isPackageExists(i));
|
|
1768
1775
|
const isUsingRemix = RemixPackages.some((i) => isPackageExists(i));
|
|
1769
1776
|
const isUsingReactRouter = ReactRouterPackages.some((i) => isPackageExists(i));
|
|
1770
1777
|
const isUsingNext = NextJsPackages.some((i) => isPackageExists(i));
|
|
1771
|
-
const plugins = pluginReact.configs.all.plugins;
|
|
1772
1778
|
return [
|
|
1773
1779
|
{
|
|
1774
1780
|
name: "config/react/setup",
|
|
1775
1781
|
plugins: {
|
|
1776
|
-
"react":
|
|
1777
|
-
"react-
|
|
1778
|
-
"react-naming-convention": plugins["@eslint-react/naming-convention"],
|
|
1779
|
-
"react-refresh": pluginReactRefresh,
|
|
1780
|
-
"react-rsc": plugins["@eslint-react/rsc"],
|
|
1781
|
-
"react-web-api": plugins["@eslint-react/web-api"]
|
|
1782
|
+
"react": pluginReact,
|
|
1783
|
+
"react-refresh": pluginReactRefresh
|
|
1782
1784
|
}
|
|
1783
1785
|
},
|
|
1784
1786
|
{
|
|
@@ -1789,70 +1791,8 @@ async function react(options = {}) {
|
|
|
1789
1791
|
},
|
|
1790
1792
|
name: "config/react/rules",
|
|
1791
1793
|
rules: {
|
|
1792
|
-
|
|
1793
|
-
"react/jsx-no-comment-textnodes": "warn",
|
|
1794
|
-
"react/no-access-state-in-setstate": "error",
|
|
1795
|
-
"react/no-array-index-key": "warn",
|
|
1796
|
-
"react/no-children-count": "warn",
|
|
1797
|
-
"react/no-children-for-each": "warn",
|
|
1798
|
-
"react/no-children-map": "warn",
|
|
1799
|
-
"react/no-children-only": "warn",
|
|
1800
|
-
"react/no-children-to-array": "warn",
|
|
1801
|
-
"react/no-clone-element": "warn",
|
|
1802
|
-
"react/no-component-will-mount": "error",
|
|
1803
|
-
"react/no-component-will-receive-props": "error",
|
|
1804
|
-
"react/no-component-will-update": "error",
|
|
1805
|
-
"react/no-context-provider": "warn",
|
|
1806
|
-
"react/no-create-ref": "error",
|
|
1807
|
-
"react/no-direct-mutation-state": "error",
|
|
1808
|
-
"react/no-forward-ref": "warn",
|
|
1809
|
-
"react/no-missing-key": "error",
|
|
1810
|
-
"react/no-nested-component-definitions": "error",
|
|
1811
|
-
"react/no-nested-lazy-component-declarations": "error",
|
|
1812
|
-
"react/no-redundant-should-component-update": "error",
|
|
1813
|
-
"react/no-set-state-in-component-did-mount": "warn",
|
|
1814
|
-
"react/no-set-state-in-component-did-update": "warn",
|
|
1815
|
-
"react/no-set-state-in-component-will-update": "warn",
|
|
1816
|
-
"react/no-unnecessary-use-prefix": "warn",
|
|
1817
|
-
"react/no-unsafe-component-will-mount": "warn",
|
|
1818
|
-
"react/no-unsafe-component-will-receive-props": "warn",
|
|
1819
|
-
"react/no-unsafe-component-will-update": "warn",
|
|
1820
|
-
"react/no-unused-class-component-members": "warn",
|
|
1821
|
-
"react/no-use-context": "warn",
|
|
1822
|
-
"react/set-state-in-effect": "warn",
|
|
1794
|
+
...pluginReact.configs.recommended.rules,
|
|
1823
1795
|
"react/prefer-namespace-import": "error",
|
|
1824
|
-
"react-rsc/function-definition": "error",
|
|
1825
|
-
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
1826
|
-
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
1827
|
-
"react-dom/no-find-dom-node": "error",
|
|
1828
|
-
"react-dom/no-flush-sync": "error",
|
|
1829
|
-
"react-dom/no-hydrate": "error",
|
|
1830
|
-
"react-dom/no-namespace": "error",
|
|
1831
|
-
"react-dom/no-render": "error",
|
|
1832
|
-
"react-dom/no-render-return-value": "error",
|
|
1833
|
-
"react-dom/no-script-url": "warn",
|
|
1834
|
-
"react-dom/no-unsafe-iframe-sandbox": "warn",
|
|
1835
|
-
"react-dom/no-use-form-state": "error",
|
|
1836
|
-
"react-dom/no-void-elements-with-children": "error",
|
|
1837
|
-
"react-naming-convention/context-name": "warn",
|
|
1838
|
-
"react-naming-convention/ref-name": "warn",
|
|
1839
|
-
"react-web-api/no-leaked-event-listener": "warn",
|
|
1840
|
-
"react-web-api/no-leaked-interval": "warn",
|
|
1841
|
-
"react-web-api/no-leaked-resize-observer": "warn",
|
|
1842
|
-
"react-web-api/no-leaked-timeout": "warn",
|
|
1843
|
-
"react/exhaustive-deps": "warn",
|
|
1844
|
-
"react/rules-of-hooks": "error",
|
|
1845
|
-
...reactCompiler ? {
|
|
1846
|
-
"react/component-hook-factories": "error",
|
|
1847
|
-
"react/error-boundaries": "error",
|
|
1848
|
-
"react/immutability": "error",
|
|
1849
|
-
"react/purity": "error",
|
|
1850
|
-
"react/refs": "error",
|
|
1851
|
-
"react/set-state-in-effect": "error",
|
|
1852
|
-
"react/set-state-in-render": "error",
|
|
1853
|
-
"react/unsupported-syntax": "warn",
|
|
1854
|
-
"react/use-memo": "error"
|
|
1855
|
-
} : {},
|
|
1856
1796
|
"react-refresh/only-export-components": ["error", {
|
|
1857
1797
|
allowConstantExport: isAllowConstantExport,
|
|
1858
1798
|
allowExportNames: [...isUsingNext ? [
|
|
@@ -1887,11 +1827,7 @@ async function react(options = {}) {
|
|
|
1887
1827
|
},
|
|
1888
1828
|
{
|
|
1889
1829
|
files: filesTypeAware,
|
|
1890
|
-
name: "config/react/typescript"
|
|
1891
|
-
rules: {
|
|
1892
|
-
"react-dom/no-string-style-prop": "off",
|
|
1893
|
-
"react-dom/no-unknown-property": "off"
|
|
1894
|
-
}
|
|
1830
|
+
name: "config/react/typescript"
|
|
1895
1831
|
},
|
|
1896
1832
|
...isTypeAware ? [{
|
|
1897
1833
|
files: filesTypeAware,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infernodesign/eslint-config",
|
|
3
3
|
"description": "ESLint config for Inferno Design.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Inferno Design <support@infernodesign.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,38 +40,38 @@
|
|
|
40
40
|
"build:inspect": "bun run build && bunx @eslint/config-inspector build",
|
|
41
41
|
"dev": "tsdown --watch",
|
|
42
42
|
"gen": "bun run scripts/typegen.ts && bun run scripts/versiongen.ts",
|
|
43
|
-
"lint": "eslint . --cache --cache-location node_modules/.cache/.eslintcache",
|
|
43
|
+
"lint": "eslint . --cache --cache-location node_modules/.cache/.eslintcache --quiet",
|
|
44
44
|
"prepack": "bun run build",
|
|
45
45
|
"test": "vitest",
|
|
46
46
|
"typecheck": "tsc --noEmit --emitDeclarationOnly false"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@antfu/install-pkg": "1.1.0",
|
|
50
|
-
"@clack/prompts": "1.
|
|
50
|
+
"@clack/prompts": "1.2.0",
|
|
51
51
|
"@e18e/eslint-plugin": "0.3.0",
|
|
52
52
|
"@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
|
|
53
|
-
"@eslint/compat": "2.0.
|
|
54
|
-
"@eslint/config-array": "0.23.
|
|
55
|
-
"@eslint/config-helpers": "0.5.
|
|
53
|
+
"@eslint/compat": "2.0.5",
|
|
54
|
+
"@eslint/config-array": "0.23.5",
|
|
55
|
+
"@eslint/config-helpers": "0.5.5",
|
|
56
56
|
"@eslint/markdown": "8.0.1",
|
|
57
57
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "8.58.
|
|
59
|
-
"@typescript-eslint/parser": "8.58.
|
|
60
|
-
"@typescript-eslint/utils": "8.58.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "8.58.1",
|
|
59
|
+
"@typescript-eslint/parser": "8.58.1",
|
|
60
|
+
"@typescript-eslint/utils": "8.58.1",
|
|
61
61
|
"@vitest/eslint-plugin": "1.6.14",
|
|
62
62
|
"ansis": "4.2.0",
|
|
63
63
|
"cac": "7.0.0",
|
|
64
64
|
"eslint-config-flat-gitignore": "2.3.0",
|
|
65
|
-
"eslint-flat-config-utils": "3.0
|
|
65
|
+
"eslint-flat-config-utils": "3.1.0",
|
|
66
66
|
"eslint-merge-processors": "2.0.0",
|
|
67
67
|
"eslint-plugin-antfu": "3.2.2",
|
|
68
68
|
"eslint-plugin-command": "3.5.2",
|
|
69
69
|
"eslint-plugin-import-lite": "0.6.0",
|
|
70
|
-
"eslint-plugin-jsdoc": "62.
|
|
70
|
+
"eslint-plugin-jsdoc": "62.9.0",
|
|
71
71
|
"eslint-plugin-jsonc": "3.1.2",
|
|
72
72
|
"eslint-plugin-n": "17.24.0",
|
|
73
73
|
"eslint-plugin-no-only-tests": "3.3.0",
|
|
74
|
-
"eslint-plugin-perfectionist": "5.
|
|
74
|
+
"eslint-plugin-perfectionist": "5.8.0",
|
|
75
75
|
"eslint-plugin-pnpm": "1.6.0",
|
|
76
76
|
"eslint-plugin-regexp": "3.1.0",
|
|
77
77
|
"eslint-plugin-toml": "1.3.1",
|
|
@@ -89,25 +89,25 @@
|
|
|
89
89
|
"yaml-eslint-parser": "2.0.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@eslint-react/eslint-plugin": "
|
|
92
|
+
"@eslint-react/eslint-plugin": "4.2.3",
|
|
93
93
|
"@eslint/config-inspector": "1.5.0",
|
|
94
94
|
"@infernodesign/typescript-config": "workspace:*",
|
|
95
|
-
"@next/eslint-plugin-next": "16.2.
|
|
95
|
+
"@next/eslint-plugin-next": "16.2.2",
|
|
96
96
|
"@prettier/plugin-xml": "3.4.2",
|
|
97
97
|
"@types/eslint-plugin-jsx-a11y": "6.10.1",
|
|
98
|
-
"@types/node": "25.5.
|
|
99
|
-
"@unocss/eslint-plugin": "66.6.
|
|
98
|
+
"@types/node": "25.5.2",
|
|
99
|
+
"@unocss/eslint-plugin": "66.6.8",
|
|
100
100
|
"astro-eslint-parser": "1.4.0",
|
|
101
|
-
"eslint": "10.
|
|
102
|
-
"eslint-plugin-astro": "1.
|
|
101
|
+
"eslint": "10.2.0",
|
|
102
|
+
"eslint-plugin-astro": "1.7.0",
|
|
103
103
|
"eslint-plugin-better-tailwindcss": "4.3.2",
|
|
104
104
|
"eslint-plugin-erasable-syntax-only": "0.4.0",
|
|
105
105
|
"eslint-plugin-format": "2.0.1",
|
|
106
106
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
107
107
|
"eslint-plugin-react-refresh": "0.5.2",
|
|
108
108
|
"eslint-plugin-solid": "0.14.5",
|
|
109
|
-
"eslint-plugin-storybook": "10.3.
|
|
110
|
-
"eslint-plugin-svelte": "3.
|
|
109
|
+
"eslint-plugin-storybook": "10.3.5",
|
|
110
|
+
"eslint-plugin-svelte": "3.17.0",
|
|
111
111
|
"eslint-plugin-vuejs-accessibility": "2.5.0",
|
|
112
112
|
"eslint-typegen": "2.3.1",
|
|
113
113
|
"execa": "9.6.1",
|
|
@@ -116,30 +116,30 @@
|
|
|
116
116
|
"pnpm-workspace-yaml": "1.6.0",
|
|
117
117
|
"prettier-plugin-astro": "0.14.1",
|
|
118
118
|
"prettier-plugin-slidev": "1.0.5",
|
|
119
|
-
"svelte": "5.55.
|
|
119
|
+
"svelte": "5.55.2",
|
|
120
120
|
"svelte-eslint-parser": "1.6.0",
|
|
121
|
-
"tinyglobby": "0.2.
|
|
121
|
+
"tinyglobby": "0.2.16",
|
|
122
122
|
"tsdown": "0.21.7",
|
|
123
123
|
"typescript": "5.9.3",
|
|
124
|
-
"vitest": "4.1.
|
|
125
|
-
"vue": "3.5.
|
|
124
|
+
"vitest": "4.1.3",
|
|
125
|
+
"vue": "3.5.32"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
|
-
"@eslint-react/eslint-plugin": "^
|
|
129
|
-
"@next/eslint-plugin-next": "^16.2.
|
|
128
|
+
"@eslint-react/eslint-plugin": "^4.2.3",
|
|
129
|
+
"@next/eslint-plugin-next": "^16.2.2",
|
|
130
130
|
"@prettier/plugin-xml": "^3.4.2",
|
|
131
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
131
|
+
"@unocss/eslint-plugin": "^66.6.8",
|
|
132
132
|
"astro-eslint-parser": "^1.4.0",
|
|
133
|
-
"eslint": "^10.
|
|
134
|
-
"eslint-plugin-astro": "^1.
|
|
133
|
+
"eslint": "^10.2.0",
|
|
134
|
+
"eslint-plugin-astro": "^1.7.0",
|
|
135
135
|
"eslint-plugin-better-tailwindcss": "^4.3.2",
|
|
136
136
|
"eslint-plugin-erasable-syntax-only": "^0.4.0",
|
|
137
137
|
"eslint-plugin-format": "^2.0.1",
|
|
138
138
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
139
139
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
140
140
|
"eslint-plugin-solid": "^0.14.5",
|
|
141
|
-
"eslint-plugin-storybook": "^10.3.
|
|
142
|
-
"eslint-plugin-svelte": "^3.
|
|
141
|
+
"eslint-plugin-storybook": "^10.3.5",
|
|
142
|
+
"eslint-plugin-svelte": "^3.17.0",
|
|
143
143
|
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
|
144
144
|
"prettier-plugin-astro": "^0.14.1",
|
|
145
145
|
"prettier-plugin-slidev": "^1.0.5",
|