@infernodesign/eslint-config 1.24.0 → 1.25.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/README.md CHANGED
@@ -176,14 +176,14 @@ export default config( {
176
176
 
177
177
  // Customize the stylistic rules
178
178
  stylistic: {
179
- indent: 2, // 4, or 'tab'
180
- quotes: 'single', // or 'double'
181
179
  blockSpacing: false,
182
180
  braceStyle: '1tbs',
183
181
  commaDangle: 'always-multiline',
184
182
  experimental: false,
183
+ indent: 2, // 4, or 'tab'
185
184
  jsx: true,
186
185
  quoteProps: 'consistent',
186
+ quotes: 'single', // or 'double'
187
187
  semi: false,
188
188
 
189
189
  // Disable the opinionated spacing rules (space in parenthesis, objects, arrays, etc.)
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.24.0";
11
+ var version = "1.25.0";
12
12
  //#endregion
13
13
  //#region src/cli/constants.ts
14
14
  const vscodeSettingsString = `
@@ -190,19 +190,19 @@ async function updateEslintFiles(result) {
190
190
  //#endregion
191
191
  //#region src/cli/constants-generated.ts
192
192
  const versionsMap = {
193
- "@eslint-react/eslint-plugin": "^2.13.0",
194
- "@next/eslint-plugin-next": "^16.1.6",
195
- "@unocss/eslint-plugin": "^66.6.6",
193
+ "@eslint-react/eslint-plugin": "^3.0.0",
194
+ "@next/eslint-plugin-next": "^16.2.0",
195
+ "@unocss/eslint-plugin": "^66.6.7",
196
196
  "astro-eslint-parser": "^1.3.0",
197
- "eslint": "^10.0.3",
197
+ "eslint": "^10.1.0",
198
198
  "eslint-plugin-astro": "^1.6.0",
199
199
  "eslint-plugin-better-tailwindcss": "^4.3.2",
200
200
  "eslint-plugin-format": "^2.0.1",
201
201
  "eslint-plugin-react-hooks": "^7.0.1",
202
202
  "eslint-plugin-react-refresh": "^0.5.2",
203
203
  "eslint-plugin-solid": "^0.14.5",
204
- "eslint-plugin-storybook": "^10.2.16",
205
- "eslint-plugin-svelte": "^3.15.0",
204
+ "eslint-plugin-storybook": "^10.3.1",
205
+ "eslint-plugin-svelte": "^3.15.2",
206
206
  "prettier-plugin-astro": "^0.14.1",
207
207
  "prettier-plugin-slidev": "^1.0.5",
208
208
  "svelte-eslint-parser": "^1.6.0"
@@ -286,11 +286,14 @@ async function run(options = {}) {
286
286
  };
287
287
  if (!argSkipPrompt) {
288
288
  result = await p.group({
289
- uncommittedConfirmed: async () => {
290
- if (argSkipPrompt || isGitClean()) return Promise.resolve(true);
291
- return p.confirm({
292
- initialValue: false,
293
- message: "There are uncommitted changes in the current repository, are you sure to continue?"
289
+ extra: async ({ results }) => {
290
+ const isArgExtraValid = !!argExtra?.length && !argExtra.some((element) => !extra.includes(element));
291
+ if (!results.uncommittedConfirmed || isArgExtraValid) return;
292
+ const message = !isArgExtraValid && argExtra?.length ? `"${argExtra.join(", ")}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
293
+ return p.multiselect({
294
+ message: c.reset(message),
295
+ options: extraOptions,
296
+ required: false
294
297
  });
295
298
  },
296
299
  frameworks: async ({ results }) => {
@@ -303,14 +306,11 @@ async function run(options = {}) {
303
306
  required: false
304
307
  });
305
308
  },
306
- extra: async ({ results }) => {
307
- const isArgExtraValid = !!argExtra?.length && !argExtra.some((element) => !extra.includes(element));
308
- if (!results.uncommittedConfirmed || isArgExtraValid) return;
309
- const message = !isArgExtraValid && argExtra?.length ? `"${argExtra.join(", ")}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
310
- return p.multiselect({
311
- message: c.reset(message),
312
- options: extraOptions,
313
- required: false
309
+ uncommittedConfirmed: async () => {
310
+ if (argSkipPrompt || isGitClean()) return Promise.resolve(true);
311
+ return p.confirm({
312
+ initialValue: false,
313
+ message: "There are uncommitted changes in the current repository, are you sure to continue?"
314
314
  });
315
315
  },
316
316
  updateVscodeSettings: async ({ results }) => {
package/dist/index.d.ts CHANGED
@@ -3377,11 +3377,6 @@ interface RuleOptions {
3377
3377
  * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
3378
3378
  */
3379
3379
  'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>;
3380
- /**
3381
- * Disallows direct calls to the ['set' function](https://react.dev/reference/react/useState#setstate) of 'useState' in 'useEffect'.
3382
- * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
3383
- */
3384
- 'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
3385
3380
  /**
3386
3381
  * Verifies that automatic effect dependencies are compiled if opted-in
3387
3382
  */
@@ -3500,26 +3495,11 @@ interface RuleOptions {
3500
3495
  * Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
3501
3496
  */
3502
3497
  'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
3503
- /**
3504
- * Enforces naming conventions for components.
3505
- * @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
3506
- */
3507
- 'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>;
3508
3498
  /**
3509
3499
  * Enforces the context name to be a valid component name with the suffix 'Context'.
3510
3500
  * @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
3511
3501
  */
3512
3502
  'react-naming-convention/context-name'?: Linter.RuleEntry<[]>;
3513
- /**
3514
- * Enforces consistent file-naming conventions.
3515
- * @see https://eslint-react.xyz/docs/rules/naming-convention-filename
3516
- */
3517
- 'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>;
3518
- /**
3519
- * Enforces consistent use of the JSX file extension.
3520
- * @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
3521
- */
3522
- 'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>;
3523
3503
  /**
3524
3504
  * Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
3525
3505
  * @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
@@ -3530,14 +3510,9 @@ interface RuleOptions {
3530
3510
  * @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
3531
3511
  */
3532
3512
  'react-naming-convention/ref-name'?: Linter.RuleEntry<[]>;
3533
- /**
3534
- * Enforces destructuring and symmetric naming of the 'useState' hook value and setter.
3535
- * @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
3536
- */
3537
- 'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>;
3538
3513
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
3539
3514
  /**
3540
- * Validate and transform React Client/Server Function definitions.
3515
+ * Validates and transforms React Client/Server Function definitions.
3541
3516
  * @see https://eslint-react.xyz/docs/rules/function-definition
3542
3517
  */
3543
3518
  'react-rsc/function-definition'?: Linter.RuleEntry<[]>;
@@ -3561,6 +3536,26 @@ interface RuleOptions {
3561
3536
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
3562
3537
  */
3563
3538
  'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
3539
+ /**
3540
+ * Disallows higher order functions that define components or hooks inside them.
3541
+ * @see https://eslint-react.xyz/docs/rules/component-hook-factories
3542
+ */
3543
+ 'react/component-hook-factories'?: Linter.RuleEntry<[]>;
3544
+ /**
3545
+ * Validates usage of Error Boundaries instead of try/catch for errors in child components.
3546
+ * @see https://eslint-react.xyz/docs/rules/error-boundaries
3547
+ */
3548
+ 'react/error-boundaries'?: Linter.RuleEntry<[]>;
3549
+ /**
3550
+ * Verifies the list of dependencies for Hooks like 'useEffect' and similar.
3551
+ * @see https://github.com/facebook/react/issues/14920
3552
+ */
3553
+ 'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>;
3554
+ /**
3555
+ * Validates against mutating props, state, and other values that are immutable.
3556
+ * @see https://eslint-react.xyz/docs/rules/immutability
3557
+ */
3558
+ 'react/immutability'?: Linter.RuleEntry<[]>;
3564
3559
  /**
3565
3560
  * Prevents unintentional '$' sign before expression.
3566
3561
  * @see https://eslint-react.xyz/docs/rules/jsx-dollar
@@ -3572,25 +3567,10 @@ interface RuleOptions {
3572
3567
  */
3573
3568
  'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
3574
3569
  /**
3575
- * Prevents comment strings (e.g., beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
3570
+ * Prevents comment strings (ex: beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
3576
3571
  * @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
3577
3572
  */
3578
3573
  'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
3579
- /**
3580
- * Disallows duplicate props in JSX elements.
3581
- * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
3582
- */
3583
- 'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>;
3584
- /**
3585
- * Disallows immediately-invoked function expressions in JSX.
3586
- * @see https://eslint-react.xyz/docs/rules/jsx-no-iife
3587
- */
3588
- 'react/jsx-no-iife'?: Linter.RuleEntry<[]>;
3589
- /**
3590
- * Prevents using variables in JSX that are not defined in the scope.
3591
- * @see https://eslint-react.xyz/docs/rules/jsx-no-undef
3592
- */
3593
- 'react/jsx-no-undef'?: Linter.RuleEntry<[]>;
3594
3574
  /**
3595
3575
  * Enforces shorthand syntax for boolean props.
3596
3576
  * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
@@ -3601,16 +3581,6 @@ interface RuleOptions {
3601
3581
  * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
3602
3582
  */
3603
3583
  'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>;
3604
- /**
3605
- * Marks React variables as used when JSX is present.
3606
- * @see https://eslint-react.xyz/docs/rules/jsx-uses-react
3607
- */
3608
- 'react/jsx-uses-react'?: Linter.RuleEntry<[]>;
3609
- /**
3610
- * Marks JSX element variables as used.
3611
- * @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
3612
- */
3613
- 'react/jsx-uses-vars'?: Linter.RuleEntry<[]>;
3614
3584
  /**
3615
3585
  * Disallows accessing 'this.state' inside 'setState' calls.
3616
3586
  * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
@@ -3686,11 +3656,6 @@ interface RuleOptions {
3686
3656
  * @see https://eslint-react.xyz/docs/rules/no-create-ref
3687
3657
  */
3688
3658
  'react/no-create-ref'?: Linter.RuleEntry<[]>;
3689
- /**
3690
- * Disallows the 'defaultProps' property in favor of ES6 default parameters.
3691
- * @see https://eslint-react.xyz/docs/rules/no-default-props
3692
- */
3693
- 'react/no-default-props'?: Linter.RuleEntry<[]>;
3694
3659
  /**
3695
3660
  * Disallows direct mutation of 'this.state'.
3696
3661
  * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
@@ -3701,22 +3666,26 @@ interface RuleOptions {
3701
3666
  * @see https://eslint-react.xyz/docs/rules/no-duplicate-key
3702
3667
  */
3703
3668
  'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
3704
- /**
3705
- * Disallows certain props on components.
3706
- * @see https://eslint-react.xyz/docs/rules/no-forbidden-props
3707
- * @deprecated
3708
- */
3709
- 'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>;
3710
3669
  /**
3711
3670
  * Replaces usage of 'forwardRef' with passing 'ref' as a prop.
3712
3671
  * @see https://eslint-react.xyz/docs/rules/no-forward-ref
3713
3672
  */
3714
3673
  'react/no-forward-ref'?: Linter.RuleEntry<[]>;
3674
+ /**
3675
+ * Prevents implicitly passing the 'children' prop to components.
3676
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-children
3677
+ */
3678
+ 'react/no-implicit-children'?: Linter.RuleEntry<[]>;
3715
3679
  /**
3716
3680
  * Prevents implicitly passing the 'key' prop to components.
3717
3681
  * @see https://eslint-react.xyz/docs/rules/no-implicit-key
3718
3682
  */
3719
3683
  'react/no-implicit-key'?: Linter.RuleEntry<[]>;
3684
+ /**
3685
+ * Prevents implicitly passing the 'ref' prop to components.
3686
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-ref
3687
+ */
3688
+ 'react/no-implicit-ref'?: Linter.RuleEntry<[]>;
3720
3689
  /**
3721
3690
  * Prevents problematic leaked values from being rendered.
3722
3691
  * @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
@@ -3752,11 +3721,6 @@ interface RuleOptions {
3752
3721
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3753
3722
  */
3754
3723
  'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3755
- /**
3756
- * Disallows 'propTypes' in favor of TypeScript or another type-checking solution.
3757
- * @see https://eslint-react.xyz/docs/rules/no-prop-types
3758
- */
3759
- 'react/no-prop-types'?: Linter.RuleEntry<[]>;
3760
3724
  /**
3761
3725
  * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
3762
3726
  * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
@@ -3777,16 +3741,6 @@ interface RuleOptions {
3777
3741
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3778
3742
  */
3779
3743
  'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
3780
- /**
3781
- * Replaces string refs with callback refs.
3782
- * @see https://eslint-react.xyz/docs/rules/no-string-refs
3783
- */
3784
- 'react/no-string-refs'?: Linter.RuleEntry<[]>;
3785
- /**
3786
- * Disallows unnecessary 'key' props on nested child elements when rendering lists.
3787
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
3788
- */
3789
- 'react/no-unnecessary-key'?: Linter.RuleEntry<[]>;
3790
3744
  /**
3791
3745
  * Disallows unnecessary usage of 'useCallback'.
3792
3746
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
@@ -3802,11 +3756,6 @@ interface RuleOptions {
3802
3756
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
3803
3757
  */
3804
3758
  'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
3805
- /**
3806
- * Disallows unnecessary usage of 'useRef'.
3807
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-ref
3808
- */
3809
- 'react/no-unnecessary-use-ref'?: Linter.RuleEntry<[]>;
3810
3759
  /**
3811
3760
  * Warns about the use of 'UNSAFE_componentWillMount' in class components.
3812
3761
  * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
@@ -3852,11 +3801,6 @@ interface RuleOptions {
3852
3801
  * @see https://eslint-react.xyz/docs/rules/no-use-context
3853
3802
  */
3854
3803
  'react/no-use-context'?: Linter.RuleEntry<[]>;
3855
- /**
3856
- * Disallows useless 'forwardRef' calls on components that don't use 'ref's.
3857
- * @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
3858
- */
3859
- 'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>;
3860
3804
  /**
3861
3805
  * Disallows useless fragment elements.
3862
3806
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
@@ -3873,15 +3817,55 @@ interface RuleOptions {
3873
3817
  */
3874
3818
  'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
3875
3819
  /**
3876
- * Enforces read-only props in components.
3877
- * @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
3820
+ * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
3821
+ * @see https://eslint-react.xyz/docs/rules/purity
3822
+ */
3823
+ 'react/purity'?: Linter.RuleEntry<[]>;
3824
+ /**
3825
+ * Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
3826
+ * @see https://eslint-react.xyz/docs/rules/refs
3827
+ */
3828
+ 'react/refs'?: Linter.RuleEntry<[]>;
3829
+ /**
3830
+ * Enforces the Rules of Hooks.
3831
+ * @see https://react.dev/reference/rules/rules-of-hooks
3832
+ */
3833
+ 'react/rules-of-hooks'?: Linter.RuleEntry<ReactRulesOfHooks>;
3834
+ /**
3835
+ * Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
3836
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-effect
3878
3837
  */
3879
- 'react/prefer-read-only-props'?: Linter.RuleEntry<[]>;
3838
+ 'react/set-state-in-effect'?: Linter.RuleEntry<[]>;
3880
3839
  /**
3881
- * Enforces wrapping function calls made inside 'useState' in an 'initializer function'.
3882
- * @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
3840
+ * Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
3841
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-render
3883
3842
  */
3884
- 'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>;
3843
+ 'react/set-state-in-render'?: Linter.RuleEntry<[]>;
3844
+ /**
3845
+ * Enforces the Rules of Props.
3846
+ * @see https://eslint-react.xyz/docs/rules/unstable-rules-of-props
3847
+ */
3848
+ 'react/unstable-rules-of-props'?: Linter.RuleEntry<[]>;
3849
+ /**
3850
+ * Enforces the Rules of State.
3851
+ * @see https://eslint-react.xyz/docs/rules/unstable-rules-of-state
3852
+ */
3853
+ 'react/unstable-rules-of-state'?: Linter.RuleEntry<[]>;
3854
+ /**
3855
+ * Validates against syntax that React Compiler does not support.
3856
+ * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
3857
+ */
3858
+ 'react/unsupported-syntax'?: Linter.RuleEntry<[]>;
3859
+ /**
3860
+ * Validates that 'useMemo' is called with a callback that returns a value.
3861
+ * @see https://eslint-react.xyz/docs/rules/use-memo
3862
+ */
3863
+ 'react/use-memo'?: Linter.RuleEntry<[]>;
3864
+ /**
3865
+ * Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
3866
+ * @see https://eslint-react.xyz/docs/rules/use-state
3867
+ */
3868
+ 'react/use-state'?: Linter.RuleEntry<ReactUseState>;
3885
3869
  /**
3886
3870
  * disallow confusing quantifiers
3887
3871
  * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
@@ -11640,6 +11624,7 @@ type PerfectionistSortArrayIncludes = {
11640
11624
  pattern: string;
11641
11625
  flags?: string;
11642
11626
  } | string));
11627
+ matchesAstSelector?: string;
11643
11628
  };
11644
11629
  partitionByComment?: (boolean | (({
11645
11630
  pattern: string;
@@ -11665,7 +11650,7 @@ type PerfectionistSortArrayIncludes = {
11665
11650
  });
11666
11651
  partitionByNewLine?: boolean;
11667
11652
  }[]; // ----- perfectionist/sort-classes -----
11668
- type PerfectionistSortClasses = [] | [{
11653
+ type PerfectionistSortClasses = {
11669
11654
  fallbackSort?: {
11670
11655
  type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
11671
11656
  order?: ("asc" | "desc");
@@ -11782,6 +11767,16 @@ type PerfectionistSortClasses = [] | [{
11782
11767
  order?: ("asc" | "desc");
11783
11768
  })[];
11784
11769
  newlinesBetween?: ("ignore" | number);
11770
+ useConfigurationIf?: {
11771
+ allNamesMatchPattern?: (({
11772
+ pattern: string;
11773
+ flags?: string;
11774
+ } | string)[] | ({
11775
+ pattern: string;
11776
+ flags?: string;
11777
+ } | string));
11778
+ matchesAstSelector?: string;
11779
+ };
11785
11780
  useExperimentalDependencyDetection?: boolean;
11786
11781
  ignoreCallbackDependenciesPatterns?: (({
11787
11782
  pattern: string;
@@ -11813,7 +11808,7 @@ type PerfectionistSortClasses = [] | [{
11813
11808
  } | string)));
11814
11809
  });
11815
11810
  partitionByNewLine?: boolean;
11816
- }]; // ----- perfectionist/sort-decorators -----
11811
+ }[]; // ----- perfectionist/sort-decorators -----
11817
11812
  type PerfectionistSortDecorators = {
11818
11813
  fallbackSort?: {
11819
11814
  type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
@@ -11912,7 +11907,7 @@ type PerfectionistSortDecorators = {
11912
11907
  });
11913
11908
  partitionByNewLine?: boolean;
11914
11909
  }[]; // ----- perfectionist/sort-enums -----
11915
- type PerfectionistSortEnums = [] | [{
11910
+ type PerfectionistSortEnums = {
11916
11911
  fallbackSort?: {
11917
11912
  type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
11918
11913
  order?: ("asc" | "desc");
@@ -12002,6 +11997,16 @@ type PerfectionistSortEnums = [] | [{
12002
11997
  order?: ("asc" | "desc");
12003
11998
  })[];
12004
11999
  newlinesBetween?: ("ignore" | number);
12000
+ useConfigurationIf?: {
12001
+ allNamesMatchPattern?: (({
12002
+ pattern: string;
12003
+ flags?: string;
12004
+ } | string)[] | ({
12005
+ pattern: string;
12006
+ flags?: string;
12007
+ } | string));
12008
+ matchesAstSelector?: string;
12009
+ };
12005
12010
  sortByValue?: ("always" | "ifNumericEnum" | "never");
12006
12011
  useExperimentalDependencyDetection?: boolean;
12007
12012
  partitionByComment?: (boolean | (({
@@ -12027,7 +12032,7 @@ type PerfectionistSortEnums = [] | [{
12027
12032
  } | string)));
12028
12033
  });
12029
12034
  partitionByNewLine?: boolean;
12030
- }]; // ----- perfectionist/sort-export-attributes -----
12035
+ }[]; // ----- perfectionist/sort-export-attributes -----
12031
12036
  type PerfectionistSortExportAttributes = {
12032
12037
  fallbackSort?: {
12033
12038
  type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
@@ -12097,6 +12102,16 @@ type PerfectionistSortExportAttributes = {
12097
12102
  order?: ("asc" | "desc");
12098
12103
  })[];
12099
12104
  newlinesBetween?: ("ignore" | number);
12105
+ useConfigurationIf?: {
12106
+ allNamesMatchPattern?: (({
12107
+ pattern: string;
12108
+ flags?: string;
12109
+ } | string)[] | ({
12110
+ pattern: string;
12111
+ flags?: string;
12112
+ } | string));
12113
+ matchesAstSelector?: string;
12114
+ };
12100
12115
  partitionByComment?: (boolean | (({
12101
12116
  pattern: string;
12102
12117
  flags?: string;
@@ -12289,6 +12304,16 @@ type PerfectionistSortHeritageClauses = {
12289
12304
  order?: ("asc" | "desc");
12290
12305
  })[];
12291
12306
  newlinesBetween?: ("ignore" | number);
12307
+ useConfigurationIf?: {
12308
+ allNamesMatchPattern?: (({
12309
+ pattern: string;
12310
+ flags?: string;
12311
+ } | string)[] | ({
12312
+ pattern: string;
12313
+ flags?: string;
12314
+ } | string));
12315
+ matchesAstSelector?: string;
12316
+ };
12292
12317
  partitionByNewLine?: boolean;
12293
12318
  partitionByComment?: (boolean | (({
12294
12319
  pattern: string;
@@ -12382,6 +12407,16 @@ type PerfectionistSortImportAttributes = {
12382
12407
  order?: ("asc" | "desc");
12383
12408
  })[];
12384
12409
  newlinesBetween?: ("ignore" | number);
12410
+ useConfigurationIf?: {
12411
+ allNamesMatchPattern?: (({
12412
+ pattern: string;
12413
+ flags?: string;
12414
+ } | string)[] | ({
12415
+ pattern: string;
12416
+ flags?: string;
12417
+ } | string));
12418
+ matchesAstSelector?: string;
12419
+ };
12385
12420
  partitionByComment?: (boolean | (({
12386
12421
  pattern: string;
12387
12422
  flags?: string;
@@ -12650,6 +12685,7 @@ type PerfectionistSortInterfaces = {
12650
12685
  pattern: string;
12651
12686
  flags?: string;
12652
12687
  } | string));
12688
+ matchesAstSelector?: string;
12653
12689
  declarationMatchesPattern?: (({
12654
12690
  scope?: ("shallow" | "deep");
12655
12691
  pattern: string;
@@ -12756,6 +12792,16 @@ type PerfectionistSortIntersectionTypes = {
12756
12792
  order?: ("asc" | "desc");
12757
12793
  })[];
12758
12794
  newlinesBetween?: ("ignore" | number);
12795
+ useConfigurationIf?: {
12796
+ allNamesMatchPattern?: (({
12797
+ pattern: string;
12798
+ flags?: string;
12799
+ } | string)[] | ({
12800
+ pattern: string;
12801
+ flags?: string;
12802
+ } | string));
12803
+ matchesAstSelector?: string;
12804
+ };
12759
12805
  partitionByComment?: (boolean | (({
12760
12806
  pattern: string;
12761
12807
  flags?: string;
@@ -12884,6 +12930,7 @@ type PerfectionistSortJsxProps = {
12884
12930
  pattern: string;
12885
12931
  flags?: string;
12886
12932
  } | string));
12933
+ matchesAstSelector?: string;
12887
12934
  tagMatchesPattern?: (({
12888
12935
  pattern: string;
12889
12936
  flags?: string;
@@ -12971,6 +13018,7 @@ type PerfectionistSortMaps = {
12971
13018
  pattern: string;
12972
13019
  flags?: string;
12973
13020
  } | string));
13021
+ matchesAstSelector?: string;
12974
13022
  };
12975
13023
  partitionByComment?: (boolean | (({
12976
13024
  pattern: string;
@@ -13192,6 +13240,16 @@ type PerfectionistSortNamedExports = {
13192
13240
  order?: ("asc" | "desc");
13193
13241
  })[];
13194
13242
  newlinesBetween?: ("ignore" | number);
13243
+ useConfigurationIf?: {
13244
+ allNamesMatchPattern?: (({
13245
+ pattern: string;
13246
+ flags?: string;
13247
+ } | string)[] | ({
13248
+ pattern: string;
13249
+ flags?: string;
13250
+ } | string));
13251
+ matchesAstSelector?: string;
13252
+ };
13195
13253
  ignoreAlias?: boolean;
13196
13254
  partitionByComment?: (boolean | (({
13197
13255
  pattern: string;
@@ -13292,6 +13350,16 @@ type PerfectionistSortNamedImports = {
13292
13350
  order?: ("asc" | "desc");
13293
13351
  })[];
13294
13352
  newlinesBetween?: ("ignore" | number);
13353
+ useConfigurationIf?: {
13354
+ allNamesMatchPattern?: (({
13355
+ pattern: string;
13356
+ flags?: string;
13357
+ } | string)[] | ({
13358
+ pattern: string;
13359
+ flags?: string;
13360
+ } | string));
13361
+ matchesAstSelector?: string;
13362
+ };
13295
13363
  ignoreAlias?: boolean;
13296
13364
  partitionByComment?: (boolean | (({
13297
13365
  pattern: string;
@@ -13439,6 +13507,7 @@ type PerfectionistSortObjectTypes = {
13439
13507
  pattern: string;
13440
13508
  flags?: string;
13441
13509
  } | string));
13510
+ matchesAstSelector?: string;
13442
13511
  declarationMatchesPattern?: (({
13443
13512
  scope?: ("shallow" | "deep");
13444
13513
  pattern: string;
@@ -13605,6 +13674,7 @@ type PerfectionistSortObjects = {
13605
13674
  pattern: string;
13606
13675
  flags?: string;
13607
13676
  } | string));
13677
+ matchesAstSelector?: string;
13608
13678
  declarationMatchesPattern?: (({
13609
13679
  scope?: ("shallow" | "deep");
13610
13680
  pattern: string;
@@ -13615,6 +13685,7 @@ type PerfectionistSortObjects = {
13615
13685
  flags?: string;
13616
13686
  } | string));
13617
13687
  };
13688
+ partitionByComputedKey?: boolean;
13618
13689
  styledComponents?: boolean;
13619
13690
  useExperimentalDependencyDetection?: boolean;
13620
13691
  partitionByComment?: (boolean | (({
@@ -13721,6 +13792,7 @@ type PerfectionistSortSets = {
13721
13792
  pattern: string;
13722
13793
  flags?: string;
13723
13794
  } | string));
13795
+ matchesAstSelector?: string;
13724
13796
  };
13725
13797
  partitionByComment?: (boolean | (({
13726
13798
  pattern: string;
@@ -13830,6 +13902,16 @@ type PerfectionistSortUnionTypes = {
13830
13902
  order?: ("asc" | "desc");
13831
13903
  })[];
13832
13904
  newlinesBetween?: ("ignore" | number);
13905
+ useConfigurationIf?: {
13906
+ allNamesMatchPattern?: (({
13907
+ pattern: string;
13908
+ flags?: string;
13909
+ } | string)[] | ({
13910
+ pattern: string;
13911
+ flags?: string;
13912
+ } | string));
13913
+ matchesAstSelector?: string;
13914
+ };
13833
13915
  partitionByComment?: (boolean | (({
13834
13916
  pattern: string;
13835
13917
  flags?: string;
@@ -13854,7 +13936,7 @@ type PerfectionistSortUnionTypes = {
13854
13936
  });
13855
13937
  partitionByNewLine?: boolean;
13856
13938
  }[]; // ----- perfectionist/sort-variable-declarations -----
13857
- type PerfectionistSortVariableDeclarations = [] | [{
13939
+ type PerfectionistSortVariableDeclarations = {
13858
13940
  fallbackSort?: {
13859
13941
  type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
13860
13942
  order?: ("asc" | "desc");
@@ -13926,6 +14008,16 @@ type PerfectionistSortVariableDeclarations = [] | [{
13926
14008
  order?: ("asc" | "desc");
13927
14009
  })[];
13928
14010
  newlinesBetween?: ("ignore" | number);
14011
+ useConfigurationIf?: {
14012
+ allNamesMatchPattern?: (({
14013
+ pattern: string;
14014
+ flags?: string;
14015
+ } | string)[] | ({
14016
+ pattern: string;
14017
+ flags?: string;
14018
+ } | string));
14019
+ matchesAstSelector?: string;
14020
+ };
13929
14021
  useExperimentalDependencyDetection?: boolean;
13930
14022
  partitionByComment?: (boolean | (({
13931
14023
  pattern: string;
@@ -13950,7 +14042,7 @@ type PerfectionistSortVariableDeclarations = [] | [{
13950
14042
  } | string)));
13951
14043
  });
13952
14044
  partitionByNewLine?: boolean;
13953
- }]; // ----- pnpm/json-enforce-catalog -----
14045
+ }[]; // ----- pnpm/json-enforce-catalog -----
13954
14046
  type PnpmJsonEnforceCatalog = [] | [{
13955
14047
  allowedProtocols?: string[];
13956
14048
  autofix?: boolean;
@@ -14132,49 +14224,35 @@ type ReactHooksUseMemo = [] | [{
14132
14224
  }]; // ----- react-hooks/void-use-memo -----
14133
14225
  type ReactHooksVoidUseMemo = [] | [{
14134
14226
  [k: string]: unknown | undefined;
14135
- }]; // ----- react-naming-convention/component-name -----
14136
- type ReactNamingConventionComponentName = [] | [(("PascalCase" | "CONSTANT_CASE") | {
14137
- allowAllCaps?: boolean;
14138
- excepts?: string[];
14139
- rule?: ("PascalCase" | "CONSTANT_CASE");
14140
- })]; // ----- react-naming-convention/filename -----
14141
- type ReactNamingConventionFilename = [] | [(("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | {
14142
- excepts?: string[];
14143
- extensions?: string[];
14144
- rule?: ("PascalCase" | "camelCase" | "kebab-case" | "snake_case");
14145
- })]; // ----- react-naming-convention/filename-extension -----
14146
- type ReactNamingConventionFilenameExtension = [] | [(("always" | "as-needed") | {
14147
- allow?: ("always" | "as-needed");
14148
- extensions?: string[];
14149
- ignoreFilesWithoutCode?: boolean;
14150
- })]; // ----- react-naming-convention/use-state -----
14151
- type ReactNamingConventionUseState = [] | [{
14152
- enforceAssignment?: boolean;
14153
- enforceSetterName?: boolean;
14154
14227
  }]; // ----- react-refresh/only-export-components -----
14155
14228
  type ReactRefreshOnlyExportComponents = [] | [{
14156
14229
  extraHOCs?: string[];
14157
14230
  allowExportNames?: string[];
14158
14231
  allowConstantExport?: boolean;
14159
14232
  checkJS?: boolean;
14233
+ }]; // ----- react/exhaustive-deps -----
14234
+ type ReactExhaustiveDeps = [] | [{
14235
+ additionalHooks?: string;
14236
+ enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
14237
+ experimental_autoDependenciesHooks?: string[];
14238
+ requireExplicitEffectDeps?: boolean;
14160
14239
  }]; // ----- react/jsx-shorthand-boolean -----
14161
14240
  type ReactJsxShorthandBoolean = [] | [(-1 | 1)]; // ----- react/jsx-shorthand-fragment -----
14162
- type ReactJsxShorthandFragment = [] | [(-1 | 1)]; // ----- react/no-forbidden-props -----
14163
- type ReactNoForbiddenProps = [] | [{
14164
- forbid?: (string | {
14165
- excludedNodes?: string[];
14166
- prop: string;
14167
- } | {
14168
- includedNodes?: string[];
14169
- prop: string;
14170
- })[];
14171
- }]; // ----- react/no-unstable-default-props -----
14241
+ type ReactJsxShorthandFragment = [] | [(-1 | 1)]; // ----- react/no-unstable-default-props -----
14172
14242
  type ReactNoUnstableDefaultProps = [] | [{
14173
14243
  safeDefaultProps?: string[];
14174
14244
  }]; // ----- react/no-useless-fragment -----
14175
14245
  type ReactNoUselessFragment = [] | [{
14176
14246
  allowEmptyFragment?: boolean;
14177
14247
  allowExpressions?: boolean;
14248
+ }]; // ----- react/rules-of-hooks -----
14249
+ type ReactRulesOfHooks = [] | [{
14250
+ additionalHooks?: string;
14251
+ }]; // ----- react/use-state -----
14252
+ type ReactUseState = [] | [{
14253
+ enforceAssignment?: boolean;
14254
+ enforceLazyInitialization?: boolean;
14255
+ enforceSetterName?: boolean;
14178
14256
  }]; // ----- regexp/hexadecimal-escape -----
14179
14257
  type RegexpHexadecimalEscape = [] | [("always" | "never")]; // ----- regexp/letter-case -----
14180
14258
  type RegexpLetterCase = [] | [{
@@ -14380,7 +14458,6 @@ type StorybookMetaInlineProperties = [] | [{
14380
14458
  type StorybookNoUninstalledAddons = [] | [{
14381
14459
  packageJsonLocation?: string;
14382
14460
  ignore?: string[];
14383
- [k: string]: unknown | undefined;
14384
14461
  }]; // ----- strict -----
14385
14462
  type Strict = [] | [("never" | "global" | "function" | "safe")]; // ----- style/array-bracket-newline -----
14386
14463
  type StyleArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
@@ -16704,6 +16781,18 @@ type TsPreferOptionalChain = [] | [{
16704
16781
  requireNullish?: boolean;
16705
16782
  }]; // ----- ts/prefer-promise-reject-errors -----
16706
16783
  type TsPreferPromiseRejectErrors = [] | [{
16784
+ allow?: (string | {
16785
+ from: "file";
16786
+ name: (string | [string, ...(string)[]]);
16787
+ path?: string;
16788
+ } | {
16789
+ from: "lib";
16790
+ name: (string | [string, ...(string)[]]);
16791
+ } | {
16792
+ from: "package";
16793
+ name: (string | [string, ...(string)[]]);
16794
+ package: string;
16795
+ })[];
16707
16796
  allowEmptyReject?: boolean;
16708
16797
  allowThrowingAny?: boolean;
16709
16798
  allowThrowingUnknown?: boolean;
package/dist/index.js CHANGED
@@ -572,8 +572,6 @@ async function stylistic(options = {}) {
572
572
  quotes,
573
573
  { avoidEscape: true }
574
574
  ],
575
- "style/spaced-comment": ["error", "always"],
576
- "style/space-in-parens": ["error", "always"],
577
575
  "style/rest-spread-spacing": ["error", "never"],
578
576
  "style/space-before-blocks": ["error", "always"],
579
577
  "style/space-before-function-paren": ["error", {
@@ -582,11 +580,13 @@ async function stylistic(options = {}) {
582
580
  "catch": "never",
583
581
  "named": "never"
584
582
  }],
583
+ "style/space-in-parens": ["error", "always"],
585
584
  "style/space-infix-ops": ["error", { int32Hint: false }],
586
585
  "style/space-unary-ops": ["error", {
587
586
  nonwords: false,
588
587
  words: true
589
588
  }],
589
+ "style/spaced-comment": ["error", "always"],
590
590
  "style/switch-colon-spacing": ["error", {
591
591
  after: true,
592
592
  before: false
@@ -946,12 +946,12 @@ async function javascript(options = {}) {
946
946
  "no-restricted-syntax": [
947
947
  "error",
948
948
  {
949
- selector: "TSEnumDeclaration[const=true]",
950
- message: "Unexpected enum declaration"
949
+ message: "Unexpected enum declaration",
950
+ selector: "TSEnumDeclaration[const=true]"
951
951
  },
952
952
  {
953
- selector: "TSExportAssignment",
954
- message: "Unexpected export assignment"
953
+ message: "Unexpected export assignment",
954
+ selector: "TSExportAssignment"
955
955
  }
956
956
  ],
957
957
  "no-self-assign": ["error", { props: true }],
@@ -1049,7 +1049,7 @@ async function javascript(options = {}) {
1049
1049
  * @returns {Promise<TypedFlatConfigItem[]>} The JSDoc configuration.
1050
1050
  */
1051
1051
  async function jsdoc(options = {}) {
1052
- const { stylistic = true, overrides = {}, type = "app" } = options;
1052
+ const { overrides = {}, stylistic = true, type = "app" } = options;
1053
1053
  const pluginJSDoc = await interopDefault(import("eslint-plugin-jsdoc"));
1054
1054
  return [{
1055
1055
  name: "config/jsdoc/rules",
@@ -1490,16 +1490,6 @@ async function perfectionist() {
1490
1490
  specialCharacters: "keep",
1491
1491
  type: "alphabetical"
1492
1492
  }],
1493
- "perfectionist/sort-interfaces": ["error", {
1494
- fallbackSort: { type: "unsorted" },
1495
- newlinesBetween: "ignore",
1496
- order: "asc",
1497
- partitionByComment: true,
1498
- partitionByNewLine: true,
1499
- specialCharacters: "keep",
1500
- type: "alphabetical"
1501
- }],
1502
- "perfectionist/sort-intersection-types": "off",
1503
1493
  "perfectionist/sort-exports": ["error", {
1504
1494
  fallbackSort: { type: "unsorted" },
1505
1495
  newlinesBetween: "ignore",
@@ -1535,6 +1525,16 @@ async function perfectionist() {
1535
1525
  order: "asc",
1536
1526
  type: "alphabetical"
1537
1527
  }],
1528
+ "perfectionist/sort-interfaces": ["error", {
1529
+ fallbackSort: { type: "unsorted" },
1530
+ newlinesBetween: "ignore",
1531
+ order: "asc",
1532
+ partitionByComment: true,
1533
+ partitionByNewLine: true,
1534
+ specialCharacters: "keep",
1535
+ type: "alphabetical"
1536
+ }],
1537
+ "perfectionist/sort-intersection-types": "off",
1538
1538
  "perfectionist/sort-named-exports": ["error", {
1539
1539
  fallbackSort: { type: "unsorted" },
1540
1540
  newlinesBetween: "ignore",
@@ -1562,7 +1562,15 @@ async function perfectionist() {
1562
1562
  specialCharacters: "keep",
1563
1563
  type: "alphabetical"
1564
1564
  }],
1565
- "perfectionist/sort-objects": "off",
1565
+ "perfectionist/sort-objects": ["error", {
1566
+ fallbackSort: { type: "unsorted" },
1567
+ newlinesBetween: "ignore",
1568
+ order: "asc",
1569
+ partitionByComment: true,
1570
+ partitionByNewLine: true,
1571
+ specialCharacters: "keep",
1572
+ type: "alphabetical"
1573
+ }],
1566
1574
  "perfectionist/sort-sets": ["error", {
1567
1575
  fallbackSort: { type: "unsorted" },
1568
1576
  newlinesBetween: "ignore",
@@ -1744,7 +1752,7 @@ const ReactRouterPackages = [
1744
1752
  const NextJsPackages = ["next"];
1745
1753
  const ReactCompilerPackages = ["babel-plugin-react-compiler"];
1746
1754
  async function react(options = {}) {
1747
- const { files = [GLOB_SRC], filesTypeAware = [GLOB_TS, GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], overrides = {}, tsconfigPath, reactCompiler = ReactCompilerPackages.some((i) => isPackageExists(i)) } = options;
1755
+ const { files = [GLOB_SRC], filesTypeAware = [GLOB_TS, GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], overrides = {}, reactCompiler = ReactCompilerPackages.some((i) => isPackageExists(i)), tsconfigPath } = options;
1748
1756
  await ensurePackages([
1749
1757
  "@eslint-react/eslint-plugin",
1750
1758
  "eslint-plugin-react-hooks",
@@ -1752,8 +1760,8 @@ async function react(options = {}) {
1752
1760
  ]);
1753
1761
  const isTypeAware = !!tsconfigPath;
1754
1762
  const typeAwareRules = {
1755
- "react/no-leaked-conditional-rendering": "warn",
1756
- "react/no-implicit-key": "error"
1763
+ "react/no-implicit-key": "error",
1764
+ "react/no-leaked-conditional-rendering": "warn"
1757
1765
  };
1758
1766
  const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all([
1759
1767
  interopDefault(import("@eslint-react/eslint-plugin")),
@@ -1765,6 +1773,7 @@ async function react(options = {}) {
1765
1773
  const isUsingReactRouter = ReactRouterPackages.some((i) => isPackageExists(i));
1766
1774
  const isUsingNext = NextJsPackages.some((i) => isPackageExists(i));
1767
1775
  const plugins = pluginReact.configs.all.plugins;
1776
+ const pluginReactHooksExtra = plugins["@eslint-react/hooks-extra"];
1768
1777
  return [
1769
1778
  {
1770
1779
  name: "config/react/setup",
@@ -1772,7 +1781,7 @@ async function react(options = {}) {
1772
1781
  "react": plugins["@eslint-react"],
1773
1782
  "react-dom": plugins["@eslint-react/dom"],
1774
1783
  "react-hooks": pluginReactHooks,
1775
- "react-hooks-extra": plugins["@eslint-react/hooks-extra"],
1784
+ ...pluginReactHooksExtra ? { "react-hooks-extra": pluginReactHooksExtra } : {},
1776
1785
  "react-naming-convention": plugins["@eslint-react/naming-convention"],
1777
1786
  "react-refresh": pluginReactRefresh,
1778
1787
  "react-rsc": plugins["@eslint-react/rsc"],
@@ -1839,7 +1848,7 @@ async function react(options = {}) {
1839
1848
  "react-dom/no-unsafe-iframe-sandbox": "warn",
1840
1849
  "react-dom/no-use-form-state": "error",
1841
1850
  "react-dom/no-void-elements-with-children": "error",
1842
- "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
1851
+ ...pluginReactHooksExtra ? { "react-hooks-extra/no-direct-set-state-in-use-effect": "warn" } : {},
1843
1852
  "react-naming-convention/context-name": "warn",
1844
1853
  "react-naming-convention/ref-name": "warn",
1845
1854
  "react-naming-convention/use-state": "warn",
@@ -1847,15 +1856,16 @@ async function react(options = {}) {
1847
1856
  "react-web-api/no-leaked-interval": "warn",
1848
1857
  "react-web-api/no-leaked-resize-observer": "warn",
1849
1858
  "react-web-api/no-leaked-timeout": "warn",
1850
- "react-hooks/rules-of-hooks": "error",
1851
1859
  "react-hooks/exhaustive-deps": "warn",
1860
+ "react-hooks/rules-of-hooks": "error",
1852
1861
  ...reactCompiler ? {
1862
+ "react-hooks/component-hook-factories": "error",
1853
1863
  "react-hooks/config": "error",
1854
1864
  "react-hooks/error-boundaries": "error",
1855
- "react-hooks/component-hook-factories": "error",
1856
1865
  "react-hooks/gating": "error",
1857
1866
  "react-hooks/globals": "error",
1858
1867
  "react-hooks/immutability": "error",
1868
+ "react-hooks/incompatible-library": "warn",
1859
1869
  "react-hooks/preserve-manual-memoization": "error",
1860
1870
  "react-hooks/purity": "error",
1861
1871
  "react-hooks/refs": "error",
@@ -1863,8 +1873,7 @@ async function react(options = {}) {
1863
1873
  "react-hooks/set-state-in-render": "error",
1864
1874
  "react-hooks/static-components": "error",
1865
1875
  "react-hooks/unsupported-syntax": "warn",
1866
- "react-hooks/use-memo": "error",
1867
- "react-hooks/incompatible-library": "warn"
1876
+ "react-hooks/use-memo": "error"
1868
1877
  } : {},
1869
1878
  "react-refresh/only-export-components": ["error", {
1870
1879
  allowConstantExport: isAllowConstantExport,
@@ -2414,15 +2423,15 @@ async function tailwindcss(options = {}) {
2414
2423
  ...isUsingEntryPoint ? {
2415
2424
  "tailwindcss/no-conflicting-classes": ["error", { entryPoint: resolvedEntryPointPath }],
2416
2425
  "tailwindcss/no-deprecated-classes": ["error", { entryPoint: resolvedEntryPointPath }],
2417
- "tailwindcss/no-unknown-classes": "off",
2418
2426
  "tailwindcss/enforce-canonical-classes": ["error", { entryPoint: resolvedEntryPointPath }],
2419
- "tailwindcss/enforce-consistent-class-order": ["error", { entryPoint: resolvedEntryPointPath }]
2427
+ "tailwindcss/enforce-consistent-class-order": ["error", { entryPoint: resolvedEntryPointPath }],
2428
+ "tailwindcss/no-unknown-classes": "off"
2420
2429
  } : {
2430
+ "tailwindcss/enforce-canonical-classes": "off",
2431
+ "tailwindcss/enforce-consistent-class-order": "off",
2421
2432
  "tailwindcss/no-conflicting-classes": "off",
2422
2433
  "tailwindcss/no-deprecated-classes": "off",
2423
- "tailwindcss/no-unknown-classes": "off",
2424
- "tailwindcss/enforce-canonical-classes": "off",
2425
- "tailwindcss/enforce-consistent-class-order": "off"
2434
+ "tailwindcss/no-unknown-classes": "off"
2426
2435
  },
2427
2436
  ...overrides
2428
2437
  }
@@ -3156,8 +3165,8 @@ function config(options = {}, ...userConfigs) {
3156
3165
  if (enableUnicorn) configs.push(unicorn(enableUnicorn === true ? {} : enableUnicorn));
3157
3166
  if (enableVue) componentExts.push("vue");
3158
3167
  if (enableJSDoc) configs.push(jsdoc({
3159
- stylistic: stylisticOptions,
3160
3168
  overrides: getOverrides(options, "jsdoc"),
3169
+ stylistic: stylisticOptions,
3161
3170
  type: options.type
3162
3171
  }));
3163
3172
  if (enableJsx) configs.push(jsx(enableJsx === true ? {} : enableJsx));
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.24.0",
4
+ "version": "1.25.0",
5
5
  "type": "module",
6
6
  "author": "Inferno Design <support@infernodesign.com>",
7
7
  "license": "MIT",
@@ -55,25 +55,25 @@
55
55
  "@eslint/config-helpers": "0.5.3",
56
56
  "@eslint/markdown": "7.5.1",
57
57
  "@stylistic/eslint-plugin": "5.10.0",
58
- "@typescript-eslint/eslint-plugin": "8.56.1",
59
- "@typescript-eslint/parser": "8.56.1",
60
- "@typescript-eslint/utils": "8.56.1",
61
- "@vitest/eslint-plugin": "1.6.9",
58
+ "@typescript-eslint/eslint-plugin": "8.57.1",
59
+ "@typescript-eslint/parser": "8.57.1",
60
+ "@typescript-eslint/utils": "8.57.1",
61
+ "@vitest/eslint-plugin": "1.6.12",
62
62
  "ansis": "4.2.0",
63
63
  "cac": "7.0.0",
64
64
  "eslint-config-flat-gitignore": "2.2.1",
65
- "eslint-flat-config-utils": "3.0.1",
65
+ "eslint-flat-config-utils": "3.0.2",
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
- "eslint-plugin-import-lite": "0.5.2",
70
- "eslint-plugin-jsdoc": "62.7.1",
71
- "eslint-plugin-jsonc": "3.1.1",
69
+ "eslint-plugin-import-lite": "0.6.0",
70
+ "eslint-plugin-jsdoc": "62.8.0",
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.6.0",
74
+ "eslint-plugin-perfectionist": "5.7.0",
75
75
  "eslint-plugin-pnpm": "1.6.0",
76
- "eslint-plugin-regexp": "3.0.0",
76
+ "eslint-plugin-regexp": "3.1.0",
77
77
  "eslint-plugin-toml": "1.3.1",
78
78
  "eslint-plugin-unicorn": "63.0.0",
79
79
  "eslint-plugin-unused-imports": "4.4.1",
@@ -89,16 +89,16 @@
89
89
  "yaml-eslint-parser": "2.0.0"
90
90
  },
91
91
  "devDependencies": {
92
- "@eslint-react/eslint-plugin": "2.13.0",
92
+ "@eslint-react/eslint-plugin": "3.0.0",
93
93
  "@eslint/config-inspector": "1.5.0",
94
94
  "@infernodesign/typescript-config": "workspace:*",
95
- "@next/eslint-plugin-next": "16.1.6",
95
+ "@next/eslint-plugin-next": "16.2.0",
96
96
  "@prettier/plugin-xml": "3.4.2",
97
97
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
98
- "@types/node": "25.3.5",
99
- "@unocss/eslint-plugin": "66.6.6",
98
+ "@types/node": "25.5.0",
99
+ "@unocss/eslint-plugin": "66.6.7",
100
100
  "astro-eslint-parser": "1.3.0",
101
- "eslint": "10.0.3",
101
+ "eslint": "10.1.0",
102
102
  "eslint-plugin-astro": "1.6.0",
103
103
  "eslint-plugin-better-tailwindcss": "4.3.2",
104
104
  "eslint-plugin-erasable-syntax-only": "0.4.0",
@@ -107,8 +107,8 @@
107
107
  "eslint-plugin-react-hooks": "7.0.1",
108
108
  "eslint-plugin-react-refresh": "0.5.2",
109
109
  "eslint-plugin-solid": "0.14.5",
110
- "eslint-plugin-storybook": "10.2.16",
111
- "eslint-plugin-svelte": "3.15.0",
110
+ "eslint-plugin-storybook": "10.3.1",
111
+ "eslint-plugin-svelte": "3.15.2",
112
112
  "eslint-plugin-vuejs-accessibility": "2.5.0",
113
113
  "eslint-typegen": "2.3.1",
114
114
  "execa": "9.6.1",
@@ -117,21 +117,21 @@
117
117
  "pnpm-workspace-yaml": "1.6.0",
118
118
  "prettier-plugin-astro": "0.14.1",
119
119
  "prettier-plugin-slidev": "1.0.5",
120
- "svelte": "5.53.7",
120
+ "svelte": "5.54.0",
121
121
  "svelte-eslint-parser": "1.6.0",
122
122
  "tinyglobby": "0.2.15",
123
- "tsdown": "0.21.0",
123
+ "tsdown": "0.21.4",
124
124
  "typescript": "5.9.3",
125
- "vitest": "4.0.18",
126
- "vue": "3.5.29"
125
+ "vitest": "4.1.0",
126
+ "vue": "3.5.30"
127
127
  },
128
128
  "peerDependencies": {
129
- "@eslint-react/eslint-plugin": "^2.13.0",
130
- "@next/eslint-plugin-next": "^16.1.6",
129
+ "@eslint-react/eslint-plugin": "^3.0.0",
130
+ "@next/eslint-plugin-next": "^16.2.0",
131
131
  "@prettier/plugin-xml": "^3.4.2",
132
- "@unocss/eslint-plugin": "^66.6.6",
132
+ "@unocss/eslint-plugin": "^66.6.7",
133
133
  "astro-eslint-parser": "^1.3.0",
134
- "eslint": "^10.0.3",
134
+ "eslint": "^10.1.0",
135
135
  "eslint-plugin-astro": "^1.6.0",
136
136
  "eslint-plugin-better-tailwindcss": "^4.3.2",
137
137
  "eslint-plugin-erasable-syntax-only": "^0.4.0",
@@ -140,8 +140,8 @@
140
140
  "eslint-plugin-react-hooks": "^7.0.1",
141
141
  "eslint-plugin-react-refresh": "^0.5.2",
142
142
  "eslint-plugin-solid": "^0.14.5",
143
- "eslint-plugin-storybook": "^10.2.16",
144
- "eslint-plugin-svelte": "^3.15.0",
143
+ "eslint-plugin-storybook": "^10.3.1",
144
+ "eslint-plugin-svelte": "^3.15.2",
145
145
  "eslint-plugin-vuejs-accessibility": "^2.5.0",
146
146
  "prettier-plugin-astro": "^0.14.1",
147
147
  "prettier-plugin-slidev": "^1.0.5",