@2digits/eslint-config 2.7.6 → 2.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -2680,12 +2680,17 @@ Backward pagination arguments
2680
2680
  * disallow unnecessary fragments
2681
2681
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
2682
2682
  */
2683
- 'react-extra/no-useless-fragment'?: Linter.RuleEntry<[]>
2683
+ 'react-extra/no-useless-fragment'?: Linter.RuleEntry<ReactExtraNoUselessFragment>
2684
2684
  /**
2685
2685
  * enforce using destructuring assignment in component props and context
2686
2686
  * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
2687
2687
  */
2688
2688
  'react-extra/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
2689
+ /**
2690
+ * enforce React is imported via a namespace import
2691
+ * @see https://eslint-react.xyz/docs/rules/prefer-react-namespace-import
2692
+ */
2693
+ 'react-extra/prefer-react-namespace-import'?: Linter.RuleEntry<[]>
2689
2694
  /**
2690
2695
  * enforce read-only props in components
2691
2696
  * @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
@@ -2717,8 +2722,8 @@ Backward pagination arguments
2717
2722
  */
2718
2723
  'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
2719
2724
  /**
2720
- * disallow direct calls to the 'set' function of 'useState' in 'useEffect'
2721
- * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
2725
+ * disallow direct calls to the 'set' function of 'useState' in 'useLayoutEffect'
2726
+ * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
2722
2727
  */
2723
2728
  'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
2724
2729
  /**
@@ -7365,6 +7370,10 @@ type Radix = []|[("always" | "as-needed")]
7365
7370
  type ReactCompilerReactCompiler = []|[{
7366
7371
  [k: string]: unknown | undefined
7367
7372
  }]
7373
+ // ----- react-extra/no-useless-fragment -----
7374
+ type ReactExtraNoUselessFragment = []|[{
7375
+ allowExpressions?: boolean
7376
+ }]
7368
7377
  // ----- react-hooks/exhaustive-deps -----
7369
7378
  type ReactHooksExhaustiveDeps = []|[{
7370
7379
  additionalHooks?: string
package/dist/index.d.ts CHANGED
@@ -2680,12 +2680,17 @@ Backward pagination arguments
2680
2680
  * disallow unnecessary fragments
2681
2681
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
2682
2682
  */
2683
- 'react-extra/no-useless-fragment'?: Linter.RuleEntry<[]>
2683
+ 'react-extra/no-useless-fragment'?: Linter.RuleEntry<ReactExtraNoUselessFragment>
2684
2684
  /**
2685
2685
  * enforce using destructuring assignment in component props and context
2686
2686
  * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
2687
2687
  */
2688
2688
  'react-extra/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
2689
+ /**
2690
+ * enforce React is imported via a namespace import
2691
+ * @see https://eslint-react.xyz/docs/rules/prefer-react-namespace-import
2692
+ */
2693
+ 'react-extra/prefer-react-namespace-import'?: Linter.RuleEntry<[]>
2689
2694
  /**
2690
2695
  * enforce read-only props in components
2691
2696
  * @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
@@ -2717,8 +2722,8 @@ Backward pagination arguments
2717
2722
  */
2718
2723
  'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
2719
2724
  /**
2720
- * disallow direct calls to the 'set' function of 'useState' in 'useEffect'
2721
- * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
2725
+ * disallow direct calls to the 'set' function of 'useState' in 'useLayoutEffect'
2726
+ * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
2722
2727
  */
2723
2728
  'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
2724
2729
  /**
@@ -7365,6 +7370,10 @@ type Radix = []|[("always" | "as-needed")]
7365
7370
  type ReactCompilerReactCompiler = []|[{
7366
7371
  [k: string]: unknown | undefined
7367
7372
  }]
7373
+ // ----- react-extra/no-useless-fragment -----
7374
+ type ReactExtraNoUselessFragment = []|[{
7375
+ allowExpressions?: boolean
7376
+ }]
7368
7377
  // ----- react-hooks/exhaustive-deps -----
7369
7378
  type ReactHooksExhaustiveDeps = []|[{
7370
7379
  additionalHooks?: string
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
3
  "description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
4
- "version": "2.7.6",
4
+ "version": "2.7.7",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "public": true,
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@eslint-community/eslint-plugin-eslint-comments": "4.4.0",
32
- "@eslint-react/eslint-plugin": "1.14.3",
32
+ "@eslint-react/eslint-plugin": "1.15.0",
33
33
  "@eslint/compat": "1.2.0",
34
34
  "@eslint/js": "9.12.0",
35
35
  "@graphql-eslint/eslint-plugin": "3.20.1",
@@ -39,11 +39,11 @@
39
39
  "eslint-config-flat-gitignore": "0.3.0",
40
40
  "eslint-config-prettier": "9.1.0",
41
41
  "eslint-flat-config-utils": "0.4.0",
42
- "eslint-plugin-jsdoc": "50.3.1",
42
+ "eslint-plugin-jsdoc": "50.3.2",
43
43
  "eslint-plugin-n": "17.11.1",
44
44
  "eslint-plugin-react": "7.37.1",
45
45
  "eslint-plugin-react-compiler": "0.0.0-experimental-f444e11-20240926",
46
- "eslint-plugin-react-hooks": "4.6.2",
46
+ "eslint-plugin-react-hooks": "5.0.0",
47
47
  "eslint-plugin-sonarjs": "1.0.4",
48
48
  "eslint-plugin-storybook": "0.9.0",
49
49
  "eslint-plugin-tailwindcss": "3.17.5",