@jimmy.codes/eslint-config 6.12.0 → 6.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +251 -5
- package/dist/index.js +1 -1
- package/dist/{react-BjygB_xT.js → react-CY7FziwW.js} +14 -3
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ interface RuleOptions {
|
|
|
79
79
|
*/
|
|
80
80
|
'@eslint-react/dom/no-missing-button-type'?: Linter.RuleEntry<[]>;
|
|
81
81
|
/**
|
|
82
|
-
* Enforces explicit `sandbox`
|
|
82
|
+
* Enforces explicit `sandbox` prop for `iframe` elements.
|
|
83
83
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
84
84
|
*/
|
|
85
85
|
'@eslint-react/dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
@@ -133,13 +133,18 @@ interface RuleOptions {
|
|
|
133
133
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
134
134
|
*/
|
|
135
135
|
'@eslint-react/dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>;
|
|
136
|
+
/**
|
|
137
|
+
* Enforces React Dom is imported via a namespace import.
|
|
138
|
+
* @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
|
|
139
|
+
*/
|
|
140
|
+
'@eslint-react/dom/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
136
141
|
/**
|
|
137
142
|
* Disallow direct calls to the `set` function of `useState` in `useEffect`.
|
|
138
143
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
139
144
|
*/
|
|
140
145
|
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
|
|
141
146
|
/**
|
|
142
|
-
* Enforces that the 'key'
|
|
147
|
+
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
143
148
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
144
149
|
*/
|
|
145
150
|
'@eslint-react/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
|
|
@@ -369,7 +374,7 @@ interface RuleOptions {
|
|
|
369
374
|
*/
|
|
370
375
|
'@eslint-react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
371
376
|
/**
|
|
372
|
-
*
|
|
377
|
+
* Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
|
|
373
378
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
374
379
|
*/
|
|
375
380
|
'@eslint-react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
@@ -2996,6 +3001,11 @@ interface RuleOptions {
|
|
|
2996
3001
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header
|
|
2997
3002
|
*/
|
|
2998
3003
|
'jsdoc/empty-tags'?: Linter.RuleEntry<JsdocEmptyTags>;
|
|
3004
|
+
/**
|
|
3005
|
+
* Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode).
|
|
3006
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header
|
|
3007
|
+
*/
|
|
3008
|
+
'jsdoc/escape-inline-tags'?: Linter.RuleEntry<JsdocEscapeInlineTags>;
|
|
2999
3009
|
/**
|
|
3000
3010
|
* Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors).
|
|
3001
3011
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header
|
|
@@ -5137,16 +5147,121 @@ interface RuleOptions {
|
|
|
5137
5147
|
* Surfaces diagnostics from React Forget
|
|
5138
5148
|
*/
|
|
5139
5149
|
'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>;
|
|
5150
|
+
/**
|
|
5151
|
+
* Verifies that automatic effect dependencies are compiled if opted-in
|
|
5152
|
+
*/
|
|
5153
|
+
'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>;
|
|
5154
|
+
/**
|
|
5155
|
+
* Validates against calling capitalized functions/methods instead of using JSX
|
|
5156
|
+
*/
|
|
5157
|
+
'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>;
|
|
5158
|
+
/**
|
|
5159
|
+
* Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
|
|
5160
|
+
*/
|
|
5161
|
+
'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>;
|
|
5162
|
+
/**
|
|
5163
|
+
* Validates the compiler configuration options
|
|
5164
|
+
*/
|
|
5165
|
+
'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>;
|
|
5166
|
+
/**
|
|
5167
|
+
* Validates usage of error boundaries instead of try/catch for errors in child components
|
|
5168
|
+
*/
|
|
5169
|
+
'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>;
|
|
5140
5170
|
/**
|
|
5141
5171
|
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
5142
5172
|
* @see https://github.com/facebook/react/issues/14920
|
|
5143
5173
|
*/
|
|
5144
5174
|
'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>;
|
|
5175
|
+
/**
|
|
5176
|
+
* Validates usage of fbt
|
|
5177
|
+
*/
|
|
5178
|
+
'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>;
|
|
5179
|
+
/**
|
|
5180
|
+
* Validates usage of `fire`
|
|
5181
|
+
*/
|
|
5182
|
+
'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>;
|
|
5183
|
+
/**
|
|
5184
|
+
* Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
|
|
5185
|
+
*/
|
|
5186
|
+
'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>;
|
|
5187
|
+
/**
|
|
5188
|
+
* 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)
|
|
5189
|
+
*/
|
|
5190
|
+
'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>;
|
|
5191
|
+
/**
|
|
5192
|
+
* Validates the rules of hooks
|
|
5193
|
+
*/
|
|
5194
|
+
'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>;
|
|
5195
|
+
/**
|
|
5196
|
+
* 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)
|
|
5197
|
+
*/
|
|
5198
|
+
'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>;
|
|
5199
|
+
/**
|
|
5200
|
+
* Validates against usage of libraries which are incompatible with memoization (manual or automatic)
|
|
5201
|
+
*/
|
|
5202
|
+
'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>;
|
|
5203
|
+
/**
|
|
5204
|
+
* Internal invariants
|
|
5205
|
+
*/
|
|
5206
|
+
'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>;
|
|
5207
|
+
/**
|
|
5208
|
+
* Validates that effect dependencies are memoized
|
|
5209
|
+
*/
|
|
5210
|
+
'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>;
|
|
5211
|
+
/**
|
|
5212
|
+
* Validates against deriving values from state in an effect
|
|
5213
|
+
*/
|
|
5214
|
+
'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>;
|
|
5215
|
+
'react-hooks/no-unused-directives'?: Linter.RuleEntry<ReactHooksNoUnusedDirectives>;
|
|
5216
|
+
/**
|
|
5217
|
+
* 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)
|
|
5218
|
+
*/
|
|
5219
|
+
'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>;
|
|
5220
|
+
/**
|
|
5221
|
+
* 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
|
|
5222
|
+
*/
|
|
5223
|
+
'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>;
|
|
5224
|
+
/**
|
|
5225
|
+
* Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
|
|
5226
|
+
*/
|
|
5227
|
+
'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>;
|
|
5228
|
+
/**
|
|
5229
|
+
* Validates against suppression of other rules
|
|
5230
|
+
*/
|
|
5231
|
+
'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>;
|
|
5145
5232
|
/**
|
|
5146
5233
|
* enforces the Rules of Hooks
|
|
5147
|
-
* @see https://
|
|
5234
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
5148
5235
|
*/
|
|
5149
|
-
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<
|
|
5236
|
+
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>;
|
|
5237
|
+
/**
|
|
5238
|
+
* Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
|
|
5239
|
+
*/
|
|
5240
|
+
'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>;
|
|
5241
|
+
/**
|
|
5242
|
+
* Validates against setting state during render, which can trigger additional renders and potential infinite render loops
|
|
5243
|
+
*/
|
|
5244
|
+
'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>;
|
|
5245
|
+
/**
|
|
5246
|
+
* Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
|
|
5247
|
+
*/
|
|
5248
|
+
'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>;
|
|
5249
|
+
/**
|
|
5250
|
+
* Validates against invalid syntax
|
|
5251
|
+
*/
|
|
5252
|
+
'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>;
|
|
5253
|
+
/**
|
|
5254
|
+
* Unimplemented features
|
|
5255
|
+
*/
|
|
5256
|
+
'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>;
|
|
5257
|
+
/**
|
|
5258
|
+
* Validates against syntax that we do not plan to support in React Compiler
|
|
5259
|
+
*/
|
|
5260
|
+
'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>;
|
|
5261
|
+
/**
|
|
5262
|
+
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
5263
|
+
*/
|
|
5264
|
+
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
5150
5265
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
5151
5266
|
/**
|
|
5152
5267
|
* disallow confusing quantifiers
|
|
@@ -6805,6 +6920,11 @@ interface RuleOptions {
|
|
|
6805
6920
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
|
|
6806
6921
|
*/
|
|
6807
6922
|
'vitest/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
6923
|
+
/**
|
|
6924
|
+
* Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`
|
|
6925
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-exactly-once-with.md
|
|
6926
|
+
*/
|
|
6927
|
+
'vitest/prefer-called-exactly-once-with'?: Linter.RuleEntry<[]>;
|
|
6808
6928
|
/**
|
|
6809
6929
|
* enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
|
|
6810
6930
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
|
|
@@ -6865,6 +6985,11 @@ interface RuleOptions {
|
|
|
6865
6985
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
|
|
6866
6986
|
*/
|
|
6867
6987
|
'vitest/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
|
|
6988
|
+
/**
|
|
6989
|
+
* prefer dynamic import in mock
|
|
6990
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
|
|
6991
|
+
*/
|
|
6992
|
+
'vitest/prefer-import-in-mock'?: Linter.RuleEntry<[]>;
|
|
6868
6993
|
/**
|
|
6869
6994
|
* enforce importing Vitest globals
|
|
6870
6995
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
|
|
@@ -10139,6 +10264,12 @@ type JsdocConvertToJsdocComments = [] | [{
|
|
|
10139
10264
|
type JsdocEmptyTags = [] | [{
|
|
10140
10265
|
tags?: string[];
|
|
10141
10266
|
}];
|
|
10267
|
+
// ----- jsdoc/escape-inline-tags -----
|
|
10268
|
+
type JsdocEscapeInlineTags = [] | [{
|
|
10269
|
+
allowedInlineTags?: string[];
|
|
10270
|
+
enableFixer?: boolean;
|
|
10271
|
+
fixType?: ("backticks" | "backslash");
|
|
10272
|
+
}];
|
|
10142
10273
|
// ----- jsdoc/implements-on-classes -----
|
|
10143
10274
|
type JsdocImplementsOnClasses = [] | [{
|
|
10144
10275
|
contexts?: (string | {
|
|
@@ -10425,6 +10556,7 @@ type JsdocRequireReturns = [] | [{
|
|
|
10425
10556
|
type JsdocRequireReturnsCheck = [] | [{
|
|
10426
10557
|
exemptAsync?: boolean;
|
|
10427
10558
|
exemptGenerators?: boolean;
|
|
10559
|
+
noNativeTypes?: boolean;
|
|
10428
10560
|
reportMissingReturnForUndefinedTypes?: boolean;
|
|
10429
10561
|
}];
|
|
10430
10562
|
// ----- jsdoc/require-returns-description -----
|
|
@@ -13871,10 +14003,124 @@ type Radix = [] | [("always" | "as-needed")];
|
|
|
13871
14003
|
type ReactCompilerReactCompiler = [] | [{
|
|
13872
14004
|
[k: string]: unknown | undefined;
|
|
13873
14005
|
}];
|
|
14006
|
+
// ----- react-hooks/automatic-effect-dependencies -----
|
|
14007
|
+
type ReactHooksAutomaticEffectDependencies = [] | [{
|
|
14008
|
+
[k: string]: unknown | undefined;
|
|
14009
|
+
}];
|
|
14010
|
+
// ----- react-hooks/capitalized-calls -----
|
|
14011
|
+
type ReactHooksCapitalizedCalls = [] | [{
|
|
14012
|
+
[k: string]: unknown | undefined;
|
|
14013
|
+
}];
|
|
14014
|
+
// ----- react-hooks/component-hook-factories -----
|
|
14015
|
+
type ReactHooksComponentHookFactories = [] | [{
|
|
14016
|
+
[k: string]: unknown | undefined;
|
|
14017
|
+
}];
|
|
14018
|
+
// ----- react-hooks/config -----
|
|
14019
|
+
type ReactHooksConfig = [] | [{
|
|
14020
|
+
[k: string]: unknown | undefined;
|
|
14021
|
+
}];
|
|
14022
|
+
// ----- react-hooks/error-boundaries -----
|
|
14023
|
+
type ReactHooksErrorBoundaries = [] | [{
|
|
14024
|
+
[k: string]: unknown | undefined;
|
|
14025
|
+
}];
|
|
13874
14026
|
// ----- react-hooks/exhaustive-deps -----
|
|
13875
14027
|
type ReactHooksExhaustiveDeps = [] | [{
|
|
13876
14028
|
additionalHooks?: string;
|
|
13877
14029
|
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
14030
|
+
experimental_autoDependenciesHooks?: string[];
|
|
14031
|
+
requireExplicitEffectDeps?: boolean;
|
|
14032
|
+
}];
|
|
14033
|
+
// ----- react-hooks/fbt -----
|
|
14034
|
+
type ReactHooksFbt = [] | [{
|
|
14035
|
+
[k: string]: unknown | undefined;
|
|
14036
|
+
}];
|
|
14037
|
+
// ----- react-hooks/fire -----
|
|
14038
|
+
type ReactHooksFire = [] | [{
|
|
14039
|
+
[k: string]: unknown | undefined;
|
|
14040
|
+
}];
|
|
14041
|
+
// ----- react-hooks/gating -----
|
|
14042
|
+
type ReactHooksGating = [] | [{
|
|
14043
|
+
[k: string]: unknown | undefined;
|
|
14044
|
+
}];
|
|
14045
|
+
// ----- react-hooks/globals -----
|
|
14046
|
+
type ReactHooksGlobals = [] | [{
|
|
14047
|
+
[k: string]: unknown | undefined;
|
|
14048
|
+
}];
|
|
14049
|
+
// ----- react-hooks/hooks -----
|
|
14050
|
+
type ReactHooksHooks = [] | [{
|
|
14051
|
+
[k: string]: unknown | undefined;
|
|
14052
|
+
}];
|
|
14053
|
+
// ----- react-hooks/immutability -----
|
|
14054
|
+
type ReactHooksImmutability = [] | [{
|
|
14055
|
+
[k: string]: unknown | undefined;
|
|
14056
|
+
}];
|
|
14057
|
+
// ----- react-hooks/incompatible-library -----
|
|
14058
|
+
type ReactHooksIncompatibleLibrary = [] | [{
|
|
14059
|
+
[k: string]: unknown | undefined;
|
|
14060
|
+
}];
|
|
14061
|
+
// ----- react-hooks/invariant -----
|
|
14062
|
+
type ReactHooksInvariant = [] | [{
|
|
14063
|
+
[k: string]: unknown | undefined;
|
|
14064
|
+
}];
|
|
14065
|
+
// ----- react-hooks/memoized-effect-dependencies -----
|
|
14066
|
+
type ReactHooksMemoizedEffectDependencies = [] | [{
|
|
14067
|
+
[k: string]: unknown | undefined;
|
|
14068
|
+
}];
|
|
14069
|
+
// ----- react-hooks/no-deriving-state-in-effects -----
|
|
14070
|
+
type ReactHooksNoDerivingStateInEffects = [] | [{
|
|
14071
|
+
[k: string]: unknown | undefined;
|
|
14072
|
+
}];
|
|
14073
|
+
// ----- react-hooks/no-unused-directives -----
|
|
14074
|
+
type ReactHooksNoUnusedDirectives = [] | [{
|
|
14075
|
+
[k: string]: unknown | undefined;
|
|
14076
|
+
}];
|
|
14077
|
+
// ----- react-hooks/preserve-manual-memoization -----
|
|
14078
|
+
type ReactHooksPreserveManualMemoization = [] | [{
|
|
14079
|
+
[k: string]: unknown | undefined;
|
|
14080
|
+
}];
|
|
14081
|
+
// ----- react-hooks/purity -----
|
|
14082
|
+
type ReactHooksPurity = [] | [{
|
|
14083
|
+
[k: string]: unknown | undefined;
|
|
14084
|
+
}];
|
|
14085
|
+
// ----- react-hooks/refs -----
|
|
14086
|
+
type ReactHooksRefs = [] | [{
|
|
14087
|
+
[k: string]: unknown | undefined;
|
|
14088
|
+
}];
|
|
14089
|
+
// ----- react-hooks/rule-suppression -----
|
|
14090
|
+
type ReactHooksRuleSuppression = [] | [{
|
|
14091
|
+
[k: string]: unknown | undefined;
|
|
14092
|
+
}];
|
|
14093
|
+
// ----- react-hooks/rules-of-hooks -----
|
|
14094
|
+
type ReactHooksRulesOfHooks = [] | [{
|
|
14095
|
+
additionalHooks?: string;
|
|
14096
|
+
}];
|
|
14097
|
+
// ----- react-hooks/set-state-in-effect -----
|
|
14098
|
+
type ReactHooksSetStateInEffect = [] | [{
|
|
14099
|
+
[k: string]: unknown | undefined;
|
|
14100
|
+
}];
|
|
14101
|
+
// ----- react-hooks/set-state-in-render -----
|
|
14102
|
+
type ReactHooksSetStateInRender = [] | [{
|
|
14103
|
+
[k: string]: unknown | undefined;
|
|
14104
|
+
}];
|
|
14105
|
+
// ----- react-hooks/static-components -----
|
|
14106
|
+
type ReactHooksStaticComponents = [] | [{
|
|
14107
|
+
[k: string]: unknown | undefined;
|
|
14108
|
+
}];
|
|
14109
|
+
// ----- react-hooks/syntax -----
|
|
14110
|
+
type ReactHooksSyntax = [] | [{
|
|
14111
|
+
[k: string]: unknown | undefined;
|
|
14112
|
+
}];
|
|
14113
|
+
// ----- react-hooks/todo -----
|
|
14114
|
+
type ReactHooksTodo = [] | [{
|
|
14115
|
+
[k: string]: unknown | undefined;
|
|
14116
|
+
}];
|
|
14117
|
+
// ----- react-hooks/unsupported-syntax -----
|
|
14118
|
+
type ReactHooksUnsupportedSyntax = [] | [{
|
|
14119
|
+
[k: string]: unknown | undefined;
|
|
14120
|
+
}];
|
|
14121
|
+
// ----- react-hooks/use-memo -----
|
|
14122
|
+
type ReactHooksUseMemo = [] | [{
|
|
14123
|
+
[k: string]: unknown | undefined;
|
|
13878
14124
|
}];
|
|
13879
14125
|
// ----- react-refresh/only-export-components -----
|
|
13880
14126
|
type ReactRefreshOnlyExportComponents = [] | [{
|
package/dist/index.js
CHANGED
|
@@ -484,7 +484,7 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
484
484
|
];
|
|
485
485
|
const featureConfigs = await Promise.all([
|
|
486
486
|
isTypescriptEnabled && unwrap(import("./typescript-D8AT5dEv.js")),
|
|
487
|
-
isReactEnabled && unwrap(import("./react-
|
|
487
|
+
isReactEnabled && unwrap(import("./react-CY7FziwW.js")),
|
|
488
488
|
isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
|
|
489
489
|
isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
|
|
490
490
|
isJestEnabled && unwrap(import("./jest-G-dRTY_j.js")),
|
|
@@ -29,12 +29,10 @@ const reactRules = async () => {
|
|
|
29
29
|
...jsxA11yPlugin.flatConfigs.recommended.rules,
|
|
30
30
|
...upwarn(reactPluginRules),
|
|
31
31
|
"@eslint-react/dom/no-string-style-prop": "error",
|
|
32
|
-
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "error",
|
|
33
32
|
"@eslint-react/jsx-key-before-spread": "error",
|
|
34
33
|
"@eslint-react/jsx-shorthand-boolean": "error",
|
|
35
34
|
"@eslint-react/jsx-shorthand-fragment": "error",
|
|
36
35
|
"@eslint-react/naming-convention/component-name": "error",
|
|
37
|
-
"@eslint-react/naming-convention/use-state": "error",
|
|
38
36
|
"@eslint-react/no-children-prop": "error",
|
|
39
37
|
"@eslint-react/no-class-component": "error",
|
|
40
38
|
"@eslint-react/no-missing-context-display-name": "error",
|
|
@@ -44,8 +42,21 @@ const reactRules = async () => {
|
|
|
44
42
|
"@eslint-react/no-useless-fragment": "error",
|
|
45
43
|
"@eslint-react/prefer-namespace-import": "error",
|
|
46
44
|
"react-compiler/react-compiler": "error",
|
|
45
|
+
"react-hooks/component-hook-factories": "error",
|
|
46
|
+
"react-hooks/error-boundaries": "error",
|
|
47
47
|
"react-hooks/exhaustive-deps": "error",
|
|
48
|
+
"react-hooks/globals": "error",
|
|
49
|
+
"react-hooks/immutability": "error",
|
|
50
|
+
"react-hooks/incompatible-library": "error",
|
|
51
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
52
|
+
"react-hooks/purity": "error",
|
|
53
|
+
"react-hooks/refs": "error",
|
|
48
54
|
"react-hooks/rules-of-hooks": "error",
|
|
55
|
+
"react-hooks/set-state-in-effect": "error",
|
|
56
|
+
"react-hooks/set-state-in-render": "error",
|
|
57
|
+
"react-hooks/static-components": "error",
|
|
58
|
+
"react-hooks/unsupported-syntax": "error",
|
|
59
|
+
"react-hooks/use-memo": "error",
|
|
49
60
|
"react-refresh/only-export-components": ["warn", {
|
|
50
61
|
allowConstantExport: isUsingVite,
|
|
51
62
|
allowExportNames: isUsingNextjs ? nextAllowedExportNames : []
|
|
@@ -59,7 +70,7 @@ async function reactConfig() {
|
|
|
59
70
|
const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin] = await Promise.all([
|
|
60
71
|
interopDefault(import("@eslint-react/eslint-plugin")),
|
|
61
72
|
interopDefault(import("eslint-plugin-jsx-a11y")),
|
|
62
|
-
import("eslint-plugin-react-hooks"),
|
|
73
|
+
interopDefault(import("eslint-plugin-react-hooks")),
|
|
63
74
|
import("eslint-plugin-react-refresh"),
|
|
64
75
|
import("eslint-plugin-react-compiler")
|
|
65
76
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.13.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
43
|
-
"@eslint-react/eslint-plugin": "^2.0.
|
|
43
|
+
"@eslint-react/eslint-plugin": "^2.0.6",
|
|
44
44
|
"@eslint/js": "^9.36.0",
|
|
45
45
|
"@next/eslint-plugin-next": "^15.5.4",
|
|
46
46
|
"@stylistic/eslint-plugin": "^5.4.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@types/eslint": "9.6.1",
|
|
49
49
|
"@typescript-eslint/parser": "^8.45.0",
|
|
50
50
|
"@typescript-eslint/utils": "^8.45.0",
|
|
51
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
51
|
+
"@vitest/eslint-plugin": "^1.3.15",
|
|
52
52
|
"astro-eslint-parser": "^1.2.2",
|
|
53
53
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
54
54
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"eslint-plugin-import-x": "^4.16.1",
|
|
58
58
|
"eslint-plugin-jest": "^29.0.1",
|
|
59
59
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
60
|
-
"eslint-plugin-jsdoc": "^60.
|
|
60
|
+
"eslint-plugin-jsdoc": "^60.7.1",
|
|
61
61
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
62
62
|
"eslint-plugin-n": "^17.23.1",
|
|
63
63
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
64
64
|
"eslint-plugin-playwright": "^2.2.2",
|
|
65
65
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
66
|
-
"eslint-plugin-react-hooks": "^
|
|
67
|
-
"eslint-plugin-react-refresh": "0.4.
|
|
66
|
+
"eslint-plugin-react-hooks": "^6.1.0",
|
|
67
|
+
"eslint-plugin-react-refresh": "0.4.23",
|
|
68
68
|
"eslint-plugin-regexp": "^2.10.0",
|
|
69
69
|
"eslint-plugin-storybook": "0.12.0",
|
|
70
70
|
"eslint-plugin-testing-library": "^7.11.0",
|