@ncontiero/eslint-config 7.2.0 → 7.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +561 -852
- package/dist/index.mjs +112 -154
- 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<[]>;
|
|
4236
|
+
/**
|
|
4237
|
+
* Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'.
|
|
4238
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
4239
|
+
*/
|
|
4240
|
+
'react/dom-no-hydrate'?: Linter.RuleEntry<[]>;
|
|
4241
|
+
/**
|
|
4242
|
+
* Enforces an explicit 'type' attribute for 'button' elements.
|
|
4243
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
4244
|
+
*/
|
|
4245
|
+
'react/dom-no-missing-button-type'?: Linter.RuleEntry<[]>;
|
|
4246
|
+
/**
|
|
4247
|
+
* Enforces an explicit 'sandbox' attribute for 'iframe' elements.
|
|
4248
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
4249
|
+
*/
|
|
4250
|
+
'react/dom-no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
4251
|
+
/**
|
|
4252
|
+
* Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'.
|
|
4253
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
4254
|
+
*/
|
|
4255
|
+
'react/dom-no-render'?: Linter.RuleEntry<[]>;
|
|
4256
|
+
/**
|
|
4257
|
+
* Disallows the return value of 'ReactDOM.render'.
|
|
4258
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
4259
|
+
*/
|
|
4260
|
+
'react/dom-no-render-return-value'?: Linter.RuleEntry<[]>;
|
|
4261
|
+
/**
|
|
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<[]>;
|
|
4210
4266
|
/**
|
|
4211
|
-
*
|
|
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
|
|
4212
4269
|
*/
|
|
4213
|
-
'react
|
|
4270
|
+
'react/dom-no-string-style-prop'?: Linter.RuleEntry<[]>;
|
|
4214
4271
|
/**
|
|
4215
|
-
*
|
|
4272
|
+
* Disallows unknown 'DOM' properties.
|
|
4273
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
4216
4274
|
*/
|
|
4217
|
-
'react
|
|
4275
|
+
'react/dom-no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>;
|
|
4218
4276
|
/**
|
|
4219
|
-
*
|
|
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
|
|
4220
4279
|
*/
|
|
4221
|
-
'react
|
|
4280
|
+
'react/dom-no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
4222
4281
|
/**
|
|
4223
|
-
*
|
|
4282
|
+
* Disallows 'target="_blank"' without 'rel="noreferrer noopener"'.
|
|
4283
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
4224
4284
|
*/
|
|
4225
|
-
'react-
|
|
4285
|
+
'react/dom-no-unsafe-target-blank'?: Linter.RuleEntry<[]>;
|
|
4226
4286
|
/**
|
|
4227
|
-
*
|
|
4287
|
+
* Replaces usage of 'useFormState' with 'useActionState'.
|
|
4288
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
4228
4289
|
*/
|
|
4229
|
-
'react
|
|
4290
|
+
'react/dom-no-use-form-state'?: Linter.RuleEntry<[]>;
|
|
4230
4291
|
/**
|
|
4231
|
-
*
|
|
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
|
|
4310
|
+
'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>;
|
|
4235
4311
|
/**
|
|
4236
|
-
* Validates
|
|
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
|
|
4315
|
+
'react/immutability'?: Linter.RuleEntry<[]>;
|
|
4239
4316
|
/**
|
|
4240
|
-
*
|
|
4317
|
+
* Disallows passing 'children' as a prop.
|
|
4318
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
4241
4319
|
*/
|
|
4242
|
-
'react-
|
|
4320
|
+
'react/jsx-no-children-prop'?: Linter.RuleEntry<[]>;
|
|
4243
4321
|
/**
|
|
4244
|
-
*
|
|
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-
|
|
4325
|
+
'react/jsx-no-children-prop-with-children'?: Linter.RuleEntry<[]>;
|
|
4247
4326
|
/**
|
|
4248
|
-
*
|
|
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-
|
|
4330
|
+
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
4251
4331
|
/**
|
|
4252
|
-
*
|
|
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-
|
|
4335
|
+
'react/jsx-no-key-after-spread'?: Linter.RuleEntry<[]>;
|
|
4255
4336
|
/**
|
|
4256
|
-
*
|
|
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-
|
|
4340
|
+
'react/jsx-no-leaked-dollar'?: Linter.RuleEntry<[]>;
|
|
4259
4341
|
/**
|
|
4260
|
-
*
|
|
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
|
|
4345
|
+
'react/jsx-no-leaked-semicolon'?: Linter.RuleEntry<[]>;
|
|
4263
4346
|
/**
|
|
4264
|
-
*
|
|
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-
|
|
4350
|
+
'react/jsx-no-namespace'?: Linter.RuleEntry<[]>;
|
|
4267
4351
|
/**
|
|
4268
|
-
*
|
|
4352
|
+
* Disallows useless fragment elements.
|
|
4353
|
+
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
4269
4354
|
*/
|
|
4270
|
-
'react
|
|
4355
|
+
'react/jsx-no-useless-fragment'?: Linter.RuleEntry<ReactJsxNoUselessFragment>;
|
|
4271
4356
|
/**
|
|
4272
|
-
*
|
|
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
|
|
4360
|
+
'react/naming-convention-context-name'?: Linter.RuleEntry<[]>;
|
|
4275
4361
|
/**
|
|
4276
|
-
*
|
|
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
|
|
4365
|
+
'react/naming-convention-id-name'?: Linter.RuleEntry<[]>;
|
|
4279
4366
|
/**
|
|
4280
|
-
*
|
|
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-
|
|
4370
|
+
'react/naming-convention-ref-name'?: Linter.RuleEntry<[]>;
|
|
4283
4371
|
/**
|
|
4284
|
-
*
|
|
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-
|
|
4375
|
+
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
4287
4376
|
/**
|
|
4288
|
-
*
|
|
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
|
|
4380
|
+
'react/no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
4291
4381
|
/**
|
|
4292
|
-
*
|
|
4293
|
-
* @see https://react.
|
|
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
|
|
4385
|
+
'react/no-children-count'?: Linter.RuleEntry<[]>;
|
|
4296
4386
|
/**
|
|
4297
|
-
*
|
|
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
|
|
4390
|
+
'react/no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
4300
4391
|
/**
|
|
4301
|
-
*
|
|
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
|
|
4395
|
+
'react/no-children-map'?: Linter.RuleEntry<[]>;
|
|
4304
4396
|
/**
|
|
4305
|
-
*
|
|
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
|
|
4400
|
+
'react/no-children-only'?: Linter.RuleEntry<[]>;
|
|
4308
4401
|
/**
|
|
4309
|
-
*
|
|
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-
|
|
4405
|
+
'react/no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
4312
4406
|
/**
|
|
4313
|
-
*
|
|
4407
|
+
* Disallows class components except for error boundaries.
|
|
4408
|
+
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
4314
4409
|
*/
|
|
4315
|
-
'react-
|
|
4410
|
+
'react/no-class-component'?: Linter.RuleEntry<[]>;
|
|
4316
4411
|
/**
|
|
4317
|
-
*
|
|
4412
|
+
* Disallows 'cloneElement'.
|
|
4413
|
+
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
4318
4414
|
*/
|
|
4319
|
-
'react
|
|
4415
|
+
'react/no-clone-element'?: Linter.RuleEntry<[]>;
|
|
4320
4416
|
/**
|
|
4321
|
-
*
|
|
4417
|
+
* Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
|
|
4418
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
4322
4419
|
*/
|
|
4323
|
-
'react
|
|
4420
|
+
'react/no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
4324
4421
|
/**
|
|
4325
|
-
*
|
|
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
|
|
4328
|
-
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
4425
|
+
'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
4329
4426
|
/**
|
|
4330
|
-
*
|
|
4331
|
-
* @see https://
|
|
4427
|
+
* Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
|
|
4428
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
4332
4429
|
*/
|
|
4333
|
-
'react/
|
|
4430
|
+
'react/no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4334
4431
|
/**
|
|
4335
|
-
*
|
|
4336
|
-
* @see https://
|
|
4432
|
+
* Replaces usage of '<Context.Provider>' with '<Context>'.
|
|
4433
|
+
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
4337
4434
|
*/
|
|
4338
|
-
'react/
|
|
4435
|
+
'react/no-context-provider'?: Linter.RuleEntry<[]>;
|
|
4339
4436
|
/**
|
|
4340
|
-
*
|
|
4341
|
-
* @see https://
|
|
4437
|
+
* Disallows 'createRef' in function components.
|
|
4438
|
+
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
4342
4439
|
*/
|
|
4343
|
-
'react/
|
|
4440
|
+
'react/no-create-ref'?: Linter.RuleEntry<[]>;
|
|
4344
4441
|
/**
|
|
4345
|
-
*
|
|
4346
|
-
* @see https://
|
|
4442
|
+
* Disallows direct mutation of 'this.state'.
|
|
4443
|
+
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
4347
4444
|
*/
|
|
4348
|
-
'react/
|
|
4445
|
+
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
4349
4446
|
/**
|
|
4350
|
-
*
|
|
4351
|
-
* @see https://
|
|
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/
|
|
4450
|
+
'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
4354
4451
|
/**
|
|
4355
|
-
*
|
|
4356
|
-
* @see https://
|
|
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/
|
|
4455
|
+
'react/no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
4359
4456
|
/**
|
|
4360
|
-
*
|
|
4361
|
-
* @see https://
|
|
4457
|
+
* Prevents implicitly passing the 'children' prop to components.
|
|
4458
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-children
|
|
4362
4459
|
*/
|
|
4363
|
-
'react/
|
|
4460
|
+
'react/no-implicit-children'?: Linter.RuleEntry<[]>;
|
|
4364
4461
|
/**
|
|
4365
|
-
*
|
|
4366
|
-
* @see https://
|
|
4462
|
+
* Prevents implicitly passing the 'key' prop to components.
|
|
4463
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
4367
4464
|
*/
|
|
4368
|
-
'react/
|
|
4465
|
+
'react/no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
4369
4466
|
/**
|
|
4370
|
-
*
|
|
4371
|
-
* @see https://
|
|
4467
|
+
* Prevents implicitly passing the 'ref' prop to components.
|
|
4468
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-ref
|
|
4372
4469
|
*/
|
|
4373
|
-
'react/
|
|
4470
|
+
'react/no-implicit-ref'?: Linter.RuleEntry<[]>;
|
|
4374
4471
|
/**
|
|
4375
|
-
*
|
|
4376
|
-
* @see https://
|
|
4472
|
+
* Prevents problematic leaked values from being rendered.
|
|
4473
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
4377
4474
|
*/
|
|
4378
|
-
'react/
|
|
4475
|
+
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
4379
4476
|
/**
|
|
4380
|
-
*
|
|
4381
|
-
* @see https://
|
|
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/
|
|
4480
|
+
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
4384
4481
|
/**
|
|
4385
|
-
*
|
|
4386
|
-
* @see https://
|
|
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/
|
|
4485
|
+
'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
4389
4486
|
/**
|
|
4390
|
-
*
|
|
4391
|
-
* @see https://
|
|
4487
|
+
* Disallows missing 'key' on items in list rendering.
|
|
4488
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
4392
4489
|
*/
|
|
4393
|
-
'react/
|
|
4490
|
+
'react/no-missing-key'?: Linter.RuleEntry<[]>;
|
|
4394
4491
|
/**
|
|
4395
|
-
*
|
|
4396
|
-
* @see https://
|
|
4492
|
+
* Prevents incorrect usage of 'captureOwnerStack'.
|
|
4493
|
+
* @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
4397
4494
|
*/
|
|
4398
|
-
'react/
|
|
4495
|
+
'react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
4399
4496
|
/**
|
|
4400
|
-
*
|
|
4401
|
-
* @see https://
|
|
4497
|
+
* Disallows nesting component definitions inside other components.
|
|
4498
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
4402
4499
|
*/
|
|
4403
|
-
'react/
|
|
4500
|
+
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
4404
4501
|
/**
|
|
4405
|
-
*
|
|
4406
|
-
* @see https://
|
|
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/
|
|
4505
|
+
'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
4409
4506
|
/**
|
|
4410
|
-
*
|
|
4411
|
-
* @see https://
|
|
4507
|
+
* Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
|
|
4508
|
+
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
4412
4509
|
*/
|
|
4413
|
-
'react/
|
|
4510
|
+
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
|
|
4414
4511
|
/**
|
|
4415
|
-
*
|
|
4416
|
-
* @see https://
|
|
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/
|
|
4515
|
+
'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
4419
4516
|
/**
|
|
4420
|
-
*
|
|
4421
|
-
* @see https://
|
|
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/
|
|
4520
|
+
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
4424
4521
|
/**
|
|
4425
|
-
*
|
|
4426
|
-
* @see https://
|
|
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/
|
|
4525
|
+
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4429
4526
|
/**
|
|
4430
|
-
*
|
|
4431
|
-
* @see https://
|
|
4527
|
+
* Disallows unnecessary usage of 'useCallback'.
|
|
4528
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
4432
4529
|
*/
|
|
4433
|
-
'react/
|
|
4530
|
+
'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
4434
4531
|
/**
|
|
4435
|
-
*
|
|
4436
|
-
* @see https://
|
|
4532
|
+
* Disallows unnecessary usage of 'useMemo'.
|
|
4533
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
4437
4534
|
*/
|
|
4438
|
-
'react/
|
|
4535
|
+
'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
4439
4536
|
/**
|
|
4440
|
-
*
|
|
4441
|
-
* @see https://
|
|
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/
|
|
4540
|
+
'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
4444
4541
|
/**
|
|
4445
|
-
*
|
|
4446
|
-
* @see https://
|
|
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/
|
|
4545
|
+
'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
4449
4546
|
/**
|
|
4450
|
-
*
|
|
4451
|
-
* @see https://
|
|
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/
|
|
4550
|
+
'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
4454
4551
|
/**
|
|
4455
|
-
*
|
|
4456
|
-
* @see https://
|
|
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/
|
|
4555
|
+
'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4459
4556
|
/**
|
|
4460
|
-
*
|
|
4461
|
-
* @see https://
|
|
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/
|
|
4560
|
+
'react/no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
4464
4561
|
/**
|
|
4465
|
-
*
|
|
4466
|
-
* @see https://
|
|
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/
|
|
4565
|
+
'react/no-unstable-default-props'?: Linter.RuleEntry<ReactNoUnstableDefaultProps>;
|
|
4469
4566
|
/**
|
|
4470
|
-
*
|
|
4471
|
-
* @see https://
|
|
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/
|
|
4570
|
+
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
4474
4571
|
/**
|
|
4475
|
-
*
|
|
4476
|
-
* @see https://
|
|
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/
|
|
4575
|
+
'react/no-unused-props'?: Linter.RuleEntry<[]>;
|
|
4479
4576
|
/**
|
|
4480
|
-
*
|
|
4481
|
-
* @see https://
|
|
4577
|
+
* Warns about unused class component state.
|
|
4578
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
4482
4579
|
*/
|
|
4483
|
-
'react/
|
|
4580
|
+
'react/no-unused-state'?: Linter.RuleEntry<[]>;
|
|
4484
4581
|
/**
|
|
4485
|
-
*
|
|
4486
|
-
* @see https://
|
|
4582
|
+
* Replaces usage of 'useContext' with 'use'.
|
|
4583
|
+
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
4487
4584
|
*/
|
|
4488
|
-
'react/
|
|
4585
|
+
'react/no-use-context'?: Linter.RuleEntry<[]>;
|
|
4489
4586
|
/**
|
|
4490
|
-
*
|
|
4491
|
-
* @see https://
|
|
4587
|
+
* Enforces destructuring assignment for component props and context.
|
|
4588
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
4492
4589
|
*/
|
|
4493
|
-
'react/
|
|
4590
|
+
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
4494
4591
|
/**
|
|
4495
|
-
*
|
|
4496
|
-
* @see https://
|
|
4592
|
+
* Enforces importing React via a namespace import.
|
|
4593
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
4497
4594
|
*/
|
|
4498
|
-
'react/
|
|
4595
|
+
'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
4499
4596
|
/**
|
|
4500
|
-
*
|
|
4501
|
-
* @see https://
|
|
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/
|
|
4600
|
+
'react/purity'?: Linter.RuleEntry<[]>;
|
|
4504
4601
|
/**
|
|
4505
|
-
*
|
|
4506
|
-
* @see https://
|
|
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/
|
|
4605
|
+
'react/refs'?: Linter.RuleEntry<[]>;
|
|
4509
4606
|
/**
|
|
4510
|
-
*
|
|
4511
|
-
* @see https://
|
|
4607
|
+
* Validates and transforms React Client/Server Function definitions.
|
|
4608
|
+
* @see https://eslint-react.xyz/docs/rules/function-definition
|
|
4512
4609
|
*/
|
|
4513
|
-
'react/
|
|
4610
|
+
'react/rsc-function-definition'?: Linter.RuleEntry<[]>;
|
|
4514
4611
|
/**
|
|
4515
|
-
*
|
|
4516
|
-
* @see https://
|
|
4612
|
+
* Enforces the Rules of Hooks.
|
|
4613
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
4517
4614
|
*/
|
|
4518
|
-
'react/
|
|
4615
|
+
'react/rules-of-hooks'?: Linter.RuleEntry<ReactRulesOfHooks>;
|
|
4519
4616
|
/**
|
|
4520
|
-
*
|
|
4521
|
-
* @see https://
|
|
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/
|
|
4620
|
+
'react/set-state-in-effect'?: Linter.RuleEntry<[]>;
|
|
4524
4621
|
/**
|
|
4525
|
-
*
|
|
4526
|
-
* @see https://
|
|
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/
|
|
4625
|
+
'react/set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
4529
4626
|
/**
|
|
4530
|
-
*
|
|
4531
|
-
* @see https://
|
|
4627
|
+
* Validates against syntax that React Compiler does not support.
|
|
4628
|
+
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
4532
4629
|
*/
|
|
4533
|
-
'react/
|
|
4630
|
+
'react/unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
4534
4631
|
/**
|
|
4535
|
-
*
|
|
4536
|
-
* @see https://
|
|
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/
|
|
4635
|
+
'react/use-memo'?: Linter.RuleEntry<[]>;
|
|
4539
4636
|
/**
|
|
4540
|
-
*
|
|
4541
|
-
* @see https://
|
|
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/
|
|
4640
|
+
'react/use-state'?: Linter.RuleEntry<ReactUseState>;
|
|
4544
4641
|
/**
|
|
4545
|
-
*
|
|
4546
|
-
* @see https://
|
|
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/
|
|
4645
|
+
'react/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
|
|
4549
4646
|
/**
|
|
4550
|
-
*
|
|
4551
|
-
* @see https://
|
|
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/
|
|
4650
|
+
'react/web-api-no-leaked-interval'?: Linter.RuleEntry<[]>;
|
|
4554
4651
|
/**
|
|
4555
|
-
*
|
|
4556
|
-
* @see https://
|
|
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/
|
|
4655
|
+
'react/web-api-no-leaked-resize-observer'?: Linter.RuleEntry<[]>;
|
|
4559
4656
|
/**
|
|
4560
|
-
*
|
|
4561
|
-
* @see https://
|
|
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/
|
|
4660
|
+
'react/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
4564
4661
|
/**
|
|
4565
|
-
*
|
|
4566
|
-
* @see https://
|
|
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/
|
|
4665
|
+
'react/x-component-hook-factories'?: Linter.RuleEntry<[]>;
|
|
4569
4666
|
/**
|
|
4570
|
-
*
|
|
4571
|
-
* @see https://
|
|
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/
|
|
4670
|
+
'react/x-error-boundaries'?: Linter.RuleEntry<[]>;
|
|
4575
4671
|
/**
|
|
4576
|
-
*
|
|
4577
|
-
* @see https://github.com/
|
|
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/
|
|
4675
|
+
'react/x-exhaustive-deps'?: Linter.RuleEntry<ReactXExhaustiveDeps>;
|
|
4580
4676
|
/**
|
|
4581
|
-
*
|
|
4582
|
-
* @see https://
|
|
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/
|
|
4680
|
+
'react/x-immutability'?: Linter.RuleEntry<[]>;
|
|
4586
4681
|
/**
|
|
4587
|
-
*
|
|
4588
|
-
* @see https://
|
|
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/
|
|
4685
|
+
'react/x-no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
4591
4686
|
/**
|
|
4592
|
-
*
|
|
4593
|
-
* @see https://
|
|
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/
|
|
4690
|
+
'react/x-no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
4596
4691
|
/**
|
|
4597
|
-
*
|
|
4598
|
-
* @see https://
|
|
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/
|
|
4695
|
+
'react/x-no-children-count'?: Linter.RuleEntry<[]>;
|
|
4601
4696
|
/**
|
|
4602
|
-
*
|
|
4603
|
-
* @see https://
|
|
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/
|
|
4700
|
+
'react/x-no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
4606
4701
|
/**
|
|
4607
|
-
*
|
|
4608
|
-
* @see https://
|
|
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-
|
|
4705
|
+
'react/x-no-children-map'?: Linter.RuleEntry<[]>;
|
|
4611
4706
|
/**
|
|
4612
|
-
*
|
|
4613
|
-
* @see https://
|
|
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-
|
|
4710
|
+
'react/x-no-children-only'?: Linter.RuleEntry<[]>;
|
|
4616
4711
|
/**
|
|
4617
|
-
*
|
|
4618
|
-
* @see https://
|
|
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-
|
|
4715
|
+
'react/x-no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
4621
4716
|
/**
|
|
4622
|
-
*
|
|
4623
|
-
* @see https://
|
|
4717
|
+
* Disallows class components except for error boundaries.
|
|
4718
|
+
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
4624
4719
|
*/
|
|
4625
|
-
'react/no-
|
|
4720
|
+
'react/x-no-class-component'?: Linter.RuleEntry<[]>;
|
|
4626
4721
|
/**
|
|
4627
|
-
*
|
|
4628
|
-
* @see https://
|
|
4722
|
+
* Disallows 'cloneElement'.
|
|
4723
|
+
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
4629
4724
|
*/
|
|
4630
|
-
'react/no-
|
|
4725
|
+
'react/x-no-clone-element'?: Linter.RuleEntry<[]>;
|
|
4631
4726
|
/**
|
|
4632
|
-
*
|
|
4633
|
-
* @see https://
|
|
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-
|
|
4730
|
+
'react/x-no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
4636
4731
|
/**
|
|
4637
|
-
*
|
|
4638
|
-
* @see https://
|
|
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-
|
|
4735
|
+
'react/x-no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
4641
4736
|
/**
|
|
4642
|
-
*
|
|
4643
|
-
* @see https://
|
|
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-
|
|
4740
|
+
'react/x-no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4646
4741
|
/**
|
|
4647
|
-
*
|
|
4648
|
-
* @see https://
|
|
4742
|
+
* Replaces usage of '<Context.Provider>' with '<Context>'.
|
|
4743
|
+
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
4649
4744
|
*/
|
|
4650
|
-
'react/no-
|
|
4745
|
+
'react/x-no-context-provider'?: Linter.RuleEntry<[]>;
|
|
4651
4746
|
/**
|
|
4652
|
-
*
|
|
4653
|
-
* @see https://
|
|
4747
|
+
* Disallows 'createRef' in function components.
|
|
4748
|
+
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
4654
4749
|
*/
|
|
4655
|
-
'react/no-
|
|
4750
|
+
'react/x-no-create-ref'?: Linter.RuleEntry<[]>;
|
|
4656
4751
|
/**
|
|
4657
|
-
*
|
|
4658
|
-
* @see https://
|
|
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
|
-
*
|
|
4663
|
-
* @see https://
|
|
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-
|
|
4760
|
+
'react/x-no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
4666
4761
|
/**
|
|
4667
|
-
*
|
|
4668
|
-
* @see https://
|
|
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-
|
|
4765
|
+
'react/x-no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
4671
4766
|
/**
|
|
4672
|
-
*
|
|
4673
|
-
* @see https://
|
|
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-
|
|
4770
|
+
'react/x-no-implicit-children'?: Linter.RuleEntry<[]>;
|
|
4676
4771
|
/**
|
|
4677
|
-
*
|
|
4678
|
-
* @see https://
|
|
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-
|
|
4775
|
+
'react/x-no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
4681
4776
|
/**
|
|
4682
|
-
*
|
|
4683
|
-
* @see https://
|
|
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-
|
|
4780
|
+
'react/x-no-implicit-ref'?: Linter.RuleEntry<[]>;
|
|
4686
4781
|
/**
|
|
4687
|
-
*
|
|
4688
|
-
* @see https://
|
|
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-
|
|
4785
|
+
'react/x-no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
4691
4786
|
/**
|
|
4692
|
-
*
|
|
4693
|
-
* @see https://
|
|
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-
|
|
4790
|
+
'react/x-no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
4696
4791
|
/**
|
|
4697
|
-
*
|
|
4698
|
-
* @see https://
|
|
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-
|
|
4795
|
+
'react/x-no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
4701
4796
|
/**
|
|
4702
|
-
*
|
|
4703
|
-
* @see https://
|
|
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-
|
|
4800
|
+
'react/x-no-missing-key'?: Linter.RuleEntry<[]>;
|
|
4706
4801
|
/**
|
|
4707
|
-
*
|
|
4708
|
-
* @see https://
|
|
4802
|
+
* Prevents incorrect usage of 'captureOwnerStack'.
|
|
4803
|
+
* @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
4709
4804
|
*/
|
|
4710
|
-
'react/no-
|
|
4805
|
+
'react/x-no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
4711
4806
|
/**
|
|
4712
|
-
*
|
|
4713
|
-
* @see https://
|
|
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-
|
|
4810
|
+
'react/x-no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
4716
4811
|
/**
|
|
4717
|
-
*
|
|
4718
|
-
* @see https://
|
|
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-
|
|
4815
|
+
'react/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
4721
4816
|
/**
|
|
4722
|
-
*
|
|
4723
|
-
* @see https://
|
|
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-
|
|
4820
|
+
'react/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
|
|
4726
4821
|
/**
|
|
4727
|
-
*
|
|
4728
|
-
* @see https://
|
|
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-
|
|
4825
|
+
'react/x-no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
4731
4826
|
/**
|
|
4732
|
-
*
|
|
4733
|
-
* @see https://
|
|
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-
|
|
4830
|
+
'react/x-no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
4736
4831
|
/**
|
|
4737
|
-
*
|
|
4738
|
-
* @see https://
|
|
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-
|
|
4835
|
+
'react/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4741
4836
|
/**
|
|
4742
|
-
*
|
|
4743
|
-
* @see https://
|
|
4837
|
+
* Disallows unnecessary usage of 'useCallback'.
|
|
4838
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
4744
4839
|
*/
|
|
4745
|
-
'react/no-
|
|
4840
|
+
'react/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
4746
4841
|
/**
|
|
4747
|
-
*
|
|
4748
|
-
* @see https://
|
|
4842
|
+
* Disallows unnecessary usage of 'useMemo'.
|
|
4843
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
4749
4844
|
*/
|
|
4750
|
-
'react/no-
|
|
4845
|
+
'react/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
4751
4846
|
/**
|
|
4752
|
-
*
|
|
4753
|
-
* @see https://
|
|
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-
|
|
4850
|
+
'react/x-no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
4851
|
+
/**
|
|
4852
|
+
* Warns about the use of 'UNSAFE_componentWillMount' in class components.
|
|
4853
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
4854
|
+
*/
|
|
4855
|
+
'react/x-no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
4756
4856
|
/**
|
|
4757
|
-
*
|
|
4758
|
-
* @see https://
|
|
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
|
|
4759
4859
|
*/
|
|
4760
|
-
'react/no-will-
|
|
4860
|
+
'react/x-no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
4761
4861
|
/**
|
|
4762
|
-
*
|
|
4763
|
-
* @see https://
|
|
4862
|
+
* Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
|
|
4863
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
4764
4864
|
*/
|
|
4765
|
-
'react/
|
|
4865
|
+
'react/x-no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4766
4866
|
/**
|
|
4767
|
-
*
|
|
4768
|
-
* @see https://
|
|
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
|
|
4769
4869
|
*/
|
|
4770
|
-
'react/
|
|
4870
|
+
'react/x-no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
4771
4871
|
/**
|
|
4772
|
-
*
|
|
4773
|
-
* @see https://
|
|
4872
|
+
* Prevents using referential-type values as default props in object destructuring.
|
|
4873
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
4774
4874
|
*/
|
|
4775
|
-
'react/
|
|
4875
|
+
'react/x-no-unstable-default-props'?: Linter.RuleEntry<ReactXNoUnstableDefaultProps>;
|
|
4776
4876
|
/**
|
|
4777
|
-
*
|
|
4778
|
-
* @see https://
|
|
4877
|
+
* Warns about unused class component methods and properties.
|
|
4878
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
4779
4879
|
*/
|
|
4780
|
-
'react/
|
|
4880
|
+
'react/x-no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
4781
4881
|
/**
|
|
4782
|
-
*
|
|
4783
|
-
* @see https://
|
|
4882
|
+
* Warns about component props that are defined but never used.
|
|
4883
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
4784
4884
|
*/
|
|
4785
|
-
'react/
|
|
4885
|
+
'react/x-no-unused-props'?: Linter.RuleEntry<[]>;
|
|
4786
4886
|
/**
|
|
4787
|
-
*
|
|
4788
|
-
* @see https://
|
|
4887
|
+
* Warns about unused class component state.
|
|
4888
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
4789
4889
|
*/
|
|
4790
|
-
'react/
|
|
4890
|
+
'react/x-no-unused-state'?: Linter.RuleEntry<[]>;
|
|
4791
4891
|
/**
|
|
4792
|
-
*
|
|
4793
|
-
* @see https://
|
|
4892
|
+
* Replaces usage of 'useContext' with 'use'.
|
|
4893
|
+
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
4794
4894
|
*/
|
|
4795
|
-
'react/
|
|
4895
|
+
'react/x-no-use-context'?: Linter.RuleEntry<[]>;
|
|
4796
4896
|
/**
|
|
4797
|
-
*
|
|
4798
|
-
* @see https://
|
|
4897
|
+
* Enforces destructuring assignment for component props and context.
|
|
4898
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
4799
4899
|
*/
|
|
4800
|
-
'react/
|
|
4900
|
+
'react/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
4801
4901
|
/**
|
|
4802
|
-
*
|
|
4803
|
-
* @see https://
|
|
4902
|
+
* Enforces importing React via a namespace import.
|
|
4903
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
4804
4904
|
*/
|
|
4805
|
-
'react/
|
|
4905
|
+
'react/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
4806
4906
|
/**
|
|
4807
|
-
*
|
|
4808
|
-
* @see https://
|
|
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
|
|
4809
4909
|
*/
|
|
4810
|
-
'react/
|
|
4910
|
+
'react/x-purity'?: Linter.RuleEntry<[]>;
|
|
4811
4911
|
/**
|
|
4812
|
-
*
|
|
4813
|
-
* @see https://
|
|
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
|
|
4814
4914
|
*/
|
|
4815
|
-
'react/
|
|
4915
|
+
'react/x-refs'?: Linter.RuleEntry<[]>;
|
|
4816
4916
|
/**
|
|
4817
|
-
*
|
|
4818
|
-
* @see https://
|
|
4917
|
+
* Enforces the Rules of Hooks.
|
|
4918
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
4819
4919
|
*/
|
|
4820
|
-
'react/
|
|
4920
|
+
'react/x-rules-of-hooks'?: Linter.RuleEntry<ReactXRulesOfHooks>;
|
|
4821
4921
|
/**
|
|
4822
|
-
*
|
|
4823
|
-
* @see https://
|
|
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/
|
|
4925
|
+
'react/x-set-state-in-effect'?: Linter.RuleEntry<[]>;
|
|
4826
4926
|
/**
|
|
4827
|
-
*
|
|
4828
|
-
* @see https://
|
|
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-
|
|
4930
|
+
'react/x-set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
4831
4931
|
/**
|
|
4832
|
-
*
|
|
4833
|
-
* @see https://
|
|
4932
|
+
* Validates against syntax that React Compiler does not support.
|
|
4933
|
+
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
4834
4934
|
*/
|
|
4835
|
-
'react/
|
|
4935
|
+
'react/x-unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
4836
4936
|
/**
|
|
4837
|
-
*
|
|
4838
|
-
* @see https://
|
|
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/
|
|
4940
|
+
'react/x-use-memo'?: Linter.RuleEntry<[]>;
|
|
4841
4941
|
/**
|
|
4842
|
-
*
|
|
4843
|
-
* @see https://
|
|
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/
|
|
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-
|
|
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/
|
|
12906
|
-
type
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
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
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
}
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
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?:
|
|
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[];
|
|
@@ -17031,6 +16695,9 @@ declare const hasTailwind: boolean;
|
|
|
17031
16695
|
declare const hasTanStackReactQuery: boolean;
|
|
17032
16696
|
//#endregion
|
|
17033
16697
|
//#region src/factory.d.ts
|
|
16698
|
+
declare const defaultPluginRenaming: {
|
|
16699
|
+
"@eslint-react": string;
|
|
16700
|
+
};
|
|
17034
16701
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
17035
16702
|
declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
17036
16703
|
declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & Rules>;
|
|
@@ -17105,7 +16772,49 @@ declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
|
17105
16772
|
default: infer U;
|
|
17106
16773
|
} ? U : T>;
|
|
17107
16774
|
declare function ensurePackages(packages: (string | undefined)[]): void;
|
|
17108
|
-
|
|
16775
|
+
interface ComposerOptions {
|
|
16776
|
+
items: Awaitable<FlatConfigItem[]>[];
|
|
16777
|
+
pluginsNameMap?: Record<string, string>;
|
|
16778
|
+
}
|
|
16779
|
+
declare function composer({
|
|
16780
|
+
items,
|
|
16781
|
+
pluginsNameMap
|
|
16782
|
+
}: ComposerOptions): Promise<FlatConfigItem[]>;
|
|
16783
|
+
/**
|
|
16784
|
+
* Rename plugin prefixes in a rule object.
|
|
16785
|
+
* Accepts a map of prefixes to rename.
|
|
16786
|
+
*
|
|
16787
|
+
* @example
|
|
16788
|
+
* ```ts
|
|
16789
|
+
* import { renameRules } from "@ncontiero/eslint-config";
|
|
16790
|
+
*
|
|
16791
|
+
* export default [
|
|
16792
|
+
* {
|
|
16793
|
+
* rules: renameRules(
|
|
16794
|
+
* {
|
|
16795
|
+
* "@typescript-eslint/indent": "error",
|
|
16796
|
+
* },
|
|
16797
|
+
* { "@typescript-eslint": "ts" },
|
|
16798
|
+
* ),
|
|
16799
|
+
* },
|
|
16800
|
+
* ];
|
|
16801
|
+
* ```
|
|
16802
|
+
*/
|
|
16803
|
+
declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
16804
|
+
/**
|
|
16805
|
+
* Rename plugin names a flat configs array
|
|
16806
|
+
*
|
|
16807
|
+
* @example
|
|
16808
|
+
* ```ts
|
|
16809
|
+
* import { renamePluginInConfigs } from "@ncontiero/eslint-config";
|
|
16810
|
+
* import someConfigs from "./some-configs";
|
|
16811
|
+
*
|
|
16812
|
+
* export default renamePluginInConfigs(someConfigs, {
|
|
16813
|
+
* "@typescript-eslint": "ts",
|
|
16814
|
+
* });
|
|
16815
|
+
* ```
|
|
16816
|
+
*/
|
|
16817
|
+
declare function renamePluginInConfigs(configs: FlatConfigItem[], map: Record<string, string>): FlatConfigItem[];
|
|
17109
16818
|
declare function toArray<T>(value: T | T[]): T[];
|
|
17110
16819
|
//#endregion
|
|
17111
|
-
export { Awaitable, FlatConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_NODE_MODULES, GLOB_POSTCSS, GLOB_REACT, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_YAML, HTMLOptions, OptionsConfig, OptionsFiles, OptionsHasNextJs, OptionsHasRegexp, OptionsHasTanStackReactQuery, OptionsHasTypeScript, OptionsOverrides, OptionsTailwindCSS, OptionsTypeScriptParserOptions, OptionsTypescript, OptionsUnicorn, PrettierOptions, ResolvedOptions, Rules, StyleConfig, StyleOptions, combine, command, comments, composer, deMorgan, ensurePackages, getOverrides, hasNextJs, hasReact, hasTailwind, hasTanStackReactQuery, hasTypeScript, html, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, ncontiero, nextJs, node, parserPlain, perfectionist, prettier, promise, react, regexp, resolveSubOptions, restrictedSyntaxJs, sortPackageJson, sortPnpmWorkspace, sortTsconfig, tailwindcss, toArray, toml, typescript, unicorn, yml };
|
|
16820
|
+
export { Awaitable, ComposerOptions, FlatConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_NODE_MODULES, GLOB_POSTCSS, GLOB_REACT, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_YAML, HTMLOptions, OptionsConfig, OptionsFiles, OptionsHasNextJs, OptionsHasRegexp, OptionsHasTanStackReactQuery, OptionsHasTypeScript, OptionsOverrides, OptionsTailwindCSS, OptionsTypeScriptParserOptions, OptionsTypescript, OptionsUnicorn, PrettierOptions, ResolvedOptions, Rules, StyleConfig, StyleOptions, combine, command, comments, composer, deMorgan, defaultPluginRenaming, ensurePackages, getOverrides, hasNextJs, hasReact, hasTailwind, hasTanStackReactQuery, hasTypeScript, html, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, ncontiero, nextJs, node, parserPlain, perfectionist, prettier, promise, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, restrictedSyntaxJs, sortPackageJson, sortPnpmWorkspace, sortTsconfig, tailwindcss, toArray, toml, typescript, unicorn, yml };
|