@ncontiero/eslint-config 6.2.0 → 6.3.0-beta.1

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +243 -2
  2. package/package.json +32 -30
package/dist/index.d.ts CHANGED
@@ -1411,6 +1411,11 @@ interface RuleOptions {
1411
1411
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header
1412
1412
  */
1413
1413
  'jsdoc/empty-tags'?: Linter.RuleEntry<JsdocEmptyTags>
1414
+ /**
1415
+ * Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode).
1416
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header
1417
+ */
1418
+ 'jsdoc/escape-inline-tags'?: Linter.RuleEntry<JsdocEscapeInlineTags>
1414
1419
  /**
1415
1420
  * Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors).
1416
1421
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header
@@ -1621,6 +1626,11 @@ interface RuleOptions {
1621
1626
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header
1622
1627
  */
1623
1628
  'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate>
1629
+ /**
1630
+ * Requires a description for `@template` tags
1631
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template-description.md#repos-sticky-header
1632
+ */
1633
+ 'jsdoc/require-template-description'?: Linter.RuleEntry<[]>
1624
1634
  /**
1625
1635
  * Requires that throw statements are documented with `@throws` tags.
1626
1636
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
@@ -3802,16 +3812,120 @@ interface RuleOptions {
3802
3812
  * @see https://eslint.org/docs/latest/rules/radix
3803
3813
  */
3804
3814
  'radix'?: Linter.RuleEntry<Radix>
3815
+ /**
3816
+ * Verifies that automatic effect dependencies are compiled if opted-in
3817
+ */
3818
+ 'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>
3819
+ /**
3820
+ * Validates against calling capitalized functions/methods instead of using JSX
3821
+ */
3822
+ 'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>
3823
+ /**
3824
+ * Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
3825
+ */
3826
+ 'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>
3827
+ /**
3828
+ * Validates the compiler configuration options
3829
+ */
3830
+ 'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>
3831
+ /**
3832
+ * Validates usage of error boundaries instead of try/catch for errors in child components
3833
+ */
3834
+ 'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>
3805
3835
  /**
3806
3836
  * verifies the list of dependencies for Hooks like useEffect and similar
3807
3837
  * @see https://github.com/facebook/react/issues/14920
3808
3838
  */
3809
3839
  'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>
3840
+ /**
3841
+ * Validates usage of fbt
3842
+ */
3843
+ 'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>
3844
+ /**
3845
+ * Validates usage of `fire`
3846
+ */
3847
+ 'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>
3848
+ /**
3849
+ * Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
3850
+ */
3851
+ 'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>
3852
+ /**
3853
+ * Validates against assignment/mutation of globals during render, part of ensuring that [side effects must render outside of render](https://react.dev/reference/rules/components-and-hooks-must-be-pure#side-effects-must-run-outside-of-render)
3854
+ */
3855
+ 'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>
3856
+ /**
3857
+ * Validates the rules of hooks
3858
+ */
3859
+ 'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>
3860
+ /**
3861
+ * Validates against mutating props, state, and other values that [are immutable](https://react.dev/reference/rules/components-and-hooks-must-be-pure#props-and-state-are-immutable)
3862
+ */
3863
+ 'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>
3864
+ /**
3865
+ * Validates against usage of libraries which are incompatible with memoization (manual or automatic)
3866
+ */
3867
+ 'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>
3868
+ /**
3869
+ * Internal invariants
3870
+ */
3871
+ 'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>
3872
+ /**
3873
+ * Validates that effect dependencies are memoized
3874
+ */
3875
+ 'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>
3876
+ /**
3877
+ * Validates against deriving values from state in an effect
3878
+ */
3879
+ 'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>
3880
+ /**
3881
+ * Validates that existing manual memoized is preserved by the compiler. React Compiler will only compile components and hooks if its inference [matches or exceeds the existing manual memoization](https://react.dev/learn/react-compiler/introduction#what-should-i-do-about-usememo-usecallback-and-reactmemo)
3882
+ */
3883
+ 'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>
3884
+ /**
3885
+ * Validates that [components/hooks are pure](https://react.dev/reference/rules/components-and-hooks-must-be-pure) by checking that they do not call known-impure functions
3886
+ */
3887
+ 'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>
3888
+ /**
3889
+ * Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
3890
+ */
3891
+ 'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>
3892
+ /**
3893
+ * Validates against suppression of other rules
3894
+ */
3895
+ 'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>
3810
3896
  /**
3811
3897
  * enforces the Rules of Hooks
3812
- * @see https://reactjs.org/docs/hooks-rules.html
3898
+ * @see https://react.dev/reference/rules/rules-of-hooks
3899
+ */
3900
+ 'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>
3901
+ /**
3902
+ * Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
3903
+ */
3904
+ 'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>
3905
+ /**
3906
+ * Validates against setting state during render, which can trigger additional renders and potential infinite render loops
3813
3907
  */
3814
- 'react-hooks/rules-of-hooks'?: Linter.RuleEntry<[]>
3908
+ 'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>
3909
+ /**
3910
+ * Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
3911
+ */
3912
+ 'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>
3913
+ /**
3914
+ * Validates against invalid syntax
3915
+ */
3916
+ 'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>
3917
+ /**
3918
+ * Unimplemented features
3919
+ */
3920
+ 'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>
3921
+ /**
3922
+ * Validates against syntax that we do not plan to support in React Compiler
3923
+ */
3924
+ 'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>
3925
+ /**
3926
+ * Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
3927
+ */
3928
+ 'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>
3815
3929
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
3816
3930
  /**
3817
3931
  * Enforces consistent naming for boolean props
@@ -7775,6 +7889,8 @@ type JsdocCheckTagNames = []|[{
7775
7889
 
7776
7890
  enableFixer?: boolean
7777
7891
 
7892
+ inlineTags?: string[]
7893
+
7778
7894
  jsxTags?: boolean
7779
7895
 
7780
7896
  typed?: boolean
@@ -7835,6 +7951,15 @@ type JsdocEmptyTags = []|[{
7835
7951
 
7836
7952
  tags?: string[]
7837
7953
  }]
7954
+ // ----- jsdoc/escape-inline-tags -----
7955
+ type JsdocEscapeInlineTags = []|[{
7956
+
7957
+ allowedInlineTags?: string[]
7958
+
7959
+ enableFixer?: boolean
7960
+
7961
+ fixType?: ("backticks" | "backslash")
7962
+ }]
7838
7963
  // ----- jsdoc/implements-on-classes -----
7839
7964
  type JsdocImplementsOnClasses = []|[{
7840
7965
 
@@ -8247,6 +8372,8 @@ type JsdocRequireReturnsCheck = []|[{
8247
8372
 
8248
8373
  exemptGenerators?: boolean
8249
8374
 
8375
+ noNativeTypes?: boolean
8376
+
8250
8377
  reportMissingReturnForUndefinedTypes?: boolean
8251
8378
  }]
8252
8379
  // ----- jsdoc/require-returns-description -----
@@ -9692,12 +9819,16 @@ type NoRestrictedImports = ((string | {
9692
9819
  message?: string
9693
9820
  importNames?: string[]
9694
9821
  allowImportNames?: string[]
9822
+
9823
+ allowTypeImports?: boolean
9695
9824
  })[] | []|[{
9696
9825
  paths?: (string | {
9697
9826
  name: string
9698
9827
  message?: string
9699
9828
  importNames?: string[]
9700
9829
  allowImportNames?: string[]
9830
+
9831
+ allowTypeImports?: boolean
9701
9832
  })[]
9702
9833
  patterns?: (string[] | ({
9703
9834
  [k: string]: unknown | undefined
@@ -13226,10 +13357,120 @@ type Quotes = []|[("single" | "double" | "backtick")]|[("single" | "double" | "b
13226
13357
  })]
13227
13358
  // ----- radix -----
13228
13359
  type Radix = []|[("always" | "as-needed")]
13360
+ // ----- react-hooks/automatic-effect-dependencies -----
13361
+ type ReactHooksAutomaticEffectDependencies = []|[{
13362
+ [k: string]: unknown | undefined
13363
+ }]
13364
+ // ----- react-hooks/capitalized-calls -----
13365
+ type ReactHooksCapitalizedCalls = []|[{
13366
+ [k: string]: unknown | undefined
13367
+ }]
13368
+ // ----- react-hooks/component-hook-factories -----
13369
+ type ReactHooksComponentHookFactories = []|[{
13370
+ [k: string]: unknown | undefined
13371
+ }]
13372
+ // ----- react-hooks/config -----
13373
+ type ReactHooksConfig = []|[{
13374
+ [k: string]: unknown | undefined
13375
+ }]
13376
+ // ----- react-hooks/error-boundaries -----
13377
+ type ReactHooksErrorBoundaries = []|[{
13378
+ [k: string]: unknown | undefined
13379
+ }]
13229
13380
  // ----- react-hooks/exhaustive-deps -----
13230
13381
  type ReactHooksExhaustiveDeps = []|[{
13231
13382
  additionalHooks?: string
13232
13383
  enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean
13384
+ experimental_autoDependenciesHooks?: string[]
13385
+ requireExplicitEffectDeps?: boolean
13386
+ }]
13387
+ // ----- react-hooks/fbt -----
13388
+ type ReactHooksFbt = []|[{
13389
+ [k: string]: unknown | undefined
13390
+ }]
13391
+ // ----- react-hooks/fire -----
13392
+ type ReactHooksFire = []|[{
13393
+ [k: string]: unknown | undefined
13394
+ }]
13395
+ // ----- react-hooks/gating -----
13396
+ type ReactHooksGating = []|[{
13397
+ [k: string]: unknown | undefined
13398
+ }]
13399
+ // ----- react-hooks/globals -----
13400
+ type ReactHooksGlobals = []|[{
13401
+ [k: string]: unknown | undefined
13402
+ }]
13403
+ // ----- react-hooks/hooks -----
13404
+ type ReactHooksHooks = []|[{
13405
+ [k: string]: unknown | undefined
13406
+ }]
13407
+ // ----- react-hooks/immutability -----
13408
+ type ReactHooksImmutability = []|[{
13409
+ [k: string]: unknown | undefined
13410
+ }]
13411
+ // ----- react-hooks/incompatible-library -----
13412
+ type ReactHooksIncompatibleLibrary = []|[{
13413
+ [k: string]: unknown | undefined
13414
+ }]
13415
+ // ----- react-hooks/invariant -----
13416
+ type ReactHooksInvariant = []|[{
13417
+ [k: string]: unknown | undefined
13418
+ }]
13419
+ // ----- react-hooks/memoized-effect-dependencies -----
13420
+ type ReactHooksMemoizedEffectDependencies = []|[{
13421
+ [k: string]: unknown | undefined
13422
+ }]
13423
+ // ----- react-hooks/no-deriving-state-in-effects -----
13424
+ type ReactHooksNoDerivingStateInEffects = []|[{
13425
+ [k: string]: unknown | undefined
13426
+ }]
13427
+ // ----- react-hooks/preserve-manual-memoization -----
13428
+ type ReactHooksPreserveManualMemoization = []|[{
13429
+ [k: string]: unknown | undefined
13430
+ }]
13431
+ // ----- react-hooks/purity -----
13432
+ type ReactHooksPurity = []|[{
13433
+ [k: string]: unknown | undefined
13434
+ }]
13435
+ // ----- react-hooks/refs -----
13436
+ type ReactHooksRefs = []|[{
13437
+ [k: string]: unknown | undefined
13438
+ }]
13439
+ // ----- react-hooks/rule-suppression -----
13440
+ type ReactHooksRuleSuppression = []|[{
13441
+ [k: string]: unknown | undefined
13442
+ }]
13443
+ // ----- react-hooks/rules-of-hooks -----
13444
+ type ReactHooksRulesOfHooks = []|[{
13445
+ additionalHooks?: string
13446
+ }]
13447
+ // ----- react-hooks/set-state-in-effect -----
13448
+ type ReactHooksSetStateInEffect = []|[{
13449
+ [k: string]: unknown | undefined
13450
+ }]
13451
+ // ----- react-hooks/set-state-in-render -----
13452
+ type ReactHooksSetStateInRender = []|[{
13453
+ [k: string]: unknown | undefined
13454
+ }]
13455
+ // ----- react-hooks/static-components -----
13456
+ type ReactHooksStaticComponents = []|[{
13457
+ [k: string]: unknown | undefined
13458
+ }]
13459
+ // ----- react-hooks/syntax -----
13460
+ type ReactHooksSyntax = []|[{
13461
+ [k: string]: unknown | undefined
13462
+ }]
13463
+ // ----- react-hooks/todo -----
13464
+ type ReactHooksTodo = []|[{
13465
+ [k: string]: unknown | undefined
13466
+ }]
13467
+ // ----- react-hooks/unsupported-syntax -----
13468
+ type ReactHooksUnsupportedSyntax = []|[{
13469
+ [k: string]: unknown | undefined
13470
+ }]
13471
+ // ----- react-hooks/use-memo -----
13472
+ type ReactHooksUseMemo = []|[{
13473
+ [k: string]: unknown | undefined
13233
13474
  }]
13234
13475
  // ----- react-refresh/only-export-components -----
13235
13476
  type ReactRefreshOnlyExportComponents = []|[{
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@ncontiero/eslint-config",
3
3
  "type": "module",
4
- "version": "6.2.0",
4
+ "version": "6.3.0-beta.1",
5
+ "packageManager": "pnpm@10.18.0",
5
6
  "description": "Nicolas's ESLint config.",
6
7
  "author": {
7
8
  "name": "Nicolas Contiero",
@@ -27,6 +28,18 @@
27
28
  "publishConfig": {
28
29
  "access": "public"
29
30
  },
31
+ "scripts": {
32
+ "build": "pnpm typegen && tsup",
33
+ "dev": "pnpm dlx @eslint/config-inspector --config eslint-inspector.config.ts",
34
+ "build:inspector": "pnpm build && pnpm dlx @eslint/config-inspector build --config eslint-inspector.config.ts",
35
+ "typegen": "tsx scripts/typegen.ts",
36
+ "lint": "eslint .",
37
+ "lint:fix": "pnpm lint --fix",
38
+ "changeset": "changeset",
39
+ "test": "vitest",
40
+ "typecheck": "tsc --noEmit",
41
+ "prepare": "husky"
42
+ },
30
43
  "peerDependencies": {
31
44
  "@tanstack/eslint-plugin-query": ">=5.50.0",
32
45
  "eslint": ">=9.20.0"
@@ -40,30 +53,30 @@
40
53
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
41
54
  "@eslint/markdown": "^7.3.0",
42
55
  "@next/eslint-plugin-next": "^15.5.4",
43
- "@typescript-eslint/eslint-plugin": "^8.44.1",
44
- "@typescript-eslint/parser": "^8.44.1",
56
+ "@typescript-eslint/eslint-plugin": "^8.45.0",
57
+ "@typescript-eslint/parser": "^8.45.0",
45
58
  "eslint-config-flat-gitignore": "^2.1.0",
46
59
  "eslint-merge-processors": "^2.0.0",
47
60
  "eslint-plugin-antfu": "^3.1.1",
48
61
  "eslint-plugin-command": "^3.3.1",
49
- "eslint-plugin-de-morgan": "^1.3.1",
62
+ "eslint-plugin-de-morgan": "^2.0.0",
50
63
  "eslint-plugin-import-x": "^4.16.1",
51
- "eslint-plugin-jsdoc": "^60.4.0",
52
- "eslint-plugin-jsonc": "^2.20.1",
64
+ "eslint-plugin-jsdoc": "^60.8.0",
65
+ "eslint-plugin-jsonc": "^2.21.0",
53
66
  "eslint-plugin-jsx-a11y": "^6.10.2",
54
67
  "eslint-plugin-n": "^17.23.1",
55
- "eslint-plugin-perfectionist": "^4.15.0",
68
+ "eslint-plugin-perfectionist": "^4.15.1",
56
69
  "eslint-plugin-prettier": "^5.5.4",
57
70
  "eslint-plugin-promise": "^7.2.1",
58
71
  "eslint-plugin-react": "^7.37.5",
59
- "eslint-plugin-react-hooks": "^5.2.0",
60
- "eslint-plugin-react-refresh": "^0.4.22",
72
+ "eslint-plugin-react-hooks": "^6.1.1",
73
+ "eslint-plugin-react-refresh": "^0.4.23",
61
74
  "eslint-plugin-regexp": "^2.10.0",
62
75
  "eslint-plugin-tailwindcss": "^3.18.2",
63
76
  "eslint-plugin-toml": "^0.12.0",
64
77
  "eslint-plugin-unicorn": "^61.0.2",
65
78
  "eslint-plugin-unused-imports": "^4.2.0",
66
- "eslint-plugin-yml": "^1.18.0",
79
+ "eslint-plugin-yml": "^1.19.0",
67
80
  "globals": "^16.4.0",
68
81
  "jsonc-eslint-parser": "^2.4.1",
69
82
  "local-pkg": "^1.1.2",
@@ -73,22 +86,22 @@
73
86
  },
74
87
  "devDependencies": {
75
88
  "@changesets/cli": "^2.29.7",
76
- "@commitlint/cli": "^20.0.0",
89
+ "@commitlint/cli": "^20.1.0",
77
90
  "@commitlint/config-conventional": "^20.0.0",
78
91
  "@ncontiero/changelog-github": "^2.1.1",
79
92
  "@ncontiero/prettier-config": "^1.0.0",
80
- "@tanstack/eslint-plugin-query": "^5.90.1",
81
- "@types/eslint-plugin-jsx-a11y": "^6.10.0",
82
- "@types/node": "^24.5.2",
83
- "eslint": "^9.36.0",
93
+ "@tanstack/eslint-plugin-query": "^5.91.0",
94
+ "@types/eslint-plugin-jsx-a11y": "^6.10.1",
95
+ "@types/node": "^24.6.2",
96
+ "eslint": "^9.37.0",
84
97
  "eslint-typegen": "^2.3.0",
85
98
  "execa": "^9.6.0",
86
99
  "husky": "^9.1.7",
87
- "lint-staged": "^16.2.1",
100
+ "lint-staged": "^16.2.3",
88
101
  "tinyglobby": "^0.2.15",
89
102
  "tsup": "^8.5.0",
90
103
  "tsx": "^4.20.6",
91
- "typescript": "^5.9.2",
104
+ "typescript": "^5.9.3",
92
105
  "vitest": "^3.2.4"
93
106
  },
94
107
  "engines": {
@@ -97,16 +110,5 @@
97
110
  "lint-staged": {
98
111
  "*": "pnpm lint:fix"
99
112
  },
100
- "prettier": "@ncontiero/prettier-config",
101
- "scripts": {
102
- "build": "pnpm typegen && tsup",
103
- "dev": "pnpm dlx @eslint/config-inspector --config eslint-inspector.config.ts",
104
- "build:inspector": "pnpm build && pnpm dlx @eslint/config-inspector build --config eslint-inspector.config.ts",
105
- "typegen": "tsx scripts/typegen.ts",
106
- "lint": "eslint .",
107
- "lint:fix": "pnpm lint --fix",
108
- "changeset": "changeset",
109
- "test": "vitest",
110
- "typecheck": "tsc --noEmit"
111
- }
112
- }
113
+ "prettier": "@ncontiero/prettier-config"
114
+ }