@ncontiero/eslint-config 7.2.0 → 7.3.0-beta.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.
Files changed (3) hide show
  1. package/dist/index.d.mts +514 -850
  2. package/dist/index.mjs +54 -151
  3. package/package.json +28 -27
package/dist/index.d.mts CHANGED
@@ -4207,642 +4207,742 @@ interface RuleOptions {
4207
4207
  * @see https://eslint.org/docs/latest/rules/radix
4208
4208
  */
4209
4209
  'radix'?: Linter.RuleEntry<Radix>;
4210
+ 'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
4211
+ /**
4212
+ * Disallows higher order functions that define components or hooks inside them.
4213
+ * @see https://eslint-react.xyz/docs/rules/component-hook-factories
4214
+ */
4215
+ 'react/component-hook-factories'?: Linter.RuleEntry<[]>;
4216
+ /**
4217
+ * Disallows DOM elements from using 'dangerouslySetInnerHTML'.
4218
+ * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
4219
+ */
4220
+ 'react/dom-no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>;
4221
+ /**
4222
+ * Disallows DOM elements from using 'dangerouslySetInnerHTML' and 'children' at the same time.
4223
+ * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
4224
+ */
4225
+ 'react/dom-no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>;
4226
+ /**
4227
+ * Disallows 'findDOMNode'.
4228
+ * @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
4229
+ */
4230
+ 'react/dom-no-find-dom-node'?: Linter.RuleEntry<[]>;
4231
+ /**
4232
+ * Disallows 'flushSync'.
4233
+ * @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
4234
+ */
4235
+ 'react/dom-no-flush-sync'?: Linter.RuleEntry<[]>;
4210
4236
  /**
4211
- * Verifies that automatic effect dependencies are compiled if opted-in
4237
+ * Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'.
4238
+ * @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
4212
4239
  */
4213
- 'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>;
4240
+ 'react/dom-no-hydrate'?: Linter.RuleEntry<[]>;
4214
4241
  /**
4215
- * Validates against calling capitalized functions/methods instead of using JSX
4242
+ * Enforces an explicit 'type' attribute for 'button' elements.
4243
+ * @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
4216
4244
  */
4217
- 'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>;
4245
+ 'react/dom-no-missing-button-type'?: Linter.RuleEntry<[]>;
4218
4246
  /**
4219
- * Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
4247
+ * Enforces an explicit 'sandbox' attribute for 'iframe' elements.
4248
+ * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
4220
4249
  */
4221
- 'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>;
4250
+ 'react/dom-no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
4222
4251
  /**
4223
- * Validates the compiler configuration options
4252
+ * Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'.
4253
+ * @see https://eslint-react.xyz/docs/rules/dom-no-render
4224
4254
  */
4225
- 'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>;
4255
+ 'react/dom-no-render'?: Linter.RuleEntry<[]>;
4226
4256
  /**
4227
- * Validates usage of error boundaries instead of try/catch for errors in child components
4257
+ * Disallows the return value of 'ReactDOM.render'.
4258
+ * @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
4228
4259
  */
4229
- 'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>;
4260
+ 'react/dom-no-render-return-value'?: Linter.RuleEntry<[]>;
4230
4261
  /**
4231
- * verifies the list of dependencies for Hooks like useEffect and similar
4262
+ * Disallows 'javascript:' URLs as attribute values.
4263
+ * @see https://eslint-react.xyz/docs/rules/dom-no-script-url
4264
+ */
4265
+ 'react/dom-no-script-url'?: Linter.RuleEntry<[]>;
4266
+ /**
4267
+ * Disallows the use of string style prop in JSX. Use an object instead.
4268
+ * @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
4269
+ */
4270
+ 'react/dom-no-string-style-prop'?: Linter.RuleEntry<[]>;
4271
+ /**
4272
+ * Disallows unknown 'DOM' properties.
4273
+ * @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
4274
+ */
4275
+ 'react/dom-no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>;
4276
+ /**
4277
+ * Enforces that the 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
4278
+ * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
4279
+ */
4280
+ 'react/dom-no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
4281
+ /**
4282
+ * Disallows 'target="_blank"' without 'rel="noreferrer noopener"'.
4283
+ * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
4284
+ */
4285
+ 'react/dom-no-unsafe-target-blank'?: Linter.RuleEntry<[]>;
4286
+ /**
4287
+ * Replaces usage of 'useFormState' with 'useActionState'.
4288
+ * @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
4289
+ */
4290
+ 'react/dom-no-use-form-state'?: Linter.RuleEntry<[]>;
4291
+ /**
4292
+ * Disallows 'children' in void DOM elements.
4293
+ * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
4294
+ */
4295
+ 'react/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
4296
+ /**
4297
+ * Enforces importing React DOM via a namespace import.
4298
+ * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
4299
+ */
4300
+ 'react/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
4301
+ /**
4302
+ * Validates usage of Error Boundaries instead of try/catch for errors in child components.
4303
+ * @see https://eslint-react.xyz/docs/rules/error-boundaries
4304
+ */
4305
+ 'react/error-boundaries'?: Linter.RuleEntry<[]>;
4306
+ /**
4307
+ * Verifies the list of dependencies for Hooks like 'useEffect' and similar.
4232
4308
  * @see https://github.com/facebook/react/issues/14920
4233
4309
  */
4234
- 'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>;
4310
+ 'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>;
4235
4311
  /**
4236
- * Validates usage of fbt
4312
+ * Validates against mutating props, state, and other values that are immutable.
4313
+ * @see https://eslint-react.xyz/docs/rules/immutability
4237
4314
  */
4238
- 'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>;
4315
+ 'react/immutability'?: Linter.RuleEntry<[]>;
4239
4316
  /**
4240
- * Validates usage of `fire`
4317
+ * Disallows passing 'children' as a prop.
4318
+ * @see https://eslint-react.xyz/docs/rules/no-children-prop
4241
4319
  */
4242
- 'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>;
4320
+ 'react/jsx-no-children-prop'?: Linter.RuleEntry<[]>;
4243
4321
  /**
4244
- * Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
4322
+ * Disallows passing 'children' as a prop when children are also passed as nested content.
4323
+ * @see https://eslint-react.xyz/docs/rules/no-children-prop-with-children
4245
4324
  */
4246
- 'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>;
4325
+ 'react/jsx-no-children-prop-with-children'?: Linter.RuleEntry<[]>;
4247
4326
  /**
4248
- * 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)
4327
+ * Prevents comment strings from being accidentally inserted into a JSX element's text nodes.
4328
+ * @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
4249
4329
  */
4250
- 'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>;
4330
+ 'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
4251
4331
  /**
4252
- * Validates the rules of hooks
4332
+ * Prevent patterns that cause deoptimization when using the automatic JSX runtime.
4333
+ * @see https://eslint-react.xyz/docs/rules/no-key-after-spread
4253
4334
  */
4254
- 'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>;
4335
+ 'react/jsx-no-key-after-spread'?: Linter.RuleEntry<[]>;
4255
4336
  /**
4256
- * 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)
4337
+ * Catches `$` before `{expr}` in JSX typically from template literal `${expr}` being copy-pasted into JSX without removing the `$`. The `$` "leaks" into the rendered output.
4338
+ * @see https://eslint-react.xyz/docs/rules/no-leaked-dollar
4257
4339
  */
4258
- 'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>;
4340
+ 'react/jsx-no-leaked-dollar'?: Linter.RuleEntry<[]>;
4259
4341
  /**
4260
- * Validates against usage of libraries which are incompatible with memoization (manual or automatic)
4342
+ * Catches `;` at the start of JSX text nodes typically from accidentally placing a statement-ending `;` inside JSX. The `;` "leaks" into the rendered output.
4343
+ * @see https://eslint-react.xyz/docs/rules/no-leaked-semicolon
4261
4344
  */
4262
- 'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>;
4345
+ 'react/jsx-no-leaked-semicolon'?: Linter.RuleEntry<[]>;
4263
4346
  /**
4264
- * Internal invariants
4347
+ * Disallow JSX namespace syntax, as React does not support them.
4348
+ * @see https://eslint-react.xyz/docs/rules/no-namespace
4265
4349
  */
4266
- 'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>;
4350
+ 'react/jsx-no-namespace'?: Linter.RuleEntry<[]>;
4267
4351
  /**
4268
- * Validates that effect dependencies are memoized
4352
+ * Disallows useless fragment elements.
4353
+ * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
4269
4354
  */
4270
- 'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>;
4355
+ 'react/jsx-no-useless-fragment'?: Linter.RuleEntry<ReactJsxNoUselessFragment>;
4271
4356
  /**
4272
- * Validates against deriving values from state in an effect
4357
+ * Enforces the context name to be a valid component name with the suffix 'Context'.
4358
+ * @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
4273
4359
  */
4274
- 'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>;
4360
+ 'react/naming-convention-context-name'?: Linter.RuleEntry<[]>;
4275
4361
  /**
4276
- * 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)
4362
+ * Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
4363
+ * @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
4277
4364
  */
4278
- 'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>;
4365
+ 'react/naming-convention-id-name'?: Linter.RuleEntry<[]>;
4279
4366
  /**
4280
- * 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
4367
+ * Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
4368
+ * @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
4281
4369
  */
4282
- 'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>;
4370
+ 'react/naming-convention-ref-name'?: Linter.RuleEntry<[]>;
4283
4371
  /**
4284
- * Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
4372
+ * Disallows accessing 'this.state' inside 'setState' calls.
4373
+ * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
4285
4374
  */
4286
- 'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>;
4375
+ 'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
4287
4376
  /**
4288
- * Validates against suppression of other rules
4377
+ * Disallows using an item's index in the array as its key.
4378
+ * @see https://eslint-react.xyz/docs/rules/no-array-index-key
4289
4379
  */
4290
- 'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>;
4380
+ 'react/no-array-index-key'?: Linter.RuleEntry<[]>;
4291
4381
  /**
4292
- * enforces the Rules of Hooks
4293
- * @see https://react.dev/reference/rules/rules-of-hooks
4382
+ * Disallows the use of 'Children.count' from the 'react' package.
4383
+ * @see https://eslint-react.xyz/docs/rules/no-children-count
4294
4384
  */
4295
- 'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>;
4385
+ 'react/no-children-count'?: Linter.RuleEntry<[]>;
4296
4386
  /**
4297
- * Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
4387
+ * Disallows the use of 'Children.forEach' from the 'react' package.
4388
+ * @see https://eslint-react.xyz/docs/rules/no-children-for-each
4298
4389
  */
4299
- 'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>;
4390
+ 'react/no-children-for-each'?: Linter.RuleEntry<[]>;
4300
4391
  /**
4301
- * Validates against setting state during render, which can trigger additional renders and potential infinite render loops
4392
+ * Disallows the use of 'Children.map' from the 'react' package.
4393
+ * @see https://eslint-react.xyz/docs/rules/no-children-map
4302
4394
  */
4303
- 'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>;
4395
+ 'react/no-children-map'?: Linter.RuleEntry<[]>;
4304
4396
  /**
4305
- * Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
4397
+ * Disallows the use of 'Children.only' from the 'react' package.
4398
+ * @see https://eslint-react.xyz/docs/rules/no-children-only
4306
4399
  */
4307
- 'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>;
4400
+ 'react/no-children-only'?: Linter.RuleEntry<[]>;
4308
4401
  /**
4309
- * Validates against invalid syntax
4402
+ * Disallows the use of 'Children.toArray' from the 'react' package.
4403
+ * @see https://eslint-react.xyz/docs/rules/no-children-to-array
4310
4404
  */
4311
- 'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>;
4405
+ 'react/no-children-to-array'?: Linter.RuleEntry<[]>;
4312
4406
  /**
4313
- * Unimplemented features
4407
+ * Disallows class components except for error boundaries.
4408
+ * @see https://eslint-react.xyz/docs/rules/no-class-component
4314
4409
  */
4315
- 'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>;
4410
+ 'react/no-class-component'?: Linter.RuleEntry<[]>;
4316
4411
  /**
4317
- * Validates against syntax that we do not plan to support in React Compiler
4412
+ * Disallows 'cloneElement'.
4413
+ * @see https://eslint-react.xyz/docs/rules/no-clone-element
4318
4414
  */
4319
- 'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>;
4415
+ 'react/no-clone-element'?: Linter.RuleEntry<[]>;
4320
4416
  /**
4321
- * Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
4417
+ * Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
4418
+ * @see https://eslint-react.xyz/docs/rules/no-component-will-mount
4322
4419
  */
4323
- 'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
4420
+ 'react/no-component-will-mount'?: Linter.RuleEntry<[]>;
4324
4421
  /**
4325
- * 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.
4422
+ * Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
4423
+ * @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
4326
4424
  */
4327
- 'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
4328
- 'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
4425
+ 'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>;
4329
4426
  /**
4330
- * Enforces consistent naming for boolean props
4331
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md
4427
+ * Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
4428
+ * @see https://eslint-react.xyz/docs/rules/no-component-will-update
4332
4429
  */
4333
- 'react/boolean-prop-naming'?: Linter.RuleEntry<ReactBooleanPropNaming>;
4430
+ 'react/no-component-will-update'?: Linter.RuleEntry<[]>;
4334
4431
  /**
4335
- * Disallow usage of `button` elements without an explicit `type` attribute
4336
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/button-has-type.md
4432
+ * Replaces usage of '<Context.Provider>' with '<Context>'.
4433
+ * @see https://eslint-react.xyz/docs/rules/no-context-provider
4337
4434
  */
4338
- 'react/button-has-type'?: Linter.RuleEntry<ReactButtonHasType>;
4435
+ 'react/no-context-provider'?: Linter.RuleEntry<[]>;
4339
4436
  /**
4340
- * Enforce using `onChange` or `readonly` attribute when `checked` is used
4341
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/checked-requires-onchange-or-readonly.md
4437
+ * Disallows 'createRef' in function components.
4438
+ * @see https://eslint-react.xyz/docs/rules/no-create-ref
4342
4439
  */
4343
- 'react/checked-requires-onchange-or-readonly'?: Linter.RuleEntry<ReactCheckedRequiresOnchangeOrReadonly>;
4440
+ 'react/no-create-ref'?: Linter.RuleEntry<[]>;
4344
4441
  /**
4345
- * Enforce all defaultProps have a corresponding non-required PropType
4346
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/default-props-match-prop-types.md
4442
+ * Disallows direct mutation of 'this.state'.
4443
+ * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
4347
4444
  */
4348
- 'react/default-props-match-prop-types'?: Linter.RuleEntry<ReactDefaultPropsMatchPropTypes>;
4445
+ 'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
4349
4446
  /**
4350
- * Enforce consistent usage of destructuring assignment of props, state, and context
4351
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/destructuring-assignment.md
4447
+ * Prevents duplicate 'key' props on sibling elements when rendering lists.
4448
+ * @see https://eslint-react.xyz/docs/rules/no-duplicate-key
4352
4449
  */
4353
- 'react/destructuring-assignment'?: Linter.RuleEntry<ReactDestructuringAssignment>;
4450
+ 'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
4354
4451
  /**
4355
- * Disallow missing displayName in a React component definition
4356
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md
4452
+ * Replaces usage of 'forwardRef' with passing 'ref' as a prop.
4453
+ * @see https://eslint-react.xyz/docs/rules/no-forward-ref
4357
4454
  */
4358
- 'react/display-name'?: Linter.RuleEntry<ReactDisplayName>;
4455
+ 'react/no-forward-ref'?: Linter.RuleEntry<[]>;
4359
4456
  /**
4360
- * Disallow certain props on components
4361
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-component-props.md
4457
+ * Prevents implicitly passing the 'children' prop to components.
4458
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-children
4362
4459
  */
4363
- 'react/forbid-component-props'?: Linter.RuleEntry<ReactForbidComponentProps>;
4460
+ 'react/no-implicit-children'?: Linter.RuleEntry<[]>;
4364
4461
  /**
4365
- * Disallow certain props on DOM Nodes
4366
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-dom-props.md
4462
+ * Prevents implicitly passing the 'key' prop to components.
4463
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-key
4367
4464
  */
4368
- 'react/forbid-dom-props'?: Linter.RuleEntry<ReactForbidDomProps>;
4465
+ 'react/no-implicit-key'?: Linter.RuleEntry<[]>;
4369
4466
  /**
4370
- * Disallow certain elements
4371
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-elements.md
4467
+ * Prevents implicitly passing the 'ref' prop to components.
4468
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-ref
4372
4469
  */
4373
- 'react/forbid-elements'?: Linter.RuleEntry<ReactForbidElements>;
4470
+ 'react/no-implicit-ref'?: Linter.RuleEntry<[]>;
4374
4471
  /**
4375
- * Disallow using another component's propTypes
4376
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-foreign-prop-types.md
4472
+ * Prevents problematic leaked values from being rendered.
4473
+ * @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
4377
4474
  */
4378
- 'react/forbid-foreign-prop-types'?: Linter.RuleEntry<ReactForbidForeignPropTypes>;
4475
+ 'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
4379
4476
  /**
4380
- * Disallow certain propTypes
4381
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-prop-types.md
4477
+ * Enforces that all components have a 'displayName' that can be used in DevTools.
4478
+ * @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
4382
4479
  */
4383
- 'react/forbid-prop-types'?: Linter.RuleEntry<ReactForbidPropTypes>;
4480
+ 'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
4384
4481
  /**
4385
- * Require all forwardRef components include a ref parameter
4386
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forward-ref-uses-ref.md
4482
+ * Enforces that all contexts have a 'displayName' that can be used in DevTools.
4483
+ * @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
4387
4484
  */
4388
- 'react/forward-ref-uses-ref'?: Linter.RuleEntry<[]>;
4485
+ 'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
4389
4486
  /**
4390
- * Enforce a specific function type for function components
4391
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/function-component-definition.md
4487
+ * Disallows missing 'key' on items in list rendering.
4488
+ * @see https://eslint-react.xyz/docs/rules/no-missing-key
4392
4489
  */
4393
- 'react/function-component-definition'?: Linter.RuleEntry<ReactFunctionComponentDefinition>;
4490
+ 'react/no-missing-key'?: Linter.RuleEntry<[]>;
4394
4491
  /**
4395
- * Ensure destructuring and symmetric naming of useState hook value and setter variables
4396
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/hook-use-state.md
4492
+ * Prevents incorrect usage of 'captureOwnerStack'.
4493
+ * @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
4397
4494
  */
4398
- 'react/hook-use-state'?: Linter.RuleEntry<ReactHookUseState>;
4495
+ 'react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
4399
4496
  /**
4400
- * Enforce sandbox attribute on iframe elements
4401
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/iframe-missing-sandbox.md
4497
+ * Disallows nesting component definitions inside other components.
4498
+ * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
4402
4499
  */
4403
- 'react/iframe-missing-sandbox'?: Linter.RuleEntry<[]>;
4500
+ 'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
4404
4501
  /**
4405
- * Enforce boolean attributes notation in JSX
4406
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-boolean-value.md
4502
+ * Disallows nesting lazy component declarations inside other components or hooks.
4503
+ * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
4407
4504
  */
4408
- 'react/jsx-boolean-value'?: Linter.RuleEntry<ReactJsxBooleanValue>;
4505
+ 'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
4409
4506
  /**
4410
- * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
4411
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-child-element-spacing.md
4507
+ * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
4508
+ * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
4412
4509
  */
4413
- 'react/jsx-child-element-spacing'?: Linter.RuleEntry<[]>;
4510
+ 'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
4414
4511
  /**
4415
- * Enforce closing bracket location in JSX
4416
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-bracket-location.md
4512
+ * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
4513
+ * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
4417
4514
  */
4418
- 'react/jsx-closing-bracket-location'?: Linter.RuleEntry<ReactJsxClosingBracketLocation>;
4515
+ 'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
4419
4516
  /**
4420
- * Enforce closing tag location for multiline JSX
4421
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-tag-location.md
4517
+ * Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
4518
+ * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
4422
4519
  */
4423
- 'react/jsx-closing-tag-location'?: Linter.RuleEntry<ReactJsxClosingTagLocation>;
4520
+ 'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
4424
4521
  /**
4425
- * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
4426
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-brace-presence.md
4522
+ * Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
4523
+ * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
4427
4524
  */
4428
- 'react/jsx-curly-brace-presence'?: Linter.RuleEntry<ReactJsxCurlyBracePresence>;
4525
+ 'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
4429
4526
  /**
4430
- * Enforce consistent linebreaks in curly braces in JSX attributes and expressions
4431
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-newline.md
4527
+ * Disallows unnecessary usage of 'useCallback'.
4528
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
4432
4529
  */
4433
- 'react/jsx-curly-newline'?: Linter.RuleEntry<ReactJsxCurlyNewline>;
4530
+ 'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
4434
4531
  /**
4435
- * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
4436
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-spacing.md
4532
+ * Disallows unnecessary usage of 'useMemo'.
4533
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
4437
4534
  */
4438
- 'react/jsx-curly-spacing'?: Linter.RuleEntry<ReactJsxCurlySpacing>;
4535
+ 'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
4439
4536
  /**
4440
- * Enforce or disallow spaces around equal signs in JSX attributes
4441
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-equals-spacing.md
4537
+ * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
4538
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
4442
4539
  */
4443
- 'react/jsx-equals-spacing'?: Linter.RuleEntry<ReactJsxEqualsSpacing>;
4540
+ 'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
4444
4541
  /**
4445
- * Disallow file extensions that may contain JSX
4446
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-filename-extension.md
4542
+ * Warns about the use of 'UNSAFE_componentWillMount' in class components.
4543
+ * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
4447
4544
  */
4448
- 'react/jsx-filename-extension'?: Linter.RuleEntry<ReactJsxFilenameExtension>;
4545
+ 'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
4449
4546
  /**
4450
- * Enforce proper position of the first property in JSX
4451
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-first-prop-new-line.md
4547
+ * Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
4548
+ * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
4452
4549
  */
4453
- 'react/jsx-first-prop-new-line'?: Linter.RuleEntry<ReactJsxFirstPropNewLine>;
4550
+ 'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
4454
4551
  /**
4455
- * Enforce shorthand or standard form for React fragments
4456
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-fragments.md
4552
+ * Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
4553
+ * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
4457
4554
  */
4458
- 'react/jsx-fragments'?: Linter.RuleEntry<ReactJsxFragments>;
4555
+ 'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
4459
4556
  /**
4460
- * Enforce event handler naming conventions in JSX
4461
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-handler-names.md
4557
+ * Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
4558
+ * @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
4462
4559
  */
4463
- 'react/jsx-handler-names'?: Linter.RuleEntry<ReactJsxHandlerNames>;
4560
+ 'react/no-unstable-context-value'?: Linter.RuleEntry<[]>;
4464
4561
  /**
4465
- * Enforce JSX indentation
4466
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent.md
4562
+ * Prevents using referential-type values as default props in object destructuring.
4563
+ * @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
4467
4564
  */
4468
- 'react/jsx-indent'?: Linter.RuleEntry<ReactJsxIndent>;
4565
+ 'react/no-unstable-default-props'?: Linter.RuleEntry<ReactNoUnstableDefaultProps>;
4469
4566
  /**
4470
- * Enforce props indentation in JSX
4471
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent-props.md
4567
+ * Warns about unused class component methods and properties.
4568
+ * @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
4472
4569
  */
4473
- 'react/jsx-indent-props'?: Linter.RuleEntry<ReactJsxIndentProps>;
4570
+ 'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
4474
4571
  /**
4475
- * Disallow missing `key` props in iterators/collection literals
4476
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-key.md
4572
+ * Warns about component props that are defined but never used.
4573
+ * @see https://eslint-react.xyz/docs/rules/no-unused-props
4477
4574
  */
4478
- 'react/jsx-key'?: Linter.RuleEntry<ReactJsxKey>;
4575
+ 'react/no-unused-props'?: Linter.RuleEntry<[]>;
4479
4576
  /**
4480
- * Enforce JSX maximum depth
4481
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-depth.md
4577
+ * Warns about unused class component state.
4578
+ * @see https://eslint-react.xyz/docs/rules/no-unused-state
4482
4579
  */
4483
- 'react/jsx-max-depth'?: Linter.RuleEntry<ReactJsxMaxDepth>;
4580
+ 'react/no-unused-state'?: Linter.RuleEntry<[]>;
4484
4581
  /**
4485
- * Enforce maximum of props on a single line in JSX
4486
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-props-per-line.md
4582
+ * Replaces usage of 'useContext' with 'use'.
4583
+ * @see https://eslint-react.xyz/docs/rules/no-use-context
4487
4584
  */
4488
- 'react/jsx-max-props-per-line'?: Linter.RuleEntry<ReactJsxMaxPropsPerLine>;
4585
+ 'react/no-use-context'?: Linter.RuleEntry<[]>;
4489
4586
  /**
4490
- * Require or prevent a new line after jsx elements and expressions.
4491
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-newline.md
4587
+ * Enforces destructuring assignment for component props and context.
4588
+ * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
4492
4589
  */
4493
- 'react/jsx-newline'?: Linter.RuleEntry<ReactJsxNewline>;
4590
+ 'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
4494
4591
  /**
4495
- * Disallow `.bind()` or arrow functions in JSX props
4496
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-bind.md
4592
+ * Enforces importing React via a namespace import.
4593
+ * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
4497
4594
  */
4498
- 'react/jsx-no-bind'?: Linter.RuleEntry<ReactJsxNoBind>;
4595
+ 'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
4499
4596
  /**
4500
- * Disallow comments from being inserted as text nodes
4501
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md
4597
+ * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
4598
+ * @see https://eslint-react.xyz/docs/rules/purity
4502
4599
  */
4503
- 'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
4600
+ 'react/purity'?: Linter.RuleEntry<[]>;
4504
4601
  /**
4505
- * Disallows JSX context provider values from taking values that will cause needless rerenders
4506
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-constructed-context-values.md
4602
+ * Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
4603
+ * @see https://eslint-react.xyz/docs/rules/refs
4507
4604
  */
4508
- 'react/jsx-no-constructed-context-values'?: Linter.RuleEntry<[]>;
4605
+ 'react/refs'?: Linter.RuleEntry<[]>;
4509
4606
  /**
4510
- * Disallow duplicate properties in JSX
4511
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md
4607
+ * Validates and transforms React Client/Server Function definitions.
4608
+ * @see https://eslint-react.xyz/docs/rules/function-definition
4512
4609
  */
4513
- 'react/jsx-no-duplicate-props'?: Linter.RuleEntry<ReactJsxNoDuplicateProps>;
4610
+ 'react/rsc-function-definition'?: Linter.RuleEntry<[]>;
4514
4611
  /**
4515
- * Disallow problematic leaked values from being rendered
4516
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-leaked-render.md
4612
+ * Enforces the Rules of Hooks.
4613
+ * @see https://react.dev/reference/rules/rules-of-hooks
4517
4614
  */
4518
- 'react/jsx-no-leaked-render'?: Linter.RuleEntry<ReactJsxNoLeakedRender>;
4615
+ 'react/rules-of-hooks'?: Linter.RuleEntry<ReactRulesOfHooks>;
4519
4616
  /**
4520
- * Disallow usage of string literals in JSX
4521
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-literals.md
4617
+ * Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
4618
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-effect
4522
4619
  */
4523
- 'react/jsx-no-literals'?: Linter.RuleEntry<ReactJsxNoLiterals>;
4620
+ 'react/set-state-in-effect'?: Linter.RuleEntry<[]>;
4524
4621
  /**
4525
- * Disallow usage of `javascript:` URLs
4526
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-script-url.md
4622
+ * Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
4623
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-render
4527
4624
  */
4528
- 'react/jsx-no-script-url'?: Linter.RuleEntry<ReactJsxNoScriptUrl>;
4625
+ 'react/set-state-in-render'?: Linter.RuleEntry<[]>;
4529
4626
  /**
4530
- * Disallow `target="_blank"` attribute without `rel="noreferrer"`
4531
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md
4627
+ * Validates against syntax that React Compiler does not support.
4628
+ * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
4532
4629
  */
4533
- 'react/jsx-no-target-blank'?: Linter.RuleEntry<ReactJsxNoTargetBlank>;
4630
+ 'react/unsupported-syntax'?: Linter.RuleEntry<[]>;
4534
4631
  /**
4535
- * Disallow undeclared variables in JSX
4536
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md
4632
+ * Validates that 'useMemo' is called with a callback that returns a value.
4633
+ * @see https://eslint-react.xyz/docs/rules/use-memo
4537
4634
  */
4538
- 'react/jsx-no-undef'?: Linter.RuleEntry<ReactJsxNoUndef>;
4635
+ 'react/use-memo'?: Linter.RuleEntry<[]>;
4539
4636
  /**
4540
- * Disallow unnecessary fragments
4541
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-useless-fragment.md
4637
+ * Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
4638
+ * @see https://eslint-react.xyz/docs/rules/use-state
4542
4639
  */
4543
- 'react/jsx-no-useless-fragment'?: Linter.RuleEntry<ReactJsxNoUselessFragment>;
4640
+ 'react/use-state'?: Linter.RuleEntry<ReactUseState>;
4544
4641
  /**
4545
- * Require one JSX element per line
4546
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-one-expression-per-line.md
4642
+ * Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'.
4643
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
4547
4644
  */
4548
- 'react/jsx-one-expression-per-line'?: Linter.RuleEntry<ReactJsxOneExpressionPerLine>;
4645
+ 'react/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
4549
4646
  /**
4550
- * Enforce PascalCase for user-defined JSX components
4551
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-pascal-case.md
4647
+ * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
4648
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
4552
4649
  */
4553
- 'react/jsx-pascal-case'?: Linter.RuleEntry<ReactJsxPascalCase>;
4650
+ 'react/web-api-no-leaked-interval'?: Linter.RuleEntry<[]>;
4554
4651
  /**
4555
- * Disallow multiple spaces between inline JSX props
4556
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-multi-spaces.md
4652
+ * Enforces that every 'ResizeObserver' created in a component or custom hook has a corresponding 'ResizeObserver.disconnect()'.
4653
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
4557
4654
  */
4558
- 'react/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]>;
4655
+ 'react/web-api-no-leaked-resize-observer'?: Linter.RuleEntry<[]>;
4559
4656
  /**
4560
- * Disallow JSX prop spreading the same identifier multiple times
4561
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spread-multi.md
4657
+ * Enforces that every 'setTimeout' in a component or custom hook has a corresponding 'clearTimeout'.
4658
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
4562
4659
  */
4563
- 'react/jsx-props-no-spread-multi'?: Linter.RuleEntry<[]>;
4660
+ 'react/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
4564
4661
  /**
4565
- * Disallow JSX prop spreading
4566
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spreading.md
4662
+ * Disallows higher order functions that define components or hooks inside them.
4663
+ * @see https://eslint-react.xyz/docs/rules/component-hook-factories
4567
4664
  */
4568
- 'react/jsx-props-no-spreading'?: Linter.RuleEntry<ReactJsxPropsNoSpreading>;
4665
+ 'react/x-component-hook-factories'?: Linter.RuleEntry<[]>;
4569
4666
  /**
4570
- * Enforce defaultProps declarations alphabetical sorting
4571
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-default-props.md
4572
- * @deprecated
4667
+ * Validates usage of Error Boundaries instead of try/catch for errors in child components.
4668
+ * @see https://eslint-react.xyz/docs/rules/error-boundaries
4573
4669
  */
4574
- 'react/jsx-sort-default-props'?: Linter.RuleEntry<ReactJsxSortDefaultProps>;
4670
+ 'react/x-error-boundaries'?: Linter.RuleEntry<[]>;
4575
4671
  /**
4576
- * Enforce props alphabetical sorting
4577
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-props.md
4672
+ * Verifies the list of dependencies for Hooks like 'useEffect' and similar.
4673
+ * @see https://github.com/facebook/react/issues/14920
4578
4674
  */
4579
- 'react/jsx-sort-props'?: Linter.RuleEntry<ReactJsxSortProps>;
4675
+ 'react/x-exhaustive-deps'?: Linter.RuleEntry<ReactXExhaustiveDeps>;
4580
4676
  /**
4581
- * Enforce spacing before closing bracket in JSX
4582
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-space-before-closing.md
4583
- * @deprecated
4677
+ * Validates against mutating props, state, and other values that are immutable.
4678
+ * @see https://eslint-react.xyz/docs/rules/immutability
4584
4679
  */
4585
- 'react/jsx-space-before-closing'?: Linter.RuleEntry<ReactJsxSpaceBeforeClosing>;
4680
+ 'react/x-immutability'?: Linter.RuleEntry<[]>;
4586
4681
  /**
4587
- * Enforce whitespace in and around the JSX opening and closing brackets
4588
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-tag-spacing.md
4682
+ * Disallows accessing 'this.state' inside 'setState' calls.
4683
+ * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
4589
4684
  */
4590
- 'react/jsx-tag-spacing'?: Linter.RuleEntry<ReactJsxTagSpacing>;
4685
+ 'react/x-no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
4591
4686
  /**
4592
- * Disallow React to be incorrectly marked as unused
4593
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-react.md
4687
+ * Disallows using an item's index in the array as its key.
4688
+ * @see https://eslint-react.xyz/docs/rules/no-array-index-key
4594
4689
  */
4595
- 'react/jsx-uses-react'?: Linter.RuleEntry<[]>;
4690
+ 'react/x-no-array-index-key'?: Linter.RuleEntry<[]>;
4596
4691
  /**
4597
- * Disallow variables used in JSX to be incorrectly marked as unused
4598
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-vars.md
4692
+ * Disallows the use of 'Children.count' from the 'react' package.
4693
+ * @see https://eslint-react.xyz/docs/rules/no-children-count
4599
4694
  */
4600
- 'react/jsx-uses-vars'?: Linter.RuleEntry<[]>;
4695
+ 'react/x-no-children-count'?: Linter.RuleEntry<[]>;
4601
4696
  /**
4602
- * Disallow missing parentheses around multiline JSX
4603
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-wrap-multilines.md
4697
+ * Disallows the use of 'Children.forEach' from the 'react' package.
4698
+ * @see https://eslint-react.xyz/docs/rules/no-children-for-each
4604
4699
  */
4605
- 'react/jsx-wrap-multilines'?: Linter.RuleEntry<ReactJsxWrapMultilines>;
4700
+ 'react/x-no-children-for-each'?: Linter.RuleEntry<[]>;
4606
4701
  /**
4607
- * Disallow when this.state is accessed within setState
4608
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-access-state-in-setstate.md
4702
+ * Disallows the use of 'Children.map' from the 'react' package.
4703
+ * @see https://eslint-react.xyz/docs/rules/no-children-map
4609
4704
  */
4610
- 'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
4705
+ 'react/x-no-children-map'?: Linter.RuleEntry<[]>;
4611
4706
  /**
4612
- * Disallow adjacent inline elements not separated by whitespace.
4613
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-adjacent-inline-elements.md
4707
+ * Disallows the use of 'Children.only' from the 'react' package.
4708
+ * @see https://eslint-react.xyz/docs/rules/no-children-only
4614
4709
  */
4615
- 'react/no-adjacent-inline-elements'?: Linter.RuleEntry<[]>;
4710
+ 'react/x-no-children-only'?: Linter.RuleEntry<[]>;
4616
4711
  /**
4617
- * Disallow usage of Array index in keys
4618
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-array-index-key.md
4712
+ * Disallows the use of 'Children.toArray' from the 'react' package.
4713
+ * @see https://eslint-react.xyz/docs/rules/no-children-to-array
4619
4714
  */
4620
- 'react/no-array-index-key'?: Linter.RuleEntry<[]>;
4715
+ 'react/x-no-children-to-array'?: Linter.RuleEntry<[]>;
4621
4716
  /**
4622
- * Lifecycle methods should be methods on the prototype, not class fields
4623
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-arrow-function-lifecycle.md
4717
+ * Disallows class components except for error boundaries.
4718
+ * @see https://eslint-react.xyz/docs/rules/no-class-component
4624
4719
  */
4625
- 'react/no-arrow-function-lifecycle'?: Linter.RuleEntry<[]>;
4720
+ 'react/x-no-class-component'?: Linter.RuleEntry<[]>;
4626
4721
  /**
4627
- * Disallow passing of children as props
4628
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md
4722
+ * Disallows 'cloneElement'.
4723
+ * @see https://eslint-react.xyz/docs/rules/no-clone-element
4629
4724
  */
4630
- 'react/no-children-prop'?: Linter.RuleEntry<ReactNoChildrenProp>;
4725
+ 'react/x-no-clone-element'?: Linter.RuleEntry<[]>;
4631
4726
  /**
4632
- * Disallow usage of dangerous JSX properties
4633
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger.md
4727
+ * Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
4728
+ * @see https://eslint-react.xyz/docs/rules/no-component-will-mount
4634
4729
  */
4635
- 'react/no-danger'?: Linter.RuleEntry<ReactNoDanger>;
4730
+ 'react/x-no-component-will-mount'?: Linter.RuleEntry<[]>;
4636
4731
  /**
4637
- * Disallow when a DOM element is using both children and dangerouslySetInnerHTML
4638
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md
4732
+ * Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
4733
+ * @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
4639
4734
  */
4640
- 'react/no-danger-with-children'?: Linter.RuleEntry<[]>;
4735
+ 'react/x-no-component-will-receive-props'?: Linter.RuleEntry<[]>;
4641
4736
  /**
4642
- * Disallow usage of deprecated methods
4643
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-deprecated.md
4737
+ * Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
4738
+ * @see https://eslint-react.xyz/docs/rules/no-component-will-update
4644
4739
  */
4645
- 'react/no-deprecated'?: Linter.RuleEntry<[]>;
4740
+ 'react/x-no-component-will-update'?: Linter.RuleEntry<[]>;
4646
4741
  /**
4647
- * Disallow usage of setState in componentDidMount
4648
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-mount-set-state.md
4742
+ * Replaces usage of '<Context.Provider>' with '<Context>'.
4743
+ * @see https://eslint-react.xyz/docs/rules/no-context-provider
4649
4744
  */
4650
- 'react/no-did-mount-set-state'?: Linter.RuleEntry<ReactNoDidMountSetState>;
4745
+ 'react/x-no-context-provider'?: Linter.RuleEntry<[]>;
4651
4746
  /**
4652
- * Disallow usage of setState in componentDidUpdate
4653
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-update-set-state.md
4747
+ * Disallows 'createRef' in function components.
4748
+ * @see https://eslint-react.xyz/docs/rules/no-create-ref
4654
4749
  */
4655
- 'react/no-did-update-set-state'?: Linter.RuleEntry<ReactNoDidUpdateSetState>;
4750
+ 'react/x-no-create-ref'?: Linter.RuleEntry<[]>;
4656
4751
  /**
4657
- * Disallow direct mutation of this.state
4658
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md
4752
+ * Disallows direct mutation of 'this.state'.
4753
+ * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
4659
4754
  */
4660
- 'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
4755
+ 'react/x-no-direct-mutation-state'?: Linter.RuleEntry<[]>;
4661
4756
  /**
4662
- * Disallow usage of findDOMNode
4663
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md
4757
+ * Prevents duplicate 'key' props on sibling elements when rendering lists.
4758
+ * @see https://eslint-react.xyz/docs/rules/no-duplicate-key
4664
4759
  */
4665
- 'react/no-find-dom-node'?: Linter.RuleEntry<[]>;
4760
+ 'react/x-no-duplicate-key'?: Linter.RuleEntry<[]>;
4666
4761
  /**
4667
- * Disallow usage of invalid attributes
4668
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-invalid-html-attribute.md
4762
+ * Replaces usage of 'forwardRef' with passing 'ref' as a prop.
4763
+ * @see https://eslint-react.xyz/docs/rules/no-forward-ref
4669
4764
  */
4670
- 'react/no-invalid-html-attribute'?: Linter.RuleEntry<ReactNoInvalidHtmlAttribute>;
4765
+ 'react/x-no-forward-ref'?: Linter.RuleEntry<[]>;
4671
4766
  /**
4672
- * Disallow usage of isMounted
4673
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md
4767
+ * Prevents implicitly passing the 'children' prop to components.
4768
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-children
4674
4769
  */
4675
- 'react/no-is-mounted'?: Linter.RuleEntry<[]>;
4770
+ 'react/x-no-implicit-children'?: Linter.RuleEntry<[]>;
4676
4771
  /**
4677
- * Disallow multiple component definition per file
4678
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-multi-comp.md
4772
+ * Prevents implicitly passing the 'key' prop to components.
4773
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-key
4679
4774
  */
4680
- 'react/no-multi-comp'?: Linter.RuleEntry<ReactNoMultiComp>;
4775
+ 'react/x-no-implicit-key'?: Linter.RuleEntry<[]>;
4681
4776
  /**
4682
- * Enforce that namespaces are not used in React elements
4683
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-namespace.md
4777
+ * Prevents implicitly passing the 'ref' prop to components.
4778
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-ref
4684
4779
  */
4685
- 'react/no-namespace'?: Linter.RuleEntry<[]>;
4780
+ 'react/x-no-implicit-ref'?: Linter.RuleEntry<[]>;
4686
4781
  /**
4687
- * Disallow usage of referential-type variables as default param in functional component
4688
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-object-type-as-default-prop.md
4782
+ * Prevents problematic leaked values from being rendered.
4783
+ * @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
4689
4784
  */
4690
- 'react/no-object-type-as-default-prop'?: Linter.RuleEntry<[]>;
4785
+ 'react/x-no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
4691
4786
  /**
4692
- * Disallow usage of shouldComponentUpdate when extending React.PureComponent
4693
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-redundant-should-component-update.md
4787
+ * Enforces that all components have a 'displayName' that can be used in DevTools.
4788
+ * @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
4694
4789
  */
4695
- 'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
4790
+ 'react/x-no-missing-component-display-name'?: Linter.RuleEntry<[]>;
4696
4791
  /**
4697
- * Disallow usage of the return value of ReactDOM.render
4698
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md
4792
+ * Enforces that all contexts have a 'displayName' that can be used in DevTools.
4793
+ * @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
4699
4794
  */
4700
- 'react/no-render-return-value'?: Linter.RuleEntry<[]>;
4795
+ 'react/x-no-missing-context-display-name'?: Linter.RuleEntry<[]>;
4701
4796
  /**
4702
- * Disallow usage of setState
4703
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-set-state.md
4797
+ * Disallows missing 'key' on items in list rendering.
4798
+ * @see https://eslint-react.xyz/docs/rules/no-missing-key
4704
4799
  */
4705
- 'react/no-set-state'?: Linter.RuleEntry<[]>;
4800
+ 'react/x-no-missing-key'?: Linter.RuleEntry<[]>;
4706
4801
  /**
4707
- * Disallow using string references
4708
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md
4802
+ * Prevents incorrect usage of 'captureOwnerStack'.
4803
+ * @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
4709
4804
  */
4710
- 'react/no-string-refs'?: Linter.RuleEntry<ReactNoStringRefs>;
4805
+ 'react/x-no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
4711
4806
  /**
4712
- * Disallow `this` from being used in stateless functional components
4713
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-this-in-sfc.md
4807
+ * Disallows nesting component definitions inside other components.
4808
+ * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
4714
4809
  */
4715
- 'react/no-this-in-sfc'?: Linter.RuleEntry<[]>;
4810
+ 'react/x-no-nested-component-definitions'?: Linter.RuleEntry<[]>;
4716
4811
  /**
4717
- * Disallow common typos
4718
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-typos.md
4812
+ * Disallows nesting lazy component declarations inside other components or hooks.
4813
+ * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
4719
4814
  */
4720
- 'react/no-typos'?: Linter.RuleEntry<[]>;
4815
+ 'react/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
4721
4816
  /**
4722
- * Disallow unescaped HTML entities from appearing in markup
4723
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md
4817
+ * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
4818
+ * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
4724
4819
  */
4725
- 'react/no-unescaped-entities'?: Linter.RuleEntry<ReactNoUnescapedEntities>;
4820
+ 'react/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
4726
4821
  /**
4727
- * Disallow usage of unknown DOM property
4728
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md
4822
+ * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
4823
+ * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
4729
4824
  */
4730
- 'react/no-unknown-property'?: Linter.RuleEntry<ReactNoUnknownProperty>;
4825
+ 'react/x-no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
4731
4826
  /**
4732
- * Disallow usage of unsafe lifecycle methods
4733
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unsafe.md
4827
+ * Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
4828
+ * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
4734
4829
  */
4735
- 'react/no-unsafe'?: Linter.RuleEntry<ReactNoUnsafe>;
4830
+ 'react/x-no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
4736
4831
  /**
4737
- * Disallow creating unstable components inside components
4738
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unstable-nested-components.md
4832
+ * Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
4833
+ * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
4739
4834
  */
4740
- 'react/no-unstable-nested-components'?: Linter.RuleEntry<ReactNoUnstableNestedComponents>;
4835
+ 'react/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
4741
4836
  /**
4742
- * Disallow declaring unused methods of component class
4743
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-class-component-methods.md
4837
+ * Disallows unnecessary usage of 'useCallback'.
4838
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
4744
4839
  */
4745
- 'react/no-unused-class-component-methods'?: Linter.RuleEntry<[]>;
4840
+ 'react/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
4746
4841
  /**
4747
- * Disallow definitions of unused propTypes
4748
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-prop-types.md
4842
+ * Disallows unnecessary usage of 'useMemo'.
4843
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
4749
4844
  */
4750
- 'react/no-unused-prop-types'?: Linter.RuleEntry<ReactNoUnusedPropTypes>;
4845
+ 'react/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
4751
4846
  /**
4752
- * Disallow definitions of unused state
4753
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-state.md
4847
+ * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
4848
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
4754
4849
  */
4755
- 'react/no-unused-state'?: Linter.RuleEntry<[]>;
4850
+ 'react/x-no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
4756
4851
  /**
4757
- * Disallow usage of setState in componentWillUpdate
4758
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-will-update-set-state.md
4852
+ * Warns about the use of 'UNSAFE_componentWillMount' in class components.
4853
+ * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
4759
4854
  */
4760
- 'react/no-will-update-set-state'?: Linter.RuleEntry<ReactNoWillUpdateSetState>;
4855
+ 'react/x-no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
4761
4856
  /**
4762
- * Enforce ES5 or ES6 class for React Components
4763
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-es6-class.md
4857
+ * Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
4858
+ * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
4764
4859
  */
4765
- 'react/prefer-es6-class'?: Linter.RuleEntry<ReactPreferEs6Class>;
4860
+ 'react/x-no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
4766
4861
  /**
4767
- * Prefer exact proptype definitions
4768
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-exact-props.md
4862
+ * Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
4863
+ * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
4769
4864
  */
4770
- 'react/prefer-exact-props'?: Linter.RuleEntry<[]>;
4865
+ 'react/x-no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
4771
4866
  /**
4772
- * Enforce that props are read-only
4773
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-read-only-props.md
4867
+ * Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
4868
+ * @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
4774
4869
  */
4775
- 'react/prefer-read-only-props'?: Linter.RuleEntry<[]>;
4870
+ 'react/x-no-unstable-context-value'?: Linter.RuleEntry<[]>;
4776
4871
  /**
4777
- * Enforce stateless components to be written as a pure function
4778
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-stateless-function.md
4872
+ * Prevents using referential-type values as default props in object destructuring.
4873
+ * @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
4779
4874
  */
4780
- 'react/prefer-stateless-function'?: Linter.RuleEntry<ReactPreferStatelessFunction>;
4875
+ 'react/x-no-unstable-default-props'?: Linter.RuleEntry<ReactXNoUnstableDefaultProps>;
4781
4876
  /**
4782
- * Disallow missing props validation in a React component definition
4783
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prop-types.md
4877
+ * Warns about unused class component methods and properties.
4878
+ * @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
4784
4879
  */
4785
- 'react/prop-types'?: Linter.RuleEntry<ReactPropTypes>;
4880
+ 'react/x-no-unused-class-component-members'?: Linter.RuleEntry<[]>;
4786
4881
  /**
4787
- * Disallow missing React when using JSX
4788
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/react-in-jsx-scope.md
4882
+ * Warns about component props that are defined but never used.
4883
+ * @see https://eslint-react.xyz/docs/rules/no-unused-props
4789
4884
  */
4790
- 'react/react-in-jsx-scope'?: Linter.RuleEntry<[]>;
4885
+ 'react/x-no-unused-props'?: Linter.RuleEntry<[]>;
4791
4886
  /**
4792
- * Enforce a defaultProps definition for every prop that is not a required prop
4793
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-default-props.md
4887
+ * Warns about unused class component state.
4888
+ * @see https://eslint-react.xyz/docs/rules/no-unused-state
4794
4889
  */
4795
- 'react/require-default-props'?: Linter.RuleEntry<ReactRequireDefaultProps>;
4890
+ 'react/x-no-unused-state'?: Linter.RuleEntry<[]>;
4796
4891
  /**
4797
- * Enforce React components to have a shouldComponentUpdate method
4798
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-optimization.md
4892
+ * Replaces usage of 'useContext' with 'use'.
4893
+ * @see https://eslint-react.xyz/docs/rules/no-use-context
4799
4894
  */
4800
- 'react/require-optimization'?: Linter.RuleEntry<ReactRequireOptimization>;
4895
+ 'react/x-no-use-context'?: Linter.RuleEntry<[]>;
4801
4896
  /**
4802
- * Enforce ES5 or ES6 class for returning value in render function
4803
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md
4897
+ * Enforces destructuring assignment for component props and context.
4898
+ * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
4804
4899
  */
4805
- 'react/require-render-return'?: Linter.RuleEntry<[]>;
4900
+ 'react/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
4806
4901
  /**
4807
- * Disallow extra closing tags for components without children
4808
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/self-closing-comp.md
4902
+ * Enforces importing React via a namespace import.
4903
+ * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
4809
4904
  */
4810
- 'react/self-closing-comp'?: Linter.RuleEntry<ReactSelfClosingComp>;
4905
+ 'react/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
4811
4906
  /**
4812
- * Enforce component methods order
4813
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-comp.md
4907
+ * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
4908
+ * @see https://eslint-react.xyz/docs/rules/purity
4814
4909
  */
4815
- 'react/sort-comp'?: Linter.RuleEntry<ReactSortComp>;
4910
+ 'react/x-purity'?: Linter.RuleEntry<[]>;
4816
4911
  /**
4817
- * Enforce defaultProps declarations alphabetical sorting
4818
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-default-props.md
4912
+ * Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
4913
+ * @see https://eslint-react.xyz/docs/rules/refs
4819
4914
  */
4820
- 'react/sort-default-props'?: Linter.RuleEntry<ReactSortDefaultProps>;
4915
+ 'react/x-refs'?: Linter.RuleEntry<[]>;
4821
4916
  /**
4822
- * Enforce propTypes declarations alphabetical sorting
4823
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-prop-types.md
4917
+ * Enforces the Rules of Hooks.
4918
+ * @see https://react.dev/reference/rules/rules-of-hooks
4919
+ */
4920
+ 'react/x-rules-of-hooks'?: Linter.RuleEntry<ReactXRulesOfHooks>;
4921
+ /**
4922
+ * Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
4923
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-effect
4824
4924
  */
4825
- 'react/sort-prop-types'?: Linter.RuleEntry<ReactSortPropTypes>;
4925
+ 'react/x-set-state-in-effect'?: Linter.RuleEntry<[]>;
4826
4926
  /**
4827
- * Enforce class component state initialization style
4828
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/state-in-constructor.md
4927
+ * Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
4928
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-render
4829
4929
  */
4830
- 'react/state-in-constructor'?: Linter.RuleEntry<ReactStateInConstructor>;
4930
+ 'react/x-set-state-in-render'?: Linter.RuleEntry<[]>;
4831
4931
  /**
4832
- * Enforces where React component static properties should be positioned.
4833
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/static-property-placement.md
4932
+ * Validates against syntax that React Compiler does not support.
4933
+ * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
4834
4934
  */
4835
- 'react/static-property-placement'?: Linter.RuleEntry<ReactStaticPropertyPlacement>;
4935
+ 'react/x-unsupported-syntax'?: Linter.RuleEntry<[]>;
4836
4936
  /**
4837
- * Enforce style prop value is an object
4838
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/style-prop-object.md
4937
+ * Validates that 'useMemo' is called with a callback that returns a value.
4938
+ * @see https://eslint-react.xyz/docs/rules/use-memo
4839
4939
  */
4840
- 'react/style-prop-object'?: Linter.RuleEntry<ReactStylePropObject>;
4940
+ 'react/x-use-memo'?: Linter.RuleEntry<[]>;
4841
4941
  /**
4842
- * Disallow void DOM elements (e.g. `<img />`, `<br />`) from receiving children
4843
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/void-dom-elements-no-children.md
4942
+ * Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
4943
+ * @see https://eslint-react.xyz/docs/rules/use-state
4844
4944
  */
4845
- 'react/void-dom-elements-no-children'?: Linter.RuleEntry<[]>;
4945
+ 'react/x-use-state'?: Linter.RuleEntry<ReactXUseState>;
4846
4946
  /**
4847
4947
  * disallow confusing quantifiers
4848
4948
  * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
@@ -10444,6 +10544,7 @@ type PerfectionistSortClasses = {
10444
10544
  matchesAstSelector?: string;
10445
10545
  };
10446
10546
  useExperimentalDependencyDetection?: boolean;
10547
+ newlinesBetweenOverloadSignatures?: ("ignore" | number);
10447
10548
  ignoreCallbackDependenciesPatterns?: (({
10448
10549
  pattern: string;
10449
10550
  flags?: string;
@@ -11807,6 +11908,7 @@ type PerfectionistSortModules = [] | [{
11807
11908
  })[];
11808
11909
  newlinesBetween?: ("ignore" | number);
11809
11910
  useExperimentalDependencyDetection?: boolean;
11911
+ newlinesBetweenOverloadSignatures?: ("ignore" | number);
11810
11912
  partitionByComment?: (boolean | (({
11811
11913
  pattern: string;
11812
11914
  flags?: string;
@@ -12806,492 +12908,54 @@ type Quotes = [] | [("single" | "double" | "backtick")] | [("single" | "double"
12806
12908
  avoidEscape?: boolean;
12807
12909
  allowTemplateLiterals?: boolean;
12808
12910
  })]; // ----- radix -----
12809
- type Radix = [] | [("always" | "as-needed")]; // ----- react-hooks/automatic-effect-dependencies -----
12810
- type ReactHooksAutomaticEffectDependencies = [] | [{
12811
- [k: string]: unknown | undefined;
12812
- }]; // ----- react-hooks/capitalized-calls -----
12813
- type ReactHooksCapitalizedCalls = [] | [{
12814
- [k: string]: unknown | undefined;
12815
- }]; // ----- react-hooks/component-hook-factories -----
12816
- type ReactHooksComponentHookFactories = [] | [{
12817
- [k: string]: unknown | undefined;
12818
- }]; // ----- react-hooks/config -----
12819
- type ReactHooksConfig = [] | [{
12820
- [k: string]: unknown | undefined;
12821
- }]; // ----- react-hooks/error-boundaries -----
12822
- type ReactHooksErrorBoundaries = [] | [{
12823
- [k: string]: unknown | undefined;
12824
- }]; // ----- react-hooks/exhaustive-deps -----
12825
- type ReactHooksExhaustiveDeps = [] | [{
12826
- additionalHooks?: string;
12827
- enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
12828
- experimental_autoDependenciesHooks?: string[];
12829
- requireExplicitEffectDeps?: boolean;
12830
- }]; // ----- react-hooks/fbt -----
12831
- type ReactHooksFbt = [] | [{
12832
- [k: string]: unknown | undefined;
12833
- }]; // ----- react-hooks/fire -----
12834
- type ReactHooksFire = [] | [{
12835
- [k: string]: unknown | undefined;
12836
- }]; // ----- react-hooks/gating -----
12837
- type ReactHooksGating = [] | [{
12838
- [k: string]: unknown | undefined;
12839
- }]; // ----- react-hooks/globals -----
12840
- type ReactHooksGlobals = [] | [{
12841
- [k: string]: unknown | undefined;
12842
- }]; // ----- react-hooks/hooks -----
12843
- type ReactHooksHooks = [] | [{
12844
- [k: string]: unknown | undefined;
12845
- }]; // ----- react-hooks/immutability -----
12846
- type ReactHooksImmutability = [] | [{
12847
- [k: string]: unknown | undefined;
12848
- }]; // ----- react-hooks/incompatible-library -----
12849
- type ReactHooksIncompatibleLibrary = [] | [{
12850
- [k: string]: unknown | undefined;
12851
- }]; // ----- react-hooks/invariant -----
12852
- type ReactHooksInvariant = [] | [{
12853
- [k: string]: unknown | undefined;
12854
- }]; // ----- react-hooks/memoized-effect-dependencies -----
12855
- type ReactHooksMemoizedEffectDependencies = [] | [{
12856
- [k: string]: unknown | undefined;
12857
- }]; // ----- react-hooks/no-deriving-state-in-effects -----
12858
- type ReactHooksNoDerivingStateInEffects = [] | [{
12859
- [k: string]: unknown | undefined;
12860
- }]; // ----- react-hooks/preserve-manual-memoization -----
12861
- type ReactHooksPreserveManualMemoization = [] | [{
12862
- [k: string]: unknown | undefined;
12863
- }]; // ----- react-hooks/purity -----
12864
- type ReactHooksPurity = [] | [{
12865
- [k: string]: unknown | undefined;
12866
- }]; // ----- react-hooks/refs -----
12867
- type ReactHooksRefs = [] | [{
12868
- [k: string]: unknown | undefined;
12869
- }]; // ----- react-hooks/rule-suppression -----
12870
- type ReactHooksRuleSuppression = [] | [{
12871
- [k: string]: unknown | undefined;
12872
- }]; // ----- react-hooks/rules-of-hooks -----
12873
- type ReactHooksRulesOfHooks = [] | [{
12874
- additionalHooks?: string;
12875
- }]; // ----- react-hooks/set-state-in-effect -----
12876
- type ReactHooksSetStateInEffect = [] | [{
12877
- [k: string]: unknown | undefined;
12878
- }]; // ----- react-hooks/set-state-in-render -----
12879
- type ReactHooksSetStateInRender = [] | [{
12880
- [k: string]: unknown | undefined;
12881
- }]; // ----- react-hooks/static-components -----
12882
- type ReactHooksStaticComponents = [] | [{
12883
- [k: string]: unknown | undefined;
12884
- }]; // ----- react-hooks/syntax -----
12885
- type ReactHooksSyntax = [] | [{
12886
- [k: string]: unknown | undefined;
12887
- }]; // ----- react-hooks/todo -----
12888
- type ReactHooksTodo = [] | [{
12889
- [k: string]: unknown | undefined;
12890
- }]; // ----- react-hooks/unsupported-syntax -----
12891
- type ReactHooksUnsupportedSyntax = [] | [{
12892
- [k: string]: unknown | undefined;
12893
- }]; // ----- react-hooks/use-memo -----
12894
- type ReactHooksUseMemo = [] | [{
12895
- [k: string]: unknown | undefined;
12896
- }]; // ----- react-hooks/void-use-memo -----
12897
- type ReactHooksVoidUseMemo = [] | [{
12898
- [k: string]: unknown | undefined;
12899
- }]; // ----- react-refresh/only-export-components -----
12911
+ type Radix = [] | [("always" | "as-needed")]; // ----- react-refresh/only-export-components -----
12900
12912
  type ReactRefreshOnlyExportComponents = [] | [{
12901
12913
  extraHOCs?: string[];
12902
12914
  allowExportNames?: string[];
12903
12915
  allowConstantExport?: boolean;
12904
12916
  checkJS?: boolean;
12905
- }]; // ----- react/boolean-prop-naming -----
12906
- type ReactBooleanPropNaming = [] | [{
12907
- propTypeNames?: [string, ...(string)[]];
12908
- rule?: string;
12909
- message?: string;
12910
- validateNested?: boolean;
12911
- }]; // ----- react/button-has-type -----
12912
- type ReactButtonHasType = [] | [{
12913
- button?: boolean;
12914
- submit?: boolean;
12915
- reset?: boolean;
12916
- }]; // ----- react/checked-requires-onchange-or-readonly -----
12917
- type ReactCheckedRequiresOnchangeOrReadonly = [] | [{
12918
- ignoreMissingProperties?: boolean;
12919
- ignoreExclusiveCheckedAttribute?: boolean;
12920
- }]; // ----- react/default-props-match-prop-types -----
12921
- type ReactDefaultPropsMatchPropTypes = [] | [{
12922
- allowRequiredDefaults?: boolean;
12923
- }]; // ----- react/destructuring-assignment -----
12924
- type ReactDestructuringAssignment = [] | [("always" | "never")] | [("always" | "never"), {
12925
- ignoreClassFields?: boolean;
12926
- destructureInSignature?: ("always" | "ignore");
12927
- }]; // ----- react/display-name -----
12928
- type ReactDisplayName = [] | [{
12929
- ignoreTranspilerName?: boolean;
12930
- checkContextObjects?: boolean;
12931
- }]; // ----- react/forbid-component-props -----
12932
- type ReactForbidComponentProps = [] | [{
12933
- forbid?: (string | {
12934
- propName?: string;
12935
- allowedFor?: string[];
12936
- allowedForPatterns?: string[];
12937
- message?: string;
12938
- } | ({
12939
- [k: string]: unknown | undefined;
12940
- } | {
12941
- [k: string]: unknown | undefined;
12942
- }) | {
12943
- propNamePattern?: string;
12944
- allowedFor?: string[];
12945
- allowedForPatterns?: string[];
12946
- message?: string;
12947
- } | ({
12948
- [k: string]: unknown | undefined;
12949
- } | {
12950
- [k: string]: unknown | undefined;
12951
- }))[];
12952
- [k: string]: unknown | undefined;
12953
- }]; // ----- react/forbid-dom-props -----
12954
- type ReactForbidDomProps = [] | [{
12955
- forbid?: (string | {
12956
- propName?: string;
12957
- disallowedFor?: string[];
12958
- message?: string;
12959
- [k: string]: unknown | undefined;
12960
- })[];
12961
- }]; // ----- react/forbid-elements -----
12962
- type ReactForbidElements = [] | [{
12963
- forbid?: (string | {
12964
- element: string;
12965
- message?: string;
12966
- })[];
12967
- }]; // ----- react/forbid-foreign-prop-types -----
12968
- type ReactForbidForeignPropTypes = [] | [{
12969
- allowInPropTypes?: boolean;
12970
- }]; // ----- react/forbid-prop-types -----
12971
- type ReactForbidPropTypes = [] | [{
12972
- forbid?: string[];
12973
- checkContextTypes?: boolean;
12974
- checkChildContextTypes?: boolean;
12975
- [k: string]: unknown | undefined;
12976
- }]; // ----- react/function-component-definition -----
12977
- type ReactFunctionComponentDefinition = [] | [{
12978
- namedComponents?: (("function-declaration" | "arrow-function" | "function-expression") | ("function-declaration" | "arrow-function" | "function-expression")[]);
12979
- unnamedComponents?: (("arrow-function" | "function-expression") | ("arrow-function" | "function-expression")[]);
12980
- [k: string]: unknown | undefined;
12981
- }]; // ----- react/hook-use-state -----
12982
- type ReactHookUseState = [] | [{
12983
- allowDestructuredState?: boolean;
12984
- }]; // ----- react/jsx-boolean-value -----
12985
- type ReactJsxBooleanValue = ([] | [("always" | "never")] | [] | ["always"] | ["always", {
12986
- never?: string[];
12987
- assumeUndefinedIsFalse?: boolean;
12988
- }] | [] | ["never"] | ["never", {
12989
- always?: string[];
12990
- assumeUndefinedIsFalse?: boolean;
12991
- }]); // ----- react/jsx-closing-bracket-location -----
12992
- type ReactJsxClosingBracketLocation = [] | [(("after-props" | "props-aligned" | "tag-aligned" | "line-aligned") | {
12993
- location?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned");
12994
- } | {
12995
- nonEmpty?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned" | false);
12996
- selfClosing?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned" | false);
12997
- })]; // ----- react/jsx-closing-tag-location -----
12998
- type ReactJsxClosingTagLocation = [] | [(("tag-aligned" | "line-aligned") | {
12999
- location?: ("tag-aligned" | "line-aligned");
13000
- })]; // ----- react/jsx-curly-brace-presence -----
13001
- type ReactJsxCurlyBracePresence = [] | [({
13002
- props?: ("always" | "never" | "ignore");
13003
- children?: ("always" | "never" | "ignore");
13004
- propElementValues?: ("always" | "never" | "ignore");
13005
- } | ("always" | "never" | "ignore"))]; // ----- react/jsx-curly-newline -----
13006
- type ReactJsxCurlyNewline = [] | [(("consistent" | "never") | {
13007
- singleline?: ("consistent" | "require" | "forbid");
13008
- multiline?: ("consistent" | "require" | "forbid");
13009
- })]; // ----- react/jsx-curly-spacing -----
13010
- type ReactJsxCurlySpacing = [] | [((_ReactJsxCurlySpacing_BasicConfig & {
13011
- attributes?: _ReactJsxCurlySpacingBasicConfigOrBoolean;
13012
- children?: _ReactJsxCurlySpacingBasicConfigOrBoolean;
13013
- [k: string]: unknown | undefined;
13014
- }) | ("always" | "never"))] | [((_ReactJsxCurlySpacing_BasicConfig & {
13015
- attributes?: _ReactJsxCurlySpacingBasicConfigOrBoolean;
13016
- children?: _ReactJsxCurlySpacingBasicConfigOrBoolean;
13017
- [k: string]: unknown | undefined;
13018
- }) | ("always" | "never")), {
13019
- allowMultiline?: boolean;
13020
- spacing?: {
13021
- objectLiterals?: ("always" | "never");
13022
- [k: string]: unknown | undefined;
13023
- };
13024
- }];
13025
- type _ReactJsxCurlySpacingBasicConfigOrBoolean = (_ReactJsxCurlySpacing_BasicConfig | boolean);
13026
- interface _ReactJsxCurlySpacing_BasicConfig {
13027
- when?: ("always" | "never");
13028
- allowMultiline?: boolean;
13029
- spacing?: {
13030
- objectLiterals?: ("always" | "never");
13031
- [k: string]: unknown | undefined;
13032
- };
13033
- [k: string]: unknown | undefined;
13034
- } // ----- react/jsx-equals-spacing -----
13035
- type ReactJsxEqualsSpacing = [] | [("always" | "never")]; // ----- react/jsx-filename-extension -----
13036
- type ReactJsxFilenameExtension = [] | [{
13037
- allow?: ("always" | "as-needed");
13038
- extensions?: string[];
13039
- ignoreFilesWithoutCode?: boolean;
13040
- }]; // ----- react/jsx-first-prop-new-line -----
13041
- type ReactJsxFirstPropNewLine = [] | [("always" | "never" | "multiline" | "multiline-multiprop" | "multiprop")]; // ----- react/jsx-fragments -----
13042
- type ReactJsxFragments = [] | [("syntax" | "element")]; // ----- react/jsx-handler-names -----
13043
- type ReactJsxHandlerNames = [] | [({
13044
- eventHandlerPrefix?: string;
13045
- eventHandlerPropPrefix?: string;
13046
- checkLocalVariables?: boolean;
13047
- checkInlineFunction?: boolean;
13048
- ignoreComponentNames?: string[];
13049
- } | {
13050
- eventHandlerPrefix?: string;
13051
- eventHandlerPropPrefix?: false;
13052
- checkLocalVariables?: boolean;
13053
- checkInlineFunction?: boolean;
13054
- ignoreComponentNames?: string[];
13055
- } | {
13056
- eventHandlerPrefix?: false;
13057
- eventHandlerPropPrefix?: string;
13058
- checkLocalVariables?: boolean;
13059
- checkInlineFunction?: boolean;
13060
- ignoreComponentNames?: string[];
13061
- } | {
13062
- checkLocalVariables?: boolean;
13063
- } | {
13064
- checkInlineFunction?: boolean;
13065
- } | {
13066
- ignoreComponentNames?: string[];
13067
- [k: string]: unknown | undefined;
13068
- })]; // ----- react/jsx-indent -----
13069
- type ReactJsxIndent = [] | [("tab" | number)] | [("tab" | number), {
13070
- checkAttributes?: boolean;
13071
- indentLogicalExpressions?: boolean;
13072
- }]; // ----- react/jsx-indent-props -----
13073
- type ReactJsxIndentProps = [] | [(("tab" | "first") | number | {
13074
- indentMode?: (("tab" | "first") | number);
13075
- ignoreTernaryOperator?: boolean;
13076
- [k: string]: unknown | undefined;
13077
- })]; // ----- react/jsx-key -----
13078
- type ReactJsxKey = [] | [{
13079
- checkFragmentShorthand?: boolean;
13080
- checkKeyMustBeforeSpread?: boolean;
13081
- warnOnDuplicates?: boolean;
13082
- }]; // ----- react/jsx-max-depth -----
13083
- type ReactJsxMaxDepth = [] | [{
13084
- max?: number;
13085
- }]; // ----- react/jsx-max-props-per-line -----
13086
- type ReactJsxMaxPropsPerLine = [] | [({
13087
- maximum?: {
13088
- single?: number;
13089
- multi?: number;
13090
- [k: string]: unknown | undefined;
13091
- };
13092
- } | {
13093
- maximum?: number;
13094
- when?: ("always" | "multiline");
13095
- })]; // ----- react/jsx-newline -----
13096
- type ReactJsxNewline = [] | [{
13097
- prevent?: boolean;
13098
- allowMultilines?: boolean;
13099
- }]; // ----- react/jsx-no-bind -----
13100
- type ReactJsxNoBind = [] | [{
13101
- allowArrowFunctions?: boolean;
13102
- allowBind?: boolean;
13103
- allowFunctions?: boolean;
13104
- ignoreRefs?: boolean;
13105
- ignoreDOMComponents?: boolean;
13106
- }]; // ----- react/jsx-no-duplicate-props -----
13107
- type ReactJsxNoDuplicateProps = [] | [{
13108
- ignoreCase?: boolean;
13109
- }]; // ----- react/jsx-no-leaked-render -----
13110
- type ReactJsxNoLeakedRender = [] | [{
13111
- validStrategies?: ("ternary" | "coerce")[];
13112
- }]; // ----- react/jsx-no-literals -----
13113
- type ReactJsxNoLiterals = [] | [{
13114
- elementOverrides?: {
13115
- [k: string]: {
13116
- applyToNestedElements?: boolean;
13117
- noStrings?: boolean;
13118
- allowedStrings?: string[];
13119
- ignoreProps?: boolean;
13120
- noAttributeStrings?: boolean;
13121
- [k: string]: unknown | undefined;
13122
- };
13123
- };
13124
- noStrings?: boolean;
13125
- allowedStrings?: string[];
13126
- ignoreProps?: boolean;
13127
- noAttributeStrings?: boolean;
13128
- }]; // ----- react/jsx-no-script-url -----
13129
- type ReactJsxNoScriptUrl = ([] | [{
13130
- name: string;
13131
- props: string[];
13132
- }[]] | [{
13133
- name: string;
13134
- props: string[];
13135
- }[], {
13136
- includeFromSettings?: boolean;
13137
- [k: string]: unknown | undefined;
13138
- }] | [] | [{
13139
- includeFromSettings?: boolean;
13140
- [k: string]: unknown | undefined;
13141
- }]); // ----- react/jsx-no-target-blank -----
13142
- type ReactJsxNoTargetBlank = [] | [{
13143
- allowReferrer?: boolean;
13144
- enforceDynamicLinks?: ("always" | "never");
13145
- warnOnSpreadAttributes?: boolean;
13146
- links?: boolean;
13147
- forms?: boolean;
13148
- }]; // ----- react/jsx-no-undef -----
13149
- type ReactJsxNoUndef = [] | [{
13150
- allowGlobals?: boolean;
12917
+ }]; // ----- react/dom-no-unknown-property -----
12918
+ type ReactDomNoUnknownProperty = [] | [{
12919
+ ignore?: string[];
12920
+ requireDataLowercase?: boolean;
12921
+ }]; // ----- react/exhaustive-deps -----
12922
+ type ReactExhaustiveDeps = [] | [{
12923
+ additionalHooks?: string;
12924
+ enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
12925
+ experimental_autoDependenciesHooks?: string[];
12926
+ requireExplicitEffectDeps?: boolean;
13151
12927
  }]; // ----- react/jsx-no-useless-fragment -----
13152
12928
  type ReactJsxNoUselessFragment = [] | [{
12929
+ allowEmptyFragment?: boolean;
13153
12930
  allowExpressions?: boolean;
13154
- [k: string]: unknown | undefined;
13155
- }]; // ----- react/jsx-one-expression-per-line -----
13156
- type ReactJsxOneExpressionPerLine = [] | [{
13157
- allow?: ("none" | "literal" | "single-child" | "non-jsx");
13158
- }]; // ----- react/jsx-pascal-case -----
13159
- type ReactJsxPascalCase = [] | [{
13160
- allowAllCaps?: boolean;
13161
- allowLeadingUnderscore?: boolean;
13162
- allowNamespace?: boolean;
13163
- ignore?: [] | [string];
13164
- }]; // ----- react/jsx-props-no-spreading -----
13165
- type ReactJsxPropsNoSpreading = [] | [({
13166
- html?: ("enforce" | "ignore");
13167
- custom?: ("enforce" | "ignore");
13168
- explicitSpread?: ("enforce" | "ignore");
13169
- exceptions?: string[];
13170
- [k: string]: unknown | undefined;
13171
- } & {
13172
- [k: string]: unknown | undefined;
13173
- })]; // ----- react/jsx-sort-default-props -----
13174
- type ReactJsxSortDefaultProps = [] | [{
13175
- ignoreCase?: boolean;
13176
- }]; // ----- react/jsx-sort-props -----
13177
- type ReactJsxSortProps = [] | [{
13178
- callbacksLast?: boolean;
13179
- shorthandFirst?: boolean;
13180
- shorthandLast?: boolean;
13181
- multiline?: ("ignore" | "first" | "last");
13182
- ignoreCase?: boolean;
13183
- noSortAlphabetically?: boolean;
13184
- reservedFirst?: (unknown[] | boolean);
13185
- locale?: string;
13186
- }]; // ----- react/jsx-space-before-closing -----
13187
- type ReactJsxSpaceBeforeClosing = [] | [("always" | "never")]; // ----- react/jsx-tag-spacing -----
13188
- type ReactJsxTagSpacing = [] | [{
13189
- closingSlash?: ("always" | "never" | "allow");
13190
- beforeSelfClosing?: ("always" | "proportional-always" | "never" | "allow");
13191
- afterOpening?: ("always" | "allow-multiline" | "never" | "allow");
13192
- beforeClosing?: ("always" | "proportional-always" | "never" | "allow");
13193
- }]; // ----- react/jsx-wrap-multilines -----
13194
- type ReactJsxWrapMultilines = [] | [{
13195
- declaration?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
13196
- assignment?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
13197
- return?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
13198
- arrow?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
13199
- condition?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
13200
- logical?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
13201
- prop?: (true | false | "ignore" | "parens" | "parens-new-line" | "never");
13202
- }]; // ----- react/no-children-prop -----
13203
- type ReactNoChildrenProp = [] | [{
13204
- allowFunctions?: boolean;
13205
- }]; // ----- react/no-danger -----
13206
- type ReactNoDanger = [] | [{
13207
- customComponentNames?: string[];
13208
- [k: string]: unknown | undefined;
13209
- }]; // ----- react/no-did-mount-set-state -----
13210
- type ReactNoDidMountSetState = [] | ["disallow-in-func"]; // ----- react/no-did-update-set-state -----
13211
- type ReactNoDidUpdateSetState = [] | ["disallow-in-func"]; // ----- react/no-invalid-html-attribute -----
13212
- type ReactNoInvalidHtmlAttribute = [] | [("rel")[]]; // ----- react/no-multi-comp -----
13213
- type ReactNoMultiComp = [] | [{
13214
- ignoreStateless?: boolean;
13215
- }]; // ----- react/no-string-refs -----
13216
- type ReactNoStringRefs = [] | [{
13217
- noTemplateLiterals?: boolean;
13218
- }]; // ----- react/no-unescaped-entities -----
13219
- type ReactNoUnescapedEntities = [] | [{
13220
- forbid?: (string | {
13221
- char?: string;
13222
- alternatives?: string[];
13223
- [k: string]: unknown | undefined;
13224
- })[];
13225
- }]; // ----- react/no-unknown-property -----
13226
- type ReactNoUnknownProperty = [] | [{
13227
- ignore?: string[];
13228
- requireDataLowercase?: boolean;
13229
- }]; // ----- react/no-unsafe -----
13230
- type ReactNoUnsafe = [] | [{
13231
- checkAliases?: boolean;
13232
- }]; // ----- react/no-unstable-nested-components -----
13233
- type ReactNoUnstableNestedComponents = [] | [{
13234
- customValidators?: string[];
13235
- allowAsProps?: boolean;
13236
- propNamePattern?: string;
13237
- }]; // ----- react/no-unused-prop-types -----
13238
- type ReactNoUnusedPropTypes = [] | [{
13239
- ignore?: string[];
13240
- customValidators?: string[];
13241
- skipShapeProps?: boolean;
13242
- }]; // ----- react/no-will-update-set-state -----
13243
- type ReactNoWillUpdateSetState = [] | ["disallow-in-func"]; // ----- react/prefer-es6-class -----
13244
- type ReactPreferEs6Class = [] | [("always" | "never")]; // ----- react/prefer-stateless-function -----
13245
- type ReactPreferStatelessFunction = [] | [{
13246
- ignorePureComponents?: boolean;
13247
- }]; // ----- react/prop-types -----
13248
- type ReactPropTypes = [] | [{
13249
- ignore?: string[];
13250
- customValidators?: string[];
13251
- skipUndeclared?: boolean;
13252
- }]; // ----- react/require-default-props -----
13253
- type ReactRequireDefaultProps = [] | [{
13254
- forbidDefaultForRequired?: boolean;
13255
- classes?: ("defaultProps" | "ignore");
13256
- functions?: ("defaultArguments" | "defaultProps" | "ignore");
13257
- ignoreFunctionalComponents?: boolean;
13258
- }]; // ----- react/require-optimization -----
13259
- type ReactRequireOptimization = [] | [{
13260
- allowDecorators?: string[];
13261
- }]; // ----- react/self-closing-comp -----
13262
- type ReactSelfClosingComp = [] | [{
13263
- component?: boolean;
13264
- html?: boolean;
13265
- }]; // ----- react/sort-comp -----
13266
- type ReactSortComp = [] | [{
13267
- order?: string[];
13268
- groups?: {
13269
- [k: string]: string[];
13270
- };
13271
- }]; // ----- react/sort-default-props -----
13272
- type ReactSortDefaultProps = [] | [{
13273
- ignoreCase?: boolean;
13274
- }]; // ----- react/sort-prop-types -----
13275
- type ReactSortPropTypes = [] | [{
13276
- requiredFirst?: boolean;
13277
- callbacksLast?: boolean;
13278
- ignoreCase?: boolean;
13279
- noSortAlphabetically?: boolean;
13280
- sortShapeProp?: boolean;
13281
- checkTypes?: boolean;
13282
- }]; // ----- react/state-in-constructor -----
13283
- type ReactStateInConstructor = [] | [("always" | "never")]; // ----- react/static-property-placement -----
13284
- type ReactStaticPropertyPlacement = [] | [("static public field" | "static getter" | "property assignment")] | [("static public field" | "static getter" | "property assignment"), {
13285
- propTypes?: ("static public field" | "static getter" | "property assignment");
13286
- defaultProps?: ("static public field" | "static getter" | "property assignment");
13287
- childContextTypes?: ("static public field" | "static getter" | "property assignment");
13288
- contextTypes?: ("static public field" | "static getter" | "property assignment");
13289
- contextType?: ("static public field" | "static getter" | "property assignment");
13290
- displayName?: ("static public field" | "static getter" | "property assignment");
13291
- }]; // ----- react/style-prop-object -----
13292
- type ReactStylePropObject = [] | [{
13293
- allow?: string[];
13294
- [k: string]: unknown | undefined;
12931
+ }]; // ----- react/no-unstable-default-props -----
12932
+ type ReactNoUnstableDefaultProps = [] | [{
12933
+ safeDefaultProps?: string[];
12934
+ }]; // ----- react/rules-of-hooks -----
12935
+ type ReactRulesOfHooks = [] | [{
12936
+ additionalHooks?: string;
12937
+ }]; // ----- react/use-state -----
12938
+ type ReactUseState = [] | [{
12939
+ enforceAssignment?: boolean;
12940
+ enforceLazyInitialization?: boolean;
12941
+ enforceSetterName?: boolean;
12942
+ }]; // ----- react/x-exhaustive-deps -----
12943
+ type ReactXExhaustiveDeps = [] | [{
12944
+ additionalHooks?: string;
12945
+ enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
12946
+ experimental_autoDependenciesHooks?: string[];
12947
+ requireExplicitEffectDeps?: boolean;
12948
+ }]; // ----- react/x-no-unstable-default-props -----
12949
+ type ReactXNoUnstableDefaultProps = [] | [{
12950
+ safeDefaultProps?: string[];
12951
+ }]; // ----- react/x-rules-of-hooks -----
12952
+ type ReactXRulesOfHooks = [] | [{
12953
+ additionalHooks?: string;
12954
+ }]; // ----- react/x-use-state -----
12955
+ type ReactXUseState = [] | [{
12956
+ enforceAssignment?: boolean;
12957
+ enforceLazyInitialization?: boolean;
12958
+ enforceSetterName?: boolean;
13295
12959
  }]; // ----- regexp/hexadecimal-escape -----
13296
12960
  type RegexpHexadecimalEscape = [] | [("always" | "never")]; // ----- regexp/letter-case -----
13297
12961
  type RegexpLetterCase = [] | [{
@@ -16997,7 +16661,7 @@ declare function prettier(options?: PrettierOptions): Promise<FlatConfigItem[]>;
16997
16661
  declare function promise(): Promise<FlatConfigItem[]>;
16998
16662
  //#endregion
16999
16663
  //#region src/configs/react.d.ts
17000
- declare function react(options?: OptionsHasTypeScript & OptionsOverrides & OptionsFiles & OptionsHasTanStackReactQuery): Promise<FlatConfigItem[]>;
16664
+ declare function react(options?: OptionsOverrides & OptionsFiles & OptionsHasTanStackReactQuery): Promise<FlatConfigItem[]>;
17001
16665
  //#endregion
17002
16666
  //#region src/configs/regexp.d.ts
17003
16667
  declare function regexp(options?: OptionsOverrides): FlatConfigItem[];