@bfra.me/eslint-config 0.32.2 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +348 -100
- package/lib/index.js +7 -8
- package/package.json +20 -20
- package/src/configs/react.ts +5 -5
- package/src/configs/sort.ts +1 -0
- package/src/configs/typescript.ts +0 -1
- package/src/rules.d.ts +348 -100
package/lib/index.d.ts
CHANGED
|
@@ -191,6 +191,11 @@ interface Rules {
|
|
|
191
191
|
* @see https://eslint.style/rules/eol-last
|
|
192
192
|
*/
|
|
193
193
|
'@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>
|
|
194
|
+
/**
|
|
195
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
196
|
+
* @see https://eslint.style/rules/list-style
|
|
197
|
+
*/
|
|
198
|
+
'@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle>
|
|
194
199
|
/**
|
|
195
200
|
* Enforce line breaks between arguments of a function call
|
|
196
201
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -3692,6 +3697,11 @@ interface Rules {
|
|
|
3692
3697
|
* @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/prefer-tilde-range-version.html
|
|
3693
3698
|
*/
|
|
3694
3699
|
'node-dependencies/prefer-tilde-range-version'?: Linter.RuleEntry<[]>
|
|
3700
|
+
/**
|
|
3701
|
+
* Require provenance information for dependencies
|
|
3702
|
+
* @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/require-provenance-deps.html
|
|
3703
|
+
*/
|
|
3704
|
+
'node-dependencies/require-provenance-deps'?: Linter.RuleEntry<NodeDependenciesRequireProvenanceDeps>
|
|
3695
3705
|
/**
|
|
3696
3706
|
* enforce the versions of the engines of the dependencies to be compatible.
|
|
3697
3707
|
* @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/valid-engines.html
|
|
@@ -4200,11 +4210,6 @@ interface Rules {
|
|
|
4200
4210
|
* @see https://eslint.org/docs/latest/rules/radix
|
|
4201
4211
|
*/
|
|
4202
4212
|
'radix'?: Linter.RuleEntry<Radix>
|
|
4203
|
-
/**
|
|
4204
|
-
* Disallow `children` in void DOM elements.
|
|
4205
|
-
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
4206
|
-
*/
|
|
4207
|
-
'react-dom/no-children-in-void-dom-elements'?: Linter.RuleEntry<[]>
|
|
4208
4213
|
/**
|
|
4209
4214
|
* Disallow `dangerouslySetInnerHTML`.
|
|
4210
4215
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
@@ -4260,6 +4265,11 @@ interface Rules {
|
|
|
4260
4265
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
4261
4266
|
*/
|
|
4262
4267
|
'react-dom/no-script-url'?: Linter.RuleEntry<[]>
|
|
4268
|
+
/**
|
|
4269
|
+
* Disallows the use of string style prop.
|
|
4270
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
4271
|
+
*/
|
|
4272
|
+
'react-dom/no-string-style-prop'?: Linter.RuleEntry<[]>
|
|
4263
4273
|
/**
|
|
4264
4274
|
* Disallow unknown `DOM` property.
|
|
4265
4275
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
@@ -4286,70 +4296,128 @@ interface Rules {
|
|
|
4286
4296
|
*/
|
|
4287
4297
|
'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>
|
|
4288
4298
|
/**
|
|
4289
|
-
*
|
|
4290
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
4299
|
+
* Disallow direct calls to the `set` function of `useState` in `useEffect`.
|
|
4300
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
4291
4301
|
*/
|
|
4292
|
-
'react-hooks-extra/
|
|
4302
|
+
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
|
|
4293
4303
|
/**
|
|
4294
|
-
*
|
|
4295
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
4304
|
+
* Verifies that automatic effect dependencies are compiled if opted-in
|
|
4296
4305
|
*/
|
|
4297
|
-
'react-hooks
|
|
4306
|
+
'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>
|
|
4298
4307
|
/**
|
|
4299
|
-
*
|
|
4300
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
4308
|
+
* Validates against calling capitalized functions/methods instead of using JSX
|
|
4301
4309
|
*/
|
|
4302
|
-
'react-hooks
|
|
4310
|
+
'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>
|
|
4303
4311
|
/**
|
|
4304
|
-
*
|
|
4305
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
4312
|
+
* Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
|
|
4306
4313
|
*/
|
|
4307
|
-
'react-hooks
|
|
4314
|
+
'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>
|
|
4308
4315
|
/**
|
|
4309
|
-
*
|
|
4310
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
|
|
4316
|
+
* Validates the compiler configuration options
|
|
4311
4317
|
*/
|
|
4312
|
-
'react-hooks
|
|
4318
|
+
'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>
|
|
4313
4319
|
/**
|
|
4314
|
-
*
|
|
4315
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
4320
|
+
* Validates usage of error boundaries instead of try/catch for errors in child components
|
|
4316
4321
|
*/
|
|
4317
|
-
'react-hooks
|
|
4322
|
+
'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>
|
|
4318
4323
|
/**
|
|
4319
|
-
*
|
|
4320
|
-
* @see https://
|
|
4324
|
+
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
4325
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
4321
4326
|
*/
|
|
4322
|
-
'react-hooks
|
|
4327
|
+
'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>
|
|
4323
4328
|
/**
|
|
4324
|
-
*
|
|
4325
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
4329
|
+
* Validates usage of fbt
|
|
4326
4330
|
*/
|
|
4327
|
-
'react-hooks
|
|
4331
|
+
'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>
|
|
4328
4332
|
/**
|
|
4329
|
-
*
|
|
4330
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
4333
|
+
* Validates usage of `fire`
|
|
4331
4334
|
*/
|
|
4332
|
-
'react-hooks
|
|
4335
|
+
'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>
|
|
4333
4336
|
/**
|
|
4334
|
-
*
|
|
4335
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
4337
|
+
* Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
|
|
4336
4338
|
*/
|
|
4337
|
-
'react-hooks
|
|
4339
|
+
'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>
|
|
4338
4340
|
/**
|
|
4339
|
-
*
|
|
4340
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
4341
|
+
* 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)
|
|
4341
4342
|
*/
|
|
4342
|
-
'react-hooks
|
|
4343
|
+
'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>
|
|
4343
4344
|
/**
|
|
4344
|
-
*
|
|
4345
|
-
* @see https://github.com/facebook/react/issues/14920
|
|
4345
|
+
* Validates the rules of hooks
|
|
4346
4346
|
*/
|
|
4347
|
-
'react-hooks/
|
|
4347
|
+
'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>
|
|
4348
|
+
/**
|
|
4349
|
+
* 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)
|
|
4350
|
+
*/
|
|
4351
|
+
'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>
|
|
4352
|
+
/**
|
|
4353
|
+
* Validates against usage of libraries which are incompatible with memoization (manual or automatic)
|
|
4354
|
+
*/
|
|
4355
|
+
'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>
|
|
4356
|
+
/**
|
|
4357
|
+
* Internal invariants
|
|
4358
|
+
*/
|
|
4359
|
+
'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>
|
|
4360
|
+
/**
|
|
4361
|
+
* Validates that effect dependencies are memoized
|
|
4362
|
+
*/
|
|
4363
|
+
'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>
|
|
4364
|
+
/**
|
|
4365
|
+
* Validates against deriving values from state in an effect
|
|
4366
|
+
*/
|
|
4367
|
+
'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>
|
|
4368
|
+
/**
|
|
4369
|
+
* 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)
|
|
4370
|
+
*/
|
|
4371
|
+
'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>
|
|
4372
|
+
/**
|
|
4373
|
+
* 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
|
|
4374
|
+
*/
|
|
4375
|
+
'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>
|
|
4376
|
+
/**
|
|
4377
|
+
* Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
|
|
4378
|
+
*/
|
|
4379
|
+
'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>
|
|
4380
|
+
/**
|
|
4381
|
+
* Validates against suppression of other rules
|
|
4382
|
+
*/
|
|
4383
|
+
'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>
|
|
4348
4384
|
/**
|
|
4349
4385
|
* enforces the Rules of Hooks
|
|
4350
|
-
* @see https://
|
|
4386
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
4351
4387
|
*/
|
|
4352
|
-
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<
|
|
4388
|
+
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>
|
|
4389
|
+
/**
|
|
4390
|
+
* Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
|
|
4391
|
+
*/
|
|
4392
|
+
'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>
|
|
4393
|
+
/**
|
|
4394
|
+
* Validates against setting state during render, which can trigger additional renders and potential infinite render loops
|
|
4395
|
+
*/
|
|
4396
|
+
'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>
|
|
4397
|
+
/**
|
|
4398
|
+
* Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
|
|
4399
|
+
*/
|
|
4400
|
+
'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>
|
|
4401
|
+
/**
|
|
4402
|
+
* Validates against invalid syntax
|
|
4403
|
+
*/
|
|
4404
|
+
'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>
|
|
4405
|
+
/**
|
|
4406
|
+
* Unimplemented features
|
|
4407
|
+
*/
|
|
4408
|
+
'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>
|
|
4409
|
+
/**
|
|
4410
|
+
* Validates against syntax that we do not plan to support in React Compiler
|
|
4411
|
+
*/
|
|
4412
|
+
'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>
|
|
4413
|
+
/**
|
|
4414
|
+
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
4415
|
+
*/
|
|
4416
|
+
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>
|
|
4417
|
+
/**
|
|
4418
|
+
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
4419
|
+
*/
|
|
4420
|
+
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>
|
|
4353
4421
|
/**
|
|
4354
4422
|
* Enforces naming conventions for components.
|
|
4355
4423
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
@@ -4396,26 +4464,16 @@ interface Rules {
|
|
|
4396
4464
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
4397
4465
|
*/
|
|
4398
4466
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
4399
|
-
/**
|
|
4400
|
-
* Enforces explicit boolean values for boolean attributes.
|
|
4401
|
-
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
4402
|
-
*/
|
|
4403
|
-
'react/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
4404
|
-
/**
|
|
4405
|
-
* Enforces explicit `<Fragment>` components instead of the shorthand `<>` or `</>` syntax.
|
|
4406
|
-
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
4407
|
-
*/
|
|
4408
|
-
'react/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
4409
|
-
/**
|
|
4410
|
-
* Disallow useless `forwardRef` calls on components that don't use `ref`s.
|
|
4411
|
-
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
4412
|
-
*/
|
|
4413
|
-
'react/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
|
|
4414
4467
|
/**
|
|
4415
4468
|
* Enforces that the 'key' attribute is placed before the spread attribute in JSX elements.
|
|
4416
4469
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
4417
4470
|
*/
|
|
4418
4471
|
'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>
|
|
4472
|
+
/**
|
|
4473
|
+
* Prevents comments from being inserted as text nodes.
|
|
4474
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
|
|
4475
|
+
*/
|
|
4476
|
+
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>
|
|
4419
4477
|
/**
|
|
4420
4478
|
* Disallow duplicate props in JSX elements.
|
|
4421
4479
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
@@ -4431,6 +4489,16 @@ interface Rules {
|
|
|
4431
4489
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
4432
4490
|
*/
|
|
4433
4491
|
'react/jsx-no-undef'?: Linter.RuleEntry<[]>
|
|
4492
|
+
/**
|
|
4493
|
+
* Enforces shorthand syntax for boolean attributes.
|
|
4494
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
|
|
4495
|
+
*/
|
|
4496
|
+
'react/jsx-shorthand-boolean'?: Linter.RuleEntry<ReactJsxShorthandBoolean>
|
|
4497
|
+
/**
|
|
4498
|
+
* Enforces shorthand syntax for fragments.
|
|
4499
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
|
|
4500
|
+
*/
|
|
4501
|
+
'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>
|
|
4434
4502
|
/**
|
|
4435
4503
|
* Marks React variables as used when JSX is used.
|
|
4436
4504
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-react
|
|
@@ -4491,21 +4559,6 @@ interface Rules {
|
|
|
4491
4559
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
4492
4560
|
*/
|
|
4493
4561
|
'react/no-clone-element'?: Linter.RuleEntry<[]>
|
|
4494
|
-
/**
|
|
4495
|
-
* Prevents comments from being inserted as text nodes.
|
|
4496
|
-
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
4497
|
-
*/
|
|
4498
|
-
'react/no-comment-textnodes'?: Linter.RuleEntry<[]>
|
|
4499
|
-
/**
|
|
4500
|
-
* Disallow complex conditional rendering in JSX expressions.
|
|
4501
|
-
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
4502
|
-
*/
|
|
4503
|
-
'react/no-complex-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
4504
|
-
/**
|
|
4505
|
-
* Disallow complex conditional rendering in JSX expressions.
|
|
4506
|
-
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
4507
|
-
*/
|
|
4508
|
-
'react/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
4509
4562
|
/**
|
|
4510
4563
|
* Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
|
|
4511
4564
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
@@ -4541,16 +4594,16 @@ interface Rules {
|
|
|
4541
4594
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
4542
4595
|
*/
|
|
4543
4596
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>
|
|
4544
|
-
/**
|
|
4545
|
-
* Disallow duplicate props in JSX elements.
|
|
4546
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
4547
|
-
*/
|
|
4548
|
-
'react/no-duplicate-jsx-props'?: Linter.RuleEntry<[]>
|
|
4549
4597
|
/**
|
|
4550
4598
|
* Disallow duplicate `key` on elements in the same array or a list of `children`.
|
|
4551
4599
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
4552
4600
|
*/
|
|
4553
4601
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>
|
|
4602
|
+
/**
|
|
4603
|
+
* Disallow certain props on components.
|
|
4604
|
+
* @see https://eslint-react.xyz/docs/rules/no-forbidden-props
|
|
4605
|
+
*/
|
|
4606
|
+
'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>
|
|
4554
4607
|
/**
|
|
4555
4608
|
* Replaces usages of `forwardRef` with passing `ref` as a prop.
|
|
4556
4609
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
@@ -4591,11 +4644,6 @@ interface Rules {
|
|
|
4591
4644
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
4592
4645
|
*/
|
|
4593
4646
|
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>
|
|
4594
|
-
/**
|
|
4595
|
-
* Disallow nesting component definitions inside other components.
|
|
4596
|
-
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
4597
|
-
*/
|
|
4598
|
-
'react/no-nested-components'?: Linter.RuleEntry<[]>
|
|
4599
4647
|
/**
|
|
4600
4648
|
* Disallow nesting lazy component declarations inside other components.
|
|
4601
4649
|
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
@@ -4631,6 +4679,26 @@ interface Rules {
|
|
|
4631
4679
|
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
4632
4680
|
*/
|
|
4633
4681
|
'react/no-string-refs'?: Linter.RuleEntry<[]>
|
|
4682
|
+
/**
|
|
4683
|
+
* Prevents the use of unnecessary `key` props on JSX elements when rendering lists.
|
|
4684
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
|
|
4685
|
+
*/
|
|
4686
|
+
'react/no-unnecessary-key'?: Linter.RuleEntry<[]>
|
|
4687
|
+
/**
|
|
4688
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
4689
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
4690
|
+
*/
|
|
4691
|
+
'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>
|
|
4692
|
+
/**
|
|
4693
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
4694
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
4695
|
+
*/
|
|
4696
|
+
'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>
|
|
4697
|
+
/**
|
|
4698
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
4699
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
4700
|
+
*/
|
|
4701
|
+
'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>
|
|
4634
4702
|
/**
|
|
4635
4703
|
* Warns the usage of `UNSAFE_componentWillMount` in class components.
|
|
4636
4704
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
@@ -4661,6 +4729,11 @@ interface Rules {
|
|
|
4661
4729
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
4662
4730
|
*/
|
|
4663
4731
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
4732
|
+
/**
|
|
4733
|
+
* Warns about unused component prop declarations.
|
|
4734
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
4735
|
+
*/
|
|
4736
|
+
'react/no-unused-props'?: Linter.RuleEntry<[]>
|
|
4664
4737
|
/**
|
|
4665
4738
|
* Warns unused class component state.
|
|
4666
4739
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
@@ -4688,29 +4761,19 @@ interface Rules {
|
|
|
4688
4761
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
4689
4762
|
/**
|
|
4690
4763
|
* Enforces React is imported via a namespace import.
|
|
4691
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-
|
|
4764
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
4692
4765
|
*/
|
|
4693
|
-
'react/prefer-
|
|
4766
|
+
'react/prefer-namespace-import'?: Linter.RuleEntry<[]>
|
|
4694
4767
|
/**
|
|
4695
4768
|
* Enforces read-only props in components.
|
|
4696
4769
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
4697
4770
|
*/
|
|
4698
4771
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
|
4699
4772
|
/**
|
|
4700
|
-
* Enforces
|
|
4701
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-
|
|
4702
|
-
*/
|
|
4703
|
-
'react/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
4704
|
-
/**
|
|
4705
|
-
* Enforces shorthand syntax for fragments.
|
|
4706
|
-
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
4707
|
-
*/
|
|
4708
|
-
'react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
4709
|
-
/**
|
|
4710
|
-
* Marks variables used in JSX elements as used.
|
|
4711
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
4773
|
+
* Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
|
|
4774
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
|
|
4712
4775
|
*/
|
|
4713
|
-
'react/use-
|
|
4776
|
+
'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>
|
|
4714
4777
|
/**
|
|
4715
4778
|
* disallow confusing quantifiers
|
|
4716
4779
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
|
|
@@ -6094,7 +6157,7 @@ interface Rules {
|
|
|
6094
6157
|
*/
|
|
6095
6158
|
'vars-on-top'?: Linter.RuleEntry<[]>
|
|
6096
6159
|
/**
|
|
6097
|
-
* require
|
|
6160
|
+
* require test file pattern
|
|
6098
6161
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
6099
6162
|
*/
|
|
6100
6163
|
'vitest/consistent-test-filename'?: Linter.RuleEntry<VitestConsistentTestFilename>
|
|
@@ -6820,6 +6883,50 @@ type StylisticCurlyNewline = []|[(("always" | "never") | {
|
|
|
6820
6883
|
type StylisticDotLocation = []|[("object" | "property")]
|
|
6821
6884
|
// ----- @stylistic/eol-last -----
|
|
6822
6885
|
type StylisticEolLast = []|[("always" | "never" | "unix" | "windows")]
|
|
6886
|
+
// ----- @stylistic/exp-list-style -----
|
|
6887
|
+
type StylisticExpListStyle = []|[{
|
|
6888
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig
|
|
6889
|
+
multiLine?: _StylisticExpListStyle_MultiLineConfig
|
|
6890
|
+
overrides?: {
|
|
6891
|
+
"[]"?: _StylisticExpListStyle_BaseConfig
|
|
6892
|
+
"{}"?: _StylisticExpListStyle_BaseConfig
|
|
6893
|
+
"<>"?: _StylisticExpListStyle_BaseConfig
|
|
6894
|
+
"()"?: _StylisticExpListStyle_BaseConfig
|
|
6895
|
+
ArrayExpression?: _StylisticExpListStyle_BaseConfig
|
|
6896
|
+
ArrayPattern?: _StylisticExpListStyle_BaseConfig
|
|
6897
|
+
ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig
|
|
6898
|
+
CallExpression?: _StylisticExpListStyle_BaseConfig
|
|
6899
|
+
ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig
|
|
6900
|
+
FunctionDeclaration?: _StylisticExpListStyle_BaseConfig
|
|
6901
|
+
FunctionExpression?: _StylisticExpListStyle_BaseConfig
|
|
6902
|
+
ImportDeclaration?: _StylisticExpListStyle_BaseConfig
|
|
6903
|
+
ImportAttributes?: _StylisticExpListStyle_BaseConfig
|
|
6904
|
+
NewExpression?: _StylisticExpListStyle_BaseConfig
|
|
6905
|
+
ObjectExpression?: _StylisticExpListStyle_BaseConfig
|
|
6906
|
+
ObjectPattern?: _StylisticExpListStyle_BaseConfig
|
|
6907
|
+
TSDeclareFunction?: _StylisticExpListStyle_BaseConfig
|
|
6908
|
+
TSFunctionType?: _StylisticExpListStyle_BaseConfig
|
|
6909
|
+
TSInterfaceBody?: _StylisticExpListStyle_BaseConfig
|
|
6910
|
+
TSEnumBody?: _StylisticExpListStyle_BaseConfig
|
|
6911
|
+
TSTupleType?: _StylisticExpListStyle_BaseConfig
|
|
6912
|
+
TSTypeLiteral?: _StylisticExpListStyle_BaseConfig
|
|
6913
|
+
TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig
|
|
6914
|
+
TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig
|
|
6915
|
+
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig
|
|
6916
|
+
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig
|
|
6917
|
+
}
|
|
6918
|
+
}]
|
|
6919
|
+
interface _StylisticExpListStyle_SingleLineConfig {
|
|
6920
|
+
spacing?: ("always" | "never")
|
|
6921
|
+
maxItems?: number
|
|
6922
|
+
}
|
|
6923
|
+
interface _StylisticExpListStyle_MultiLineConfig {
|
|
6924
|
+
minItems?: number
|
|
6925
|
+
}
|
|
6926
|
+
interface _StylisticExpListStyle_BaseConfig {
|
|
6927
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig
|
|
6928
|
+
multiline?: _StylisticExpListStyle_MultiLineConfig
|
|
6929
|
+
}
|
|
6823
6930
|
// ----- @stylistic/function-call-argument-newline -----
|
|
6824
6931
|
type StylisticFunctionCallArgumentNewline = []|[("always" | "never" | "consistent")]
|
|
6825
6932
|
// ----- @stylistic/function-call-spacing -----
|
|
@@ -6889,7 +6996,11 @@ type StylisticIndent = []|[("tab" | number)]|[("tab" | number), {
|
|
|
6889
6996
|
ObjectExpression?: (number | ("first" | "off"))
|
|
6890
6997
|
ImportDeclaration?: (number | ("first" | "off"))
|
|
6891
6998
|
flatTernaryExpressions?: boolean
|
|
6892
|
-
offsetTernaryExpressions?: boolean
|
|
6999
|
+
offsetTernaryExpressions?: (boolean | {
|
|
7000
|
+
CallExpression?: boolean
|
|
7001
|
+
AwaitExpression?: boolean
|
|
7002
|
+
NewExpression?: boolean
|
|
7003
|
+
})
|
|
6893
7004
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean
|
|
6894
7005
|
ignoredNodes?: string[]
|
|
6895
7006
|
ignoreComments?: boolean
|
|
@@ -7692,6 +7803,7 @@ type StylisticObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never
|
|
|
7692
7803
|
TSInterfaceBody?: ("always" | "never")
|
|
7693
7804
|
TSEnumBody?: ("always" | "never")
|
|
7694
7805
|
}
|
|
7806
|
+
emptyObjects?: ("ignore" | "always" | "never")
|
|
7695
7807
|
}]
|
|
7696
7808
|
// ----- @stylistic/object-property-newline -----
|
|
7697
7809
|
type StylisticObjectPropertyNewline = []|[{
|
|
@@ -11379,6 +11491,11 @@ type NodeDependenciesNoRestrictedDeps = (string | {
|
|
|
11379
11491
|
message?: string
|
|
11380
11492
|
deep?: ("local" | "server")
|
|
11381
11493
|
})[]
|
|
11494
|
+
// ----- node-dependencies/require-provenance-deps -----
|
|
11495
|
+
type NodeDependenciesRequireProvenanceDeps = []|[{
|
|
11496
|
+
devDependencies?: boolean
|
|
11497
|
+
allows?: string[]
|
|
11498
|
+
}]
|
|
11382
11499
|
// ----- node-dependencies/valid-engines -----
|
|
11383
11500
|
type NodeDependenciesValidEngines = []|[{
|
|
11384
11501
|
deep?: boolean
|
|
@@ -14678,6 +14795,8 @@ type PnpmJsonValidCatalog = []|[{
|
|
|
14678
14795
|
// ----- pnpm/yaml-no-duplicate-catalog-item -----
|
|
14679
14796
|
type PnpmYamlNoDuplicateCatalogItem = []|[{
|
|
14680
14797
|
allow?: string[]
|
|
14798
|
+
|
|
14799
|
+
checkDuplicates?: ("name-only" | "exact-version")
|
|
14681
14800
|
}]
|
|
14682
14801
|
// ----- prefer-arrow-callback -----
|
|
14683
14802
|
type PreferArrowCallback = []|[{
|
|
@@ -14763,10 +14882,124 @@ type ReactDomNoUnknownProperty = []|[{
|
|
|
14763
14882
|
ignore?: string[]
|
|
14764
14883
|
requireDataLowercase?: boolean
|
|
14765
14884
|
}]
|
|
14885
|
+
// ----- react-hooks/automatic-effect-dependencies -----
|
|
14886
|
+
type ReactHooksAutomaticEffectDependencies = []|[{
|
|
14887
|
+
[k: string]: unknown | undefined
|
|
14888
|
+
}]
|
|
14889
|
+
// ----- react-hooks/capitalized-calls -----
|
|
14890
|
+
type ReactHooksCapitalizedCalls = []|[{
|
|
14891
|
+
[k: string]: unknown | undefined
|
|
14892
|
+
}]
|
|
14893
|
+
// ----- react-hooks/component-hook-factories -----
|
|
14894
|
+
type ReactHooksComponentHookFactories = []|[{
|
|
14895
|
+
[k: string]: unknown | undefined
|
|
14896
|
+
}]
|
|
14897
|
+
// ----- react-hooks/config -----
|
|
14898
|
+
type ReactHooksConfig = []|[{
|
|
14899
|
+
[k: string]: unknown | undefined
|
|
14900
|
+
}]
|
|
14901
|
+
// ----- react-hooks/error-boundaries -----
|
|
14902
|
+
type ReactHooksErrorBoundaries = []|[{
|
|
14903
|
+
[k: string]: unknown | undefined
|
|
14904
|
+
}]
|
|
14766
14905
|
// ----- react-hooks/exhaustive-deps -----
|
|
14767
14906
|
type ReactHooksExhaustiveDeps = []|[{
|
|
14768
14907
|
additionalHooks?: string
|
|
14769
14908
|
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean
|
|
14909
|
+
experimental_autoDependenciesHooks?: string[]
|
|
14910
|
+
requireExplicitEffectDeps?: boolean
|
|
14911
|
+
}]
|
|
14912
|
+
// ----- react-hooks/fbt -----
|
|
14913
|
+
type ReactHooksFbt = []|[{
|
|
14914
|
+
[k: string]: unknown | undefined
|
|
14915
|
+
}]
|
|
14916
|
+
// ----- react-hooks/fire -----
|
|
14917
|
+
type ReactHooksFire = []|[{
|
|
14918
|
+
[k: string]: unknown | undefined
|
|
14919
|
+
}]
|
|
14920
|
+
// ----- react-hooks/gating -----
|
|
14921
|
+
type ReactHooksGating = []|[{
|
|
14922
|
+
[k: string]: unknown | undefined
|
|
14923
|
+
}]
|
|
14924
|
+
// ----- react-hooks/globals -----
|
|
14925
|
+
type ReactHooksGlobals = []|[{
|
|
14926
|
+
[k: string]: unknown | undefined
|
|
14927
|
+
}]
|
|
14928
|
+
// ----- react-hooks/hooks -----
|
|
14929
|
+
type ReactHooksHooks = []|[{
|
|
14930
|
+
[k: string]: unknown | undefined
|
|
14931
|
+
}]
|
|
14932
|
+
// ----- react-hooks/immutability -----
|
|
14933
|
+
type ReactHooksImmutability = []|[{
|
|
14934
|
+
[k: string]: unknown | undefined
|
|
14935
|
+
}]
|
|
14936
|
+
// ----- react-hooks/incompatible-library -----
|
|
14937
|
+
type ReactHooksIncompatibleLibrary = []|[{
|
|
14938
|
+
[k: string]: unknown | undefined
|
|
14939
|
+
}]
|
|
14940
|
+
// ----- react-hooks/invariant -----
|
|
14941
|
+
type ReactHooksInvariant = []|[{
|
|
14942
|
+
[k: string]: unknown | undefined
|
|
14943
|
+
}]
|
|
14944
|
+
// ----- react-hooks/memoized-effect-dependencies -----
|
|
14945
|
+
type ReactHooksMemoizedEffectDependencies = []|[{
|
|
14946
|
+
[k: string]: unknown | undefined
|
|
14947
|
+
}]
|
|
14948
|
+
// ----- react-hooks/no-deriving-state-in-effects -----
|
|
14949
|
+
type ReactHooksNoDerivingStateInEffects = []|[{
|
|
14950
|
+
[k: string]: unknown | undefined
|
|
14951
|
+
}]
|
|
14952
|
+
// ----- react-hooks/preserve-manual-memoization -----
|
|
14953
|
+
type ReactHooksPreserveManualMemoization = []|[{
|
|
14954
|
+
[k: string]: unknown | undefined
|
|
14955
|
+
}]
|
|
14956
|
+
// ----- react-hooks/purity -----
|
|
14957
|
+
type ReactHooksPurity = []|[{
|
|
14958
|
+
[k: string]: unknown | undefined
|
|
14959
|
+
}]
|
|
14960
|
+
// ----- react-hooks/refs -----
|
|
14961
|
+
type ReactHooksRefs = []|[{
|
|
14962
|
+
[k: string]: unknown | undefined
|
|
14963
|
+
}]
|
|
14964
|
+
// ----- react-hooks/rule-suppression -----
|
|
14965
|
+
type ReactHooksRuleSuppression = []|[{
|
|
14966
|
+
[k: string]: unknown | undefined
|
|
14967
|
+
}]
|
|
14968
|
+
// ----- react-hooks/rules-of-hooks -----
|
|
14969
|
+
type ReactHooksRulesOfHooks = []|[{
|
|
14970
|
+
additionalHooks?: string
|
|
14971
|
+
}]
|
|
14972
|
+
// ----- react-hooks/set-state-in-effect -----
|
|
14973
|
+
type ReactHooksSetStateInEffect = []|[{
|
|
14974
|
+
[k: string]: unknown | undefined
|
|
14975
|
+
}]
|
|
14976
|
+
// ----- react-hooks/set-state-in-render -----
|
|
14977
|
+
type ReactHooksSetStateInRender = []|[{
|
|
14978
|
+
[k: string]: unknown | undefined
|
|
14979
|
+
}]
|
|
14980
|
+
// ----- react-hooks/static-components -----
|
|
14981
|
+
type ReactHooksStaticComponents = []|[{
|
|
14982
|
+
[k: string]: unknown | undefined
|
|
14983
|
+
}]
|
|
14984
|
+
// ----- react-hooks/syntax -----
|
|
14985
|
+
type ReactHooksSyntax = []|[{
|
|
14986
|
+
[k: string]: unknown | undefined
|
|
14987
|
+
}]
|
|
14988
|
+
// ----- react-hooks/todo -----
|
|
14989
|
+
type ReactHooksTodo = []|[{
|
|
14990
|
+
[k: string]: unknown | undefined
|
|
14991
|
+
}]
|
|
14992
|
+
// ----- react-hooks/unsupported-syntax -----
|
|
14993
|
+
type ReactHooksUnsupportedSyntax = []|[{
|
|
14994
|
+
[k: string]: unknown | undefined
|
|
14995
|
+
}]
|
|
14996
|
+
// ----- react-hooks/use-memo -----
|
|
14997
|
+
type ReactHooksUseMemo = []|[{
|
|
14998
|
+
[k: string]: unknown | undefined
|
|
14999
|
+
}]
|
|
15000
|
+
// ----- react-hooks/void-use-memo -----
|
|
15001
|
+
type ReactHooksVoidUseMemo = []|[{
|
|
15002
|
+
[k: string]: unknown | undefined
|
|
14770
15003
|
}]
|
|
14771
15004
|
// ----- react-naming-convention/component-name -----
|
|
14772
15005
|
type ReactNamingConventionComponentName = []|[(("PascalCase" | "CONSTANT_CASE") | {
|
|
@@ -14793,6 +15026,21 @@ type ReactRefreshOnlyExportComponents = []|[{
|
|
|
14793
15026
|
customHOCs?: string[]
|
|
14794
15027
|
checkJS?: boolean
|
|
14795
15028
|
}]
|
|
15029
|
+
// ----- react/jsx-shorthand-boolean -----
|
|
15030
|
+
type ReactJsxShorthandBoolean = []|[(-1 | 1)]
|
|
15031
|
+
// ----- react/jsx-shorthand-fragment -----
|
|
15032
|
+
type ReactJsxShorthandFragment = []|[(-1 | 1)]
|
|
15033
|
+
// ----- react/no-forbidden-props -----
|
|
15034
|
+
type ReactNoForbiddenProps = []|[{
|
|
15035
|
+
forbid?: (string | {
|
|
15036
|
+
excludedNodes?: string[]
|
|
15037
|
+
prop: string
|
|
15038
|
+
} | {
|
|
15039
|
+
includedNodes?: string[]
|
|
15040
|
+
prop: string
|
|
15041
|
+
})[]
|
|
15042
|
+
[k: string]: unknown | undefined
|
|
15043
|
+
}]
|
|
14796
15044
|
// ----- react/no-useless-fragment -----
|
|
14797
15045
|
type ReactNoUselessFragment = []|[{
|
|
14798
15046
|
|