@luxass/eslint-config 7.2.1 → 7.4.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/README.md +1 -2
- package/dist/index.d.mts +269 -365
- package/dist/index.mjs +52 -139
- package/dist/{lib-DRpFEws2.mjs → lib-D3Kr7UIJ.mjs} +285 -576
- package/package.json +39 -29
package/dist/index.d.mts
CHANGED
|
@@ -52,6 +52,47 @@ declare function comments(): Promise<TypedFlatConfigItem[]>;
|
|
|
52
52
|
//#region src/configs/disables.d.ts
|
|
53
53
|
declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
54
54
|
//#endregion
|
|
55
|
+
//#region src/configs/e18e.d.ts
|
|
56
|
+
interface E18eOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Include modernization rules
|
|
59
|
+
*
|
|
60
|
+
* @see https://github.com/e18e/eslint-plugin#modernization
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
63
|
+
modernization?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Include module replacements rules
|
|
66
|
+
*
|
|
67
|
+
* @see https://github.com/e18e/eslint-plugin#module-replacements
|
|
68
|
+
* @default options.isInEditor
|
|
69
|
+
*/
|
|
70
|
+
moduleReplacements?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Include performance improvements rules
|
|
73
|
+
*
|
|
74
|
+
* @see https://github.com/e18e/eslint-plugin#performance-improvements
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
77
|
+
performanceImprovements?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Overrides for the config.
|
|
80
|
+
*/
|
|
81
|
+
overrides?: TypedFlatConfigItem["rules"];
|
|
82
|
+
/**
|
|
83
|
+
* Whether the config is for an editor.
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
isInEditor?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Type of the project. `lib` will enable more strict rules for libraries.
|
|
89
|
+
*
|
|
90
|
+
* @default "app"
|
|
91
|
+
*/
|
|
92
|
+
type?: ProjectType;
|
|
93
|
+
}
|
|
94
|
+
declare function e18e(options?: E18eOptions): Promise<TypedFlatConfigItem[]>;
|
|
95
|
+
//#endregion
|
|
55
96
|
//#region src/vendor/prettier-types.d.ts
|
|
56
97
|
/**
|
|
57
98
|
* Vendor types from Prettier so we don't rely on the dependency.
|
|
@@ -409,10 +450,6 @@ interface ReactOptions {
|
|
|
409
450
|
* @default ['**\/*.md\/**', '**\/*.astro/*.ts']
|
|
410
451
|
*/
|
|
411
452
|
ignoresTypeAware?: string[];
|
|
412
|
-
/**
|
|
413
|
-
* Enable rules that require React Compiler.
|
|
414
|
-
*/
|
|
415
|
-
reactCompiler?: boolean;
|
|
416
453
|
}
|
|
417
454
|
declare function react(options?: ReactOptions): Promise<TypedFlatConfigItem[]>;
|
|
418
455
|
//#endregion
|
|
@@ -1142,6 +1179,87 @@ interface RuleOptions {
|
|
|
1142
1179
|
* @see https://eslint.org/docs/latest/rules/dot-notation
|
|
1143
1180
|
*/
|
|
1144
1181
|
'dot-notation'?: Linter.RuleEntry<DotNotation>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Bans a list of dependencies from being used
|
|
1184
|
+
* @see https://github.com/es-tooling/eslint-plugin-depend/blob/main/docs/rules/ban-dependencies.md
|
|
1185
|
+
*/
|
|
1186
|
+
'e18e/ban-dependencies'?: Linter.RuleEntry<E18EBanDependencies>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Prefer optimized alternatives to `indexOf()` equality checks
|
|
1189
|
+
*/
|
|
1190
|
+
'e18e/no-indexof-equality'?: Linter.RuleEntry<[]>;
|
|
1191
|
+
/**
|
|
1192
|
+
* Prefer Array.prototype.at() over length-based indexing
|
|
1193
|
+
*/
|
|
1194
|
+
'e18e/prefer-array-at'?: Linter.RuleEntry<[]>;
|
|
1195
|
+
/**
|
|
1196
|
+
* Prefer Array.prototype.fill() over Array.from or map with constant values
|
|
1197
|
+
*/
|
|
1198
|
+
'e18e/prefer-array-fill'?: Linter.RuleEntry<[]>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Prefer Array.from(iterable, mapper) over [...iterable].map(mapper) to avoid intermediate array allocation
|
|
1201
|
+
*/
|
|
1202
|
+
'e18e/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
1203
|
+
/**
|
|
1204
|
+
* Prefer Array.some() over Array.find() when checking for element existence
|
|
1205
|
+
*/
|
|
1206
|
+
'e18e/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
1207
|
+
/**
|
|
1208
|
+
* Prefer Array.prototype.toReversed() over copying and reversing arrays
|
|
1209
|
+
*/
|
|
1210
|
+
'e18e/prefer-array-to-reversed'?: Linter.RuleEntry<[]>;
|
|
1211
|
+
/**
|
|
1212
|
+
* Prefer Array.prototype.toSorted() over copying and sorting arrays
|
|
1213
|
+
*/
|
|
1214
|
+
'e18e/prefer-array-to-sorted'?: Linter.RuleEntry<[]>;
|
|
1215
|
+
/**
|
|
1216
|
+
* Prefer Array.prototype.toSpliced() over copying and splicing arrays
|
|
1217
|
+
*/
|
|
1218
|
+
'e18e/prefer-array-to-spliced'?: Linter.RuleEntry<[]>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Prefer Date.now() over new Date().getTime() and +new Date()
|
|
1221
|
+
*/
|
|
1222
|
+
'e18e/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Prefer the exponentiation operator ** over Math.pow()
|
|
1225
|
+
*/
|
|
1226
|
+
'e18e/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>;
|
|
1227
|
+
/**
|
|
1228
|
+
* Prefer .includes() over indexOf() comparisons for arrays and strings
|
|
1229
|
+
*/
|
|
1230
|
+
'e18e/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Prefer inline equality checks over temporary object creation for simple comparisons
|
|
1233
|
+
*/
|
|
1234
|
+
'e18e/prefer-inline-equality'?: Linter.RuleEntry<[]>;
|
|
1235
|
+
/**
|
|
1236
|
+
* Prefer nullish coalescing operator (?? and ??=) over verbose null checks
|
|
1237
|
+
*/
|
|
1238
|
+
'e18e/prefer-nullish-coalescing'?: Linter.RuleEntry<[]>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call() and obj.hasOwnProperty()
|
|
1241
|
+
*/
|
|
1242
|
+
'e18e/prefer-object-has-own'?: Linter.RuleEntry<[]>;
|
|
1243
|
+
/**
|
|
1244
|
+
* prefer `RegExp.test()` over `String.match()` and `RegExp.exec()` when only checking for match existence
|
|
1245
|
+
*/
|
|
1246
|
+
'e18e/prefer-regex-test'?: Linter.RuleEntry<[]>;
|
|
1247
|
+
/**
|
|
1248
|
+
* Prefer spread syntax over Array.concat(), Array.from(), Object.assign({}, ...), and Function.apply()
|
|
1249
|
+
*/
|
|
1250
|
+
'e18e/prefer-spread-syntax'?: Linter.RuleEntry<[]>;
|
|
1251
|
+
/**
|
|
1252
|
+
* Prefer defining regular expressions at module scope to avoid re-compilation on every function call
|
|
1253
|
+
*/
|
|
1254
|
+
'e18e/prefer-static-regex'?: Linter.RuleEntry<[]>;
|
|
1255
|
+
/**
|
|
1256
|
+
* Prefer passing function and arguments directly to setTimeout/setInterval instead of wrapping in an arrow function or using bind
|
|
1257
|
+
*/
|
|
1258
|
+
'e18e/prefer-timer-args'?: Linter.RuleEntry<[]>;
|
|
1259
|
+
/**
|
|
1260
|
+
* Prefer URL.canParse() over try-catch blocks for URL validation
|
|
1261
|
+
*/
|
|
1262
|
+
'e18e/prefer-url-canparse'?: Linter.RuleEntry<[]>;
|
|
1145
1263
|
/**
|
|
1146
1264
|
* Require or disallow newline at the end of files
|
|
1147
1265
|
* @see https://eslint.org/docs/latest/rules/eol-last
|
|
@@ -1201,6 +1319,7 @@ interface RuleOptions {
|
|
|
1201
1319
|
/**
|
|
1202
1320
|
* disallow unused `eslint-disable` comments
|
|
1203
1321
|
* @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
|
|
1322
|
+
* @deprecated
|
|
1204
1323
|
*/
|
|
1205
1324
|
'eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]>;
|
|
1206
1325
|
/**
|
|
@@ -3640,149 +3759,11 @@ interface RuleOptions {
|
|
|
3640
3759
|
* @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
|
|
3641
3760
|
*/
|
|
3642
3761
|
'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
3643
|
-
/**
|
|
3644
|
-
* Disallows direct calls to the ['set' function](https://react.dev/reference/react/useState#setstate) of 'useState' in 'useEffect'.
|
|
3645
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
3646
|
-
*/
|
|
3647
|
-
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
|
|
3648
|
-
/**
|
|
3649
|
-
* Verifies that automatic effect dependencies are compiled if opted-in
|
|
3650
|
-
*/
|
|
3651
|
-
'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>;
|
|
3652
|
-
/**
|
|
3653
|
-
* Validates against calling capitalized functions/methods instead of using JSX
|
|
3654
|
-
*/
|
|
3655
|
-
'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>;
|
|
3656
|
-
/**
|
|
3657
|
-
* Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
|
|
3658
|
-
*/
|
|
3659
|
-
'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>;
|
|
3660
|
-
/**
|
|
3661
|
-
* Validates the compiler configuration options
|
|
3662
|
-
*/
|
|
3663
|
-
'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>;
|
|
3664
|
-
/**
|
|
3665
|
-
* Validates usage of error boundaries instead of try/catch for errors in child components
|
|
3666
|
-
*/
|
|
3667
|
-
'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>;
|
|
3668
|
-
/**
|
|
3669
|
-
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
3670
|
-
* @see https://github.com/facebook/react/issues/14920
|
|
3671
|
-
*/
|
|
3672
|
-
'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>;
|
|
3673
|
-
/**
|
|
3674
|
-
* Validates usage of fbt
|
|
3675
|
-
*/
|
|
3676
|
-
'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>;
|
|
3677
|
-
/**
|
|
3678
|
-
* Validates usage of `fire`
|
|
3679
|
-
*/
|
|
3680
|
-
'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>;
|
|
3681
|
-
/**
|
|
3682
|
-
* Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
|
|
3683
|
-
*/
|
|
3684
|
-
'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>;
|
|
3685
|
-
/**
|
|
3686
|
-
* 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)
|
|
3687
|
-
*/
|
|
3688
|
-
'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>;
|
|
3689
|
-
/**
|
|
3690
|
-
* Validates the rules of hooks
|
|
3691
|
-
*/
|
|
3692
|
-
'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>;
|
|
3693
|
-
/**
|
|
3694
|
-
* 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)
|
|
3695
|
-
*/
|
|
3696
|
-
'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>;
|
|
3697
|
-
/**
|
|
3698
|
-
* Validates against usage of libraries which are incompatible with memoization (manual or automatic)
|
|
3699
|
-
*/
|
|
3700
|
-
'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>;
|
|
3701
|
-
/**
|
|
3702
|
-
* Internal invariants
|
|
3703
|
-
*/
|
|
3704
|
-
'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>;
|
|
3705
|
-
/**
|
|
3706
|
-
* Validates that effect dependencies are memoized
|
|
3707
|
-
*/
|
|
3708
|
-
'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>;
|
|
3709
|
-
/**
|
|
3710
|
-
* Validates against deriving values from state in an effect
|
|
3711
|
-
*/
|
|
3712
|
-
'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>;
|
|
3713
|
-
/**
|
|
3714
|
-
* 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)
|
|
3715
|
-
*/
|
|
3716
|
-
'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>;
|
|
3717
|
-
/**
|
|
3718
|
-
* 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
|
|
3719
|
-
*/
|
|
3720
|
-
'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>;
|
|
3721
|
-
/**
|
|
3722
|
-
* Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
|
|
3723
|
-
*/
|
|
3724
|
-
'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>;
|
|
3725
|
-
/**
|
|
3726
|
-
* Validates against suppression of other rules
|
|
3727
|
-
*/
|
|
3728
|
-
'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>;
|
|
3729
|
-
/**
|
|
3730
|
-
* enforces the Rules of Hooks
|
|
3731
|
-
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
3732
|
-
*/
|
|
3733
|
-
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>;
|
|
3734
|
-
/**
|
|
3735
|
-
* Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
|
|
3736
|
-
*/
|
|
3737
|
-
'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>;
|
|
3738
|
-
/**
|
|
3739
|
-
* Validates against setting state during render, which can trigger additional renders and potential infinite render loops
|
|
3740
|
-
*/
|
|
3741
|
-
'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>;
|
|
3742
|
-
/**
|
|
3743
|
-
* Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
|
|
3744
|
-
*/
|
|
3745
|
-
'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>;
|
|
3746
|
-
/**
|
|
3747
|
-
* Validates against invalid syntax
|
|
3748
|
-
*/
|
|
3749
|
-
'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>;
|
|
3750
|
-
/**
|
|
3751
|
-
* Unimplemented features
|
|
3752
|
-
*/
|
|
3753
|
-
'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>;
|
|
3754
|
-
/**
|
|
3755
|
-
* Validates against syntax that we do not plan to support in React Compiler
|
|
3756
|
-
*/
|
|
3757
|
-
'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>;
|
|
3758
|
-
/**
|
|
3759
|
-
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
3760
|
-
*/
|
|
3761
|
-
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
3762
|
-
/**
|
|
3763
|
-
* Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
3764
|
-
*/
|
|
3765
|
-
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
3766
|
-
/**
|
|
3767
|
-
* Enforces naming conventions for components.
|
|
3768
|
-
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
3769
|
-
*/
|
|
3770
|
-
'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>;
|
|
3771
3762
|
/**
|
|
3772
3763
|
* Enforces the context name to be a valid component name with the suffix 'Context'.
|
|
3773
3764
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
3774
3765
|
*/
|
|
3775
3766
|
'react-naming-convention/context-name'?: Linter.RuleEntry<[]>;
|
|
3776
|
-
/**
|
|
3777
|
-
* Enforces consistent file-naming conventions.
|
|
3778
|
-
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename
|
|
3779
|
-
*/
|
|
3780
|
-
'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>;
|
|
3781
|
-
/**
|
|
3782
|
-
* Enforces consistent use of the JSX file extension.
|
|
3783
|
-
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
|
|
3784
|
-
*/
|
|
3785
|
-
'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>;
|
|
3786
3767
|
/**
|
|
3787
3768
|
* Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
|
|
3788
3769
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
|
|
@@ -3793,14 +3774,9 @@ interface RuleOptions {
|
|
|
3793
3774
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
|
|
3794
3775
|
*/
|
|
3795
3776
|
'react-naming-convention/ref-name'?: Linter.RuleEntry<[]>;
|
|
3796
|
-
/**
|
|
3797
|
-
* Enforces destructuring and symmetric naming of the 'useState' hook value and setter.
|
|
3798
|
-
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
3799
|
-
*/
|
|
3800
|
-
'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>;
|
|
3801
3777
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
3802
3778
|
/**
|
|
3803
|
-
*
|
|
3779
|
+
* Validates and transforms React Client/Server Function definitions.
|
|
3804
3780
|
* @see https://eslint-react.xyz/docs/rules/function-definition
|
|
3805
3781
|
*/
|
|
3806
3782
|
'react-rsc/function-definition'?: Linter.RuleEntry<[]>;
|
|
@@ -3824,6 +3800,26 @@ interface RuleOptions {
|
|
|
3824
3800
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
3825
3801
|
*/
|
|
3826
3802
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
3803
|
+
/**
|
|
3804
|
+
* Disallows higher order functions that define components or hooks inside them.
|
|
3805
|
+
* @see https://eslint-react.xyz/docs/rules/component-hook-factories
|
|
3806
|
+
*/
|
|
3807
|
+
'react/component-hook-factories'?: Linter.RuleEntry<[]>;
|
|
3808
|
+
/**
|
|
3809
|
+
* Validates usage of Error Boundaries instead of try/catch for errors in child components.
|
|
3810
|
+
* @see https://eslint-react.xyz/docs/rules/error-boundaries
|
|
3811
|
+
*/
|
|
3812
|
+
'react/error-boundaries'?: Linter.RuleEntry<[]>;
|
|
3813
|
+
/**
|
|
3814
|
+
* Verifies the list of dependencies for Hooks like 'useEffect' and similar.
|
|
3815
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
3816
|
+
*/
|
|
3817
|
+
'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>;
|
|
3818
|
+
/**
|
|
3819
|
+
* Validates against mutating props, state, and other values that are immutable.
|
|
3820
|
+
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3821
|
+
*/
|
|
3822
|
+
'react/immutability'?: Linter.RuleEntry<[]>;
|
|
3827
3823
|
/**
|
|
3828
3824
|
* Prevents unintentional '$' sign before expression.
|
|
3829
3825
|
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
@@ -3835,25 +3831,10 @@ interface RuleOptions {
|
|
|
3835
3831
|
*/
|
|
3836
3832
|
'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
|
|
3837
3833
|
/**
|
|
3838
|
-
* Prevents comment strings (
|
|
3834
|
+
* Prevents comment strings (ex: beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
|
|
3839
3835
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
|
|
3840
3836
|
*/
|
|
3841
3837
|
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
3842
|
-
/**
|
|
3843
|
-
* Disallows duplicate props in JSX elements.
|
|
3844
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
3845
|
-
*/
|
|
3846
|
-
'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>;
|
|
3847
|
-
/**
|
|
3848
|
-
* Disallows immediately-invoked function expressions in JSX.
|
|
3849
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-no-iife
|
|
3850
|
-
*/
|
|
3851
|
-
'react/jsx-no-iife'?: Linter.RuleEntry<[]>;
|
|
3852
|
-
/**
|
|
3853
|
-
* Prevents using variables in JSX that are not defined in the scope.
|
|
3854
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
3855
|
-
*/
|
|
3856
|
-
'react/jsx-no-undef'?: Linter.RuleEntry<[]>;
|
|
3857
3838
|
/**
|
|
3858
3839
|
* Enforces shorthand syntax for boolean props.
|
|
3859
3840
|
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
|
|
@@ -3864,16 +3845,6 @@ interface RuleOptions {
|
|
|
3864
3845
|
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
|
|
3865
3846
|
*/
|
|
3866
3847
|
'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>;
|
|
3867
|
-
/**
|
|
3868
|
-
* Marks React variables as used when JSX is present.
|
|
3869
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-uses-react
|
|
3870
|
-
*/
|
|
3871
|
-
'react/jsx-uses-react'?: Linter.RuleEntry<[]>;
|
|
3872
|
-
/**
|
|
3873
|
-
* Marks JSX element variables as used.
|
|
3874
|
-
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
3875
|
-
*/
|
|
3876
|
-
'react/jsx-uses-vars'?: Linter.RuleEntry<[]>;
|
|
3877
3848
|
/**
|
|
3878
3849
|
* Disallows accessing 'this.state' inside 'setState' calls.
|
|
3879
3850
|
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
@@ -3949,11 +3920,6 @@ interface RuleOptions {
|
|
|
3949
3920
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
3950
3921
|
*/
|
|
3951
3922
|
'react/no-create-ref'?: Linter.RuleEntry<[]>;
|
|
3952
|
-
/**
|
|
3953
|
-
* Disallows the 'defaultProps' property in favor of ES6 default parameters.
|
|
3954
|
-
* @see https://eslint-react.xyz/docs/rules/no-default-props
|
|
3955
|
-
*/
|
|
3956
|
-
'react/no-default-props'?: Linter.RuleEntry<[]>;
|
|
3957
3923
|
/**
|
|
3958
3924
|
* Disallows direct mutation of 'this.state'.
|
|
3959
3925
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
@@ -3964,22 +3930,26 @@ interface RuleOptions {
|
|
|
3964
3930
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
3965
3931
|
*/
|
|
3966
3932
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
3967
|
-
/**
|
|
3968
|
-
* Disallows certain props on components.
|
|
3969
|
-
* @see https://eslint-react.xyz/docs/rules/no-forbidden-props
|
|
3970
|
-
* @deprecated
|
|
3971
|
-
*/
|
|
3972
|
-
'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>;
|
|
3973
3933
|
/**
|
|
3974
3934
|
* Replaces usage of 'forwardRef' with passing 'ref' as a prop.
|
|
3975
3935
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
3976
3936
|
*/
|
|
3977
3937
|
'react/no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
3938
|
+
/**
|
|
3939
|
+
* Prevents implicitly passing the 'children' prop to components.
|
|
3940
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-children
|
|
3941
|
+
*/
|
|
3942
|
+
'react/no-implicit-children'?: Linter.RuleEntry<[]>;
|
|
3978
3943
|
/**
|
|
3979
3944
|
* Prevents implicitly passing the 'key' prop to components.
|
|
3980
3945
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
3981
3946
|
*/
|
|
3982
3947
|
'react/no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
3948
|
+
/**
|
|
3949
|
+
* Prevents implicitly passing the 'ref' prop to components.
|
|
3950
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-ref
|
|
3951
|
+
*/
|
|
3952
|
+
'react/no-implicit-ref'?: Linter.RuleEntry<[]>;
|
|
3983
3953
|
/**
|
|
3984
3954
|
* Prevents problematic leaked values from being rendered.
|
|
3985
3955
|
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
@@ -4015,11 +3985,6 @@ interface RuleOptions {
|
|
|
4015
3985
|
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
4016
3986
|
*/
|
|
4017
3987
|
'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
4018
|
-
/**
|
|
4019
|
-
* Disallows 'propTypes' in favor of TypeScript or another type-checking solution.
|
|
4020
|
-
* @see https://eslint-react.xyz/docs/rules/no-prop-types
|
|
4021
|
-
*/
|
|
4022
|
-
'react/no-prop-types'?: Linter.RuleEntry<[]>;
|
|
4023
3988
|
/**
|
|
4024
3989
|
* Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
|
|
4025
3990
|
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
@@ -4040,16 +4005,6 @@ interface RuleOptions {
|
|
|
4040
4005
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
4041
4006
|
*/
|
|
4042
4007
|
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4043
|
-
/**
|
|
4044
|
-
* Replaces string refs with callback refs.
|
|
4045
|
-
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
4046
|
-
*/
|
|
4047
|
-
'react/no-string-refs'?: Linter.RuleEntry<[]>;
|
|
4048
|
-
/**
|
|
4049
|
-
* Disallows unnecessary 'key' props on nested child elements when rendering lists.
|
|
4050
|
-
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
|
|
4051
|
-
*/
|
|
4052
|
-
'react/no-unnecessary-key'?: Linter.RuleEntry<[]>;
|
|
4053
4008
|
/**
|
|
4054
4009
|
* Disallows unnecessary usage of 'useCallback'.
|
|
4055
4010
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
@@ -4065,11 +4020,6 @@ interface RuleOptions {
|
|
|
4065
4020
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
4066
4021
|
*/
|
|
4067
4022
|
'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
4068
|
-
/**
|
|
4069
|
-
* Disallows unnecessary usage of 'useRef'.
|
|
4070
|
-
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-ref
|
|
4071
|
-
*/
|
|
4072
|
-
'react/no-unnecessary-use-ref'?: Linter.RuleEntry<[]>;
|
|
4073
4023
|
/**
|
|
4074
4024
|
* Warns about the use of 'UNSAFE_componentWillMount' in class components.
|
|
4075
4025
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
@@ -4115,11 +4065,6 @@ interface RuleOptions {
|
|
|
4115
4065
|
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
4116
4066
|
*/
|
|
4117
4067
|
'react/no-use-context'?: Linter.RuleEntry<[]>;
|
|
4118
|
-
/**
|
|
4119
|
-
* Disallows useless 'forwardRef' calls on components that don't use 'ref's.
|
|
4120
|
-
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
4121
|
-
*/
|
|
4122
|
-
'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>;
|
|
4123
4068
|
/**
|
|
4124
4069
|
* Disallows useless fragment elements.
|
|
4125
4070
|
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
@@ -4136,15 +4081,55 @@ interface RuleOptions {
|
|
|
4136
4081
|
*/
|
|
4137
4082
|
'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
4138
4083
|
/**
|
|
4139
|
-
*
|
|
4140
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4084
|
+
* Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
|
|
4085
|
+
* @see https://eslint-react.xyz/docs/rules/purity
|
|
4141
4086
|
*/
|
|
4142
|
-
'react/
|
|
4087
|
+
'react/purity'?: Linter.RuleEntry<[]>;
|
|
4143
4088
|
/**
|
|
4144
|
-
*
|
|
4145
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4089
|
+
* Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
|
|
4090
|
+
* @see https://eslint-react.xyz/docs/rules/refs
|
|
4146
4091
|
*/
|
|
4147
|
-
'react/
|
|
4092
|
+
'react/refs'?: Linter.RuleEntry<[]>;
|
|
4093
|
+
/**
|
|
4094
|
+
* Enforces the Rules of Hooks.
|
|
4095
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
4096
|
+
*/
|
|
4097
|
+
'react/rules-of-hooks'?: Linter.RuleEntry<ReactRulesOfHooks>;
|
|
4098
|
+
/**
|
|
4099
|
+
* Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
|
|
4100
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-effect
|
|
4101
|
+
*/
|
|
4102
|
+
'react/set-state-in-effect'?: Linter.RuleEntry<[]>;
|
|
4103
|
+
/**
|
|
4104
|
+
* Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
|
|
4105
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-render
|
|
4106
|
+
*/
|
|
4107
|
+
'react/set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
4108
|
+
/**
|
|
4109
|
+
* Enforces the Rules of Props.
|
|
4110
|
+
* @see https://eslint-react.xyz/docs/rules/unstable-rules-of-props
|
|
4111
|
+
*/
|
|
4112
|
+
'react/unstable-rules-of-props'?: Linter.RuleEntry<[]>;
|
|
4113
|
+
/**
|
|
4114
|
+
* Enforces the Rules of State.
|
|
4115
|
+
* @see https://eslint-react.xyz/docs/rules/unstable-rules-of-state
|
|
4116
|
+
*/
|
|
4117
|
+
'react/unstable-rules-of-state'?: Linter.RuleEntry<[]>;
|
|
4118
|
+
/**
|
|
4119
|
+
* Validates against syntax that React Compiler does not support.
|
|
4120
|
+
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
4121
|
+
*/
|
|
4122
|
+
'react/unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
4123
|
+
/**
|
|
4124
|
+
* Validates that 'useMemo' is called with a callback that returns a value.
|
|
4125
|
+
* @see https://eslint-react.xyz/docs/rules/use-memo
|
|
4126
|
+
*/
|
|
4127
|
+
'react/use-memo'?: Linter.RuleEntry<[]>;
|
|
4128
|
+
/**
|
|
4129
|
+
* Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
|
|
4130
|
+
* @see https://eslint-react.xyz/docs/rules/use-state
|
|
4131
|
+
*/
|
|
4132
|
+
'react/use-state'?: Linter.RuleEntry<ReactUseState>;
|
|
4148
4133
|
/**
|
|
4149
4134
|
* disallow confusing quantifiers
|
|
4150
4135
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
|
|
@@ -8728,6 +8713,11 @@ type DotLocation = [] | [("object" | "property")]; // ----- dot-notation -----
|
|
|
8728
8713
|
type DotNotation = [] | [{
|
|
8729
8714
|
allowKeywords?: boolean;
|
|
8730
8715
|
allowPattern?: string;
|
|
8716
|
+
}]; // ----- e18e/ban-dependencies -----
|
|
8717
|
+
type E18EBanDependencies = [] | [{
|
|
8718
|
+
presets?: string[];
|
|
8719
|
+
modules?: string[];
|
|
8720
|
+
allowed?: string[];
|
|
8731
8721
|
}]; // ----- eol-last -----
|
|
8732
8722
|
type EolLast = [] | [("always" | "never" | "unix" | "windows")]; // ----- eqeqeq -----
|
|
8733
8723
|
type Eqeqeq = ([] | ["always"] | ["always", {
|
|
@@ -13311,139 +13301,35 @@ type Radix = [] | [("always" | "as-needed")]; // ----- react-dom/no-unknown-prop
|
|
|
13311
13301
|
type ReactDomNoUnknownProperty = [] | [{
|
|
13312
13302
|
ignore?: string[];
|
|
13313
13303
|
requireDataLowercase?: boolean;
|
|
13314
|
-
}]; // ----- react-hooks/automatic-effect-dependencies -----
|
|
13315
|
-
type ReactHooksAutomaticEffectDependencies = [] | [{
|
|
13316
|
-
[k: string]: unknown | undefined;
|
|
13317
|
-
}]; // ----- react-hooks/capitalized-calls -----
|
|
13318
|
-
type ReactHooksCapitalizedCalls = [] | [{
|
|
13319
|
-
[k: string]: unknown | undefined;
|
|
13320
|
-
}]; // ----- react-hooks/component-hook-factories -----
|
|
13321
|
-
type ReactHooksComponentHookFactories = [] | [{
|
|
13322
|
-
[k: string]: unknown | undefined;
|
|
13323
|
-
}]; // ----- react-hooks/config -----
|
|
13324
|
-
type ReactHooksConfig = [] | [{
|
|
13325
|
-
[k: string]: unknown | undefined;
|
|
13326
|
-
}]; // ----- react-hooks/error-boundaries -----
|
|
13327
|
-
type ReactHooksErrorBoundaries = [] | [{
|
|
13328
|
-
[k: string]: unknown | undefined;
|
|
13329
|
-
}]; // ----- react-hooks/exhaustive-deps -----
|
|
13330
|
-
type ReactHooksExhaustiveDeps = [] | [{
|
|
13331
|
-
additionalHooks?: string;
|
|
13332
|
-
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
13333
|
-
experimental_autoDependenciesHooks?: string[];
|
|
13334
|
-
requireExplicitEffectDeps?: boolean;
|
|
13335
|
-
}]; // ----- react-hooks/fbt -----
|
|
13336
|
-
type ReactHooksFbt = [] | [{
|
|
13337
|
-
[k: string]: unknown | undefined;
|
|
13338
|
-
}]; // ----- react-hooks/fire -----
|
|
13339
|
-
type ReactHooksFire = [] | [{
|
|
13340
|
-
[k: string]: unknown | undefined;
|
|
13341
|
-
}]; // ----- react-hooks/gating -----
|
|
13342
|
-
type ReactHooksGating = [] | [{
|
|
13343
|
-
[k: string]: unknown | undefined;
|
|
13344
|
-
}]; // ----- react-hooks/globals -----
|
|
13345
|
-
type ReactHooksGlobals = [] | [{
|
|
13346
|
-
[k: string]: unknown | undefined;
|
|
13347
|
-
}]; // ----- react-hooks/hooks -----
|
|
13348
|
-
type ReactHooksHooks = [] | [{
|
|
13349
|
-
[k: string]: unknown | undefined;
|
|
13350
|
-
}]; // ----- react-hooks/immutability -----
|
|
13351
|
-
type ReactHooksImmutability = [] | [{
|
|
13352
|
-
[k: string]: unknown | undefined;
|
|
13353
|
-
}]; // ----- react-hooks/incompatible-library -----
|
|
13354
|
-
type ReactHooksIncompatibleLibrary = [] | [{
|
|
13355
|
-
[k: string]: unknown | undefined;
|
|
13356
|
-
}]; // ----- react-hooks/invariant -----
|
|
13357
|
-
type ReactHooksInvariant = [] | [{
|
|
13358
|
-
[k: string]: unknown | undefined;
|
|
13359
|
-
}]; // ----- react-hooks/memoized-effect-dependencies -----
|
|
13360
|
-
type ReactHooksMemoizedEffectDependencies = [] | [{
|
|
13361
|
-
[k: string]: unknown | undefined;
|
|
13362
|
-
}]; // ----- react-hooks/no-deriving-state-in-effects -----
|
|
13363
|
-
type ReactHooksNoDerivingStateInEffects = [] | [{
|
|
13364
|
-
[k: string]: unknown | undefined;
|
|
13365
|
-
}]; // ----- react-hooks/preserve-manual-memoization -----
|
|
13366
|
-
type ReactHooksPreserveManualMemoization = [] | [{
|
|
13367
|
-
[k: string]: unknown | undefined;
|
|
13368
|
-
}]; // ----- react-hooks/purity -----
|
|
13369
|
-
type ReactHooksPurity = [] | [{
|
|
13370
|
-
[k: string]: unknown | undefined;
|
|
13371
|
-
}]; // ----- react-hooks/refs -----
|
|
13372
|
-
type ReactHooksRefs = [] | [{
|
|
13373
|
-
[k: string]: unknown | undefined;
|
|
13374
|
-
}]; // ----- react-hooks/rule-suppression -----
|
|
13375
|
-
type ReactHooksRuleSuppression = [] | [{
|
|
13376
|
-
[k: string]: unknown | undefined;
|
|
13377
|
-
}]; // ----- react-hooks/rules-of-hooks -----
|
|
13378
|
-
type ReactHooksRulesOfHooks = [] | [{
|
|
13379
|
-
additionalHooks?: string;
|
|
13380
|
-
}]; // ----- react-hooks/set-state-in-effect -----
|
|
13381
|
-
type ReactHooksSetStateInEffect = [] | [{
|
|
13382
|
-
[k: string]: unknown | undefined;
|
|
13383
|
-
}]; // ----- react-hooks/set-state-in-render -----
|
|
13384
|
-
type ReactHooksSetStateInRender = [] | [{
|
|
13385
|
-
[k: string]: unknown | undefined;
|
|
13386
|
-
}]; // ----- react-hooks/static-components -----
|
|
13387
|
-
type ReactHooksStaticComponents = [] | [{
|
|
13388
|
-
[k: string]: unknown | undefined;
|
|
13389
|
-
}]; // ----- react-hooks/syntax -----
|
|
13390
|
-
type ReactHooksSyntax = [] | [{
|
|
13391
|
-
[k: string]: unknown | undefined;
|
|
13392
|
-
}]; // ----- react-hooks/todo -----
|
|
13393
|
-
type ReactHooksTodo = [] | [{
|
|
13394
|
-
[k: string]: unknown | undefined;
|
|
13395
|
-
}]; // ----- react-hooks/unsupported-syntax -----
|
|
13396
|
-
type ReactHooksUnsupportedSyntax = [] | [{
|
|
13397
|
-
[k: string]: unknown | undefined;
|
|
13398
|
-
}]; // ----- react-hooks/use-memo -----
|
|
13399
|
-
type ReactHooksUseMemo = [] | [{
|
|
13400
|
-
[k: string]: unknown | undefined;
|
|
13401
|
-
}]; // ----- react-hooks/void-use-memo -----
|
|
13402
|
-
type ReactHooksVoidUseMemo = [] | [{
|
|
13403
|
-
[k: string]: unknown | undefined;
|
|
13404
|
-
}]; // ----- react-naming-convention/component-name -----
|
|
13405
|
-
type ReactNamingConventionComponentName = [] | [(("PascalCase" | "CONSTANT_CASE") | {
|
|
13406
|
-
allowAllCaps?: boolean;
|
|
13407
|
-
excepts?: string[];
|
|
13408
|
-
rule?: ("PascalCase" | "CONSTANT_CASE");
|
|
13409
|
-
})]; // ----- react-naming-convention/filename -----
|
|
13410
|
-
type ReactNamingConventionFilename = [] | [(("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | {
|
|
13411
|
-
excepts?: string[];
|
|
13412
|
-
extensions?: string[];
|
|
13413
|
-
rule?: ("PascalCase" | "camelCase" | "kebab-case" | "snake_case");
|
|
13414
|
-
})]; // ----- react-naming-convention/filename-extension -----
|
|
13415
|
-
type ReactNamingConventionFilenameExtension = [] | [(("always" | "as-needed") | {
|
|
13416
|
-
allow?: ("always" | "as-needed");
|
|
13417
|
-
extensions?: string[];
|
|
13418
|
-
ignoreFilesWithoutCode?: boolean;
|
|
13419
|
-
})]; // ----- react-naming-convention/use-state -----
|
|
13420
|
-
type ReactNamingConventionUseState = [] | [{
|
|
13421
|
-
enforceAssignment?: boolean;
|
|
13422
|
-
enforceSetterName?: boolean;
|
|
13423
13304
|
}]; // ----- react-refresh/only-export-components -----
|
|
13424
13305
|
type ReactRefreshOnlyExportComponents = [] | [{
|
|
13425
13306
|
extraHOCs?: string[];
|
|
13426
13307
|
allowExportNames?: string[];
|
|
13427
13308
|
allowConstantExport?: boolean;
|
|
13428
13309
|
checkJS?: boolean;
|
|
13310
|
+
}]; // ----- react/exhaustive-deps -----
|
|
13311
|
+
type ReactExhaustiveDeps = [] | [{
|
|
13312
|
+
additionalHooks?: string;
|
|
13313
|
+
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
13314
|
+
experimental_autoDependenciesHooks?: string[];
|
|
13315
|
+
requireExplicitEffectDeps?: boolean;
|
|
13429
13316
|
}]; // ----- react/jsx-shorthand-boolean -----
|
|
13430
13317
|
type ReactJsxShorthandBoolean = [] | [(-1 | 1)]; // ----- react/jsx-shorthand-fragment -----
|
|
13431
|
-
type ReactJsxShorthandFragment = [] | [(-1 | 1)]; // ----- react/no-
|
|
13432
|
-
type ReactNoForbiddenProps = [] | [{
|
|
13433
|
-
forbid?: (string | {
|
|
13434
|
-
excludedNodes?: string[];
|
|
13435
|
-
prop: string;
|
|
13436
|
-
} | {
|
|
13437
|
-
includedNodes?: string[];
|
|
13438
|
-
prop: string;
|
|
13439
|
-
})[];
|
|
13440
|
-
}]; // ----- react/no-unstable-default-props -----
|
|
13318
|
+
type ReactJsxShorthandFragment = [] | [(-1 | 1)]; // ----- react/no-unstable-default-props -----
|
|
13441
13319
|
type ReactNoUnstableDefaultProps = [] | [{
|
|
13442
13320
|
safeDefaultProps?: string[];
|
|
13443
13321
|
}]; // ----- react/no-useless-fragment -----
|
|
13444
13322
|
type ReactNoUselessFragment = [] | [{
|
|
13445
13323
|
allowEmptyFragment?: boolean;
|
|
13446
13324
|
allowExpressions?: boolean;
|
|
13325
|
+
}]; // ----- react/rules-of-hooks -----
|
|
13326
|
+
type ReactRulesOfHooks = [] | [{
|
|
13327
|
+
additionalHooks?: string;
|
|
13328
|
+
}]; // ----- react/use-state -----
|
|
13329
|
+
type ReactUseState = [] | [{
|
|
13330
|
+
enforceAssignment?: boolean;
|
|
13331
|
+
enforceLazyInitialization?: boolean;
|
|
13332
|
+
enforceSetterName?: boolean;
|
|
13447
13333
|
}]; // ----- regexp/hexadecimal-escape -----
|
|
13448
13334
|
type RegexpHexadecimalEscape = [] | [("always" | "never")]; // ----- regexp/letter-case -----
|
|
13449
13335
|
type RegexpLetterCase = [] | [{
|
|
@@ -13791,33 +13677,33 @@ type StyleExpListStyle = [] | [{
|
|
|
13791
13677
|
singleLine?: _StyleExpListStyle_SingleLineConfig;
|
|
13792
13678
|
multiLine?: _StyleExpListStyle_MultiLineConfig;
|
|
13793
13679
|
overrides?: {
|
|
13794
|
-
"()"?: _StyleExpListStyle_BaseConfig;
|
|
13795
|
-
"[]"?: _StyleExpListStyle_BaseConfig;
|
|
13796
|
-
"{}"?: _StyleExpListStyle_BaseConfig;
|
|
13797
|
-
"<>"?: _StyleExpListStyle_BaseConfig;
|
|
13798
|
-
ArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
13799
|
-
ArrayPattern?: _StyleExpListStyle_BaseConfig;
|
|
13800
|
-
ArrowFunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
13801
|
-
CallExpression?: _StyleExpListStyle_BaseConfig;
|
|
13802
|
-
ExportNamedDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
13803
|
-
FunctionDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
13804
|
-
FunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
13805
|
-
IfStatement?: _StyleExpListStyle_BaseConfig;
|
|
13806
|
-
ImportAttributes?: _StyleExpListStyle_BaseConfig;
|
|
13807
|
-
ImportDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
13808
|
-
JSONArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
13809
|
-
JSONObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
13810
|
-
NewExpression?: _StyleExpListStyle_BaseConfig;
|
|
13811
|
-
ObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
13812
|
-
ObjectPattern?: _StyleExpListStyle_BaseConfig;
|
|
13813
|
-
TSDeclareFunction?: _StyleExpListStyle_BaseConfig;
|
|
13814
|
-
TSEnumBody?: _StyleExpListStyle_BaseConfig;
|
|
13815
|
-
TSFunctionType?: _StyleExpListStyle_BaseConfig;
|
|
13816
|
-
TSInterfaceBody?: _StyleExpListStyle_BaseConfig;
|
|
13817
|
-
TSTupleType?: _StyleExpListStyle_BaseConfig;
|
|
13818
|
-
TSTypeLiteral?: _StyleExpListStyle_BaseConfig;
|
|
13819
|
-
TSTypeParameterDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
13820
|
-
TSTypeParameterInstantiation?: _StyleExpListStyle_BaseConfig;
|
|
13680
|
+
"()"?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13681
|
+
"[]"?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13682
|
+
"{}"?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13683
|
+
"<>"?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13684
|
+
ArrayExpression?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13685
|
+
ArrayPattern?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13686
|
+
ArrowFunctionExpression?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13687
|
+
CallExpression?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13688
|
+
ExportNamedDeclaration?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13689
|
+
FunctionDeclaration?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13690
|
+
FunctionExpression?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13691
|
+
IfStatement?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13692
|
+
ImportAttributes?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13693
|
+
ImportDeclaration?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13694
|
+
JSONArrayExpression?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13695
|
+
JSONObjectExpression?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13696
|
+
NewExpression?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13697
|
+
ObjectExpression?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13698
|
+
ObjectPattern?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13699
|
+
TSDeclareFunction?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13700
|
+
TSEnumBody?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13701
|
+
TSFunctionType?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13702
|
+
TSInterfaceBody?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13703
|
+
TSTupleType?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13704
|
+
TSTypeLiteral?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13705
|
+
TSTypeParameterDeclaration?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13706
|
+
TSTypeParameterInstantiation?: (_StyleExpListStyle_BaseConfig | "off");
|
|
13821
13707
|
};
|
|
13822
13708
|
}];
|
|
13823
13709
|
interface _StyleExpListStyle_SingleLineConfig {
|
|
@@ -14688,6 +14574,7 @@ type StylePaddingLineBetweenStatements = {
|
|
|
14688
14574
|
}[];
|
|
14689
14575
|
interface _StylePaddingLineBetweenStatements_SelectorOption {
|
|
14690
14576
|
selector: string;
|
|
14577
|
+
lineMode?: ("any" | "singleline" | "multiline");
|
|
14691
14578
|
} // ----- style/quote-props -----
|
|
14692
14579
|
type StyleQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
14693
14580
|
keywords?: boolean;
|
|
@@ -15761,6 +15648,18 @@ type TsPreferOptionalChain = [] | [{
|
|
|
15761
15648
|
requireNullish?: boolean;
|
|
15762
15649
|
}]; // ----- ts/prefer-promise-reject-errors -----
|
|
15763
15650
|
type TsPreferPromiseRejectErrors = [] | [{
|
|
15651
|
+
allow?: (string | {
|
|
15652
|
+
from: "file";
|
|
15653
|
+
name: (string | [string, ...(string)[]]);
|
|
15654
|
+
path?: string;
|
|
15655
|
+
} | {
|
|
15656
|
+
from: "lib";
|
|
15657
|
+
name: (string | [string, ...(string)[]]);
|
|
15658
|
+
} | {
|
|
15659
|
+
from: "package";
|
|
15660
|
+
name: (string | [string, ...(string)[]]);
|
|
15661
|
+
package: string;
|
|
15662
|
+
})[];
|
|
15764
15663
|
allowEmptyReject?: boolean;
|
|
15765
15664
|
allowThrowingAny?: boolean;
|
|
15766
15665
|
allowThrowingUnknown?: boolean;
|
|
@@ -17371,7 +17270,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
17371
17270
|
exceptRange?: boolean;
|
|
17372
17271
|
onlyEquality?: boolean;
|
|
17373
17272
|
}]; // Names of all the configs
|
|
17374
|
-
type ConfigNames = 'luxass/gitignore' | 'luxass/ignores' | 'luxass/javascript/setup' | 'luxass/javascript/rules' | 'luxass/disables/cli' | 'luxass/eslint-comments' | 'command' | 'luxass/perfectionist/setup' | 'luxass/node/setup' | 'luxass/node/rules' | 'luxass/jsdoc/setup' | 'luxass/jsdoc/rules' | 'luxass/imports' | 'luxass/unicorn/rules' | 'luxass/jsx/setup' | 'luxass/typescript/setup' | 'luxass/typescript/type-aware-parser' | 'luxass/typescript/parser' | 'luxass/typescript/rules' | 'luxass/typescript/rules-type-aware' | 'luxas/typescript/erasable-syntax-only' | 'luxass/stylistic' | 'luxass/regexp/rules' | 'luxass/test/setup' | 'luxass/test/rules' | 'luxass/react/setup' | 'luxass/react/rules' | 'luxass/react/type-aware-rules' | 'luxass/vue/setup' | 'luxass/vue/rules' | 'luxass/astro/setup' | 'luxass/astro/rules' | 'luxass/unocss' | 'luxass/jsonc/setup' | 'luxass/jsonc/rules' | 'luxass/sort/package-json' | 'luxass/sort/tsconfig' | 'luxass/pnpm/package-json' | 'luxass/pnpm/pnpm-workspace-yaml' | 'luxass/pnpm/pnpm-workspace-yaml-sort' | 'luxass/yaml/setup' | 'luxass/yaml/rules' | 'luxass/yaml/pnpm-workspace' | 'luxass/toml/setup' | 'luxass/toml/rules' | 'luxass/markdown/setup' | 'luxass/markdown/processor' | 'luxass/markdown/parser' | 'luxass/markdown/rules' | 'luxass/markdown/disables/markdown' | 'luxass/markdown/disables/code' | 'luxass/formatter/setup' | 'luxass/formatter/css' | 'luxass/formatter/scss' | 'luxass/formatter/less' | 'luxass/formatter/html' | 'luxass/formatter/xml' | 'luxass/formatter/svg' | 'luxass/formatter/markdown' | 'luxass/formatter/astro' | 'luxass/formatter/graphql' | 'luxass/disables/scripts' | 'luxass/disables/cli' | 'luxass/disables/bin' | 'luxass/disables/dts' | 'luxass/disables/cjs' | 'luxass/disables/github-actions' | 'luxass/disables/config-files';
|
|
17273
|
+
type ConfigNames = 'luxass/gitignore' | 'luxass/ignores' | 'luxass/javascript/setup' | 'luxass/javascript/rules' | 'luxass/disables/cli' | 'luxass/eslint-comments' | 'command' | 'luxass/perfectionist/setup' | 'luxass/node/setup' | 'luxass/node/rules' | 'luxass/jsdoc/setup' | 'luxass/jsdoc/rules' | 'luxass/imports' | 'luxass/e18e/rules' | 'luxass/unicorn/rules' | 'luxass/jsx/setup' | 'luxass/typescript/setup' | 'luxass/typescript/type-aware-parser' | 'luxass/typescript/parser' | 'luxass/typescript/rules' | 'luxass/typescript/rules-type-aware' | 'luxas/typescript/erasable-syntax-only' | 'luxass/stylistic' | 'luxass/regexp/rules' | 'luxass/test/setup' | 'luxass/test/rules' | 'luxass/react/setup' | 'luxass/react/rules' | 'luxass/react/typescript' | 'luxass/react/type-aware-rules' | 'luxass/vue/setup' | 'luxass/vue/rules' | 'luxass/astro/setup' | 'luxass/astro/rules' | 'luxass/unocss' | 'luxass/jsonc/setup' | 'luxass/jsonc/rules' | 'luxass/sort/package-json' | 'luxass/sort/tsconfig' | 'luxass/pnpm/package-json' | 'luxass/pnpm/pnpm-workspace-yaml' | 'luxass/pnpm/pnpm-workspace-yaml-sort' | 'luxass/yaml/setup' | 'luxass/yaml/rules' | 'luxass/yaml/pnpm-workspace' | 'luxass/toml/setup' | 'luxass/toml/rules' | 'luxass/markdown/setup' | 'luxass/markdown/processor' | 'luxass/markdown/parser' | 'luxass/markdown/rules' | 'luxass/markdown/disables/markdown' | 'luxass/markdown/disables/code' | 'luxass/formatter/setup' | 'luxass/formatter/css' | 'luxass/formatter/scss' | 'luxass/formatter/less' | 'luxass/formatter/html' | 'luxass/formatter/xml' | 'luxass/formatter/svg' | 'luxass/formatter/markdown' | 'luxass/formatter/astro' | 'luxass/formatter/graphql' | 'luxass/disables/scripts' | 'luxass/disables/cli' | 'luxass/disables/bin' | 'luxass/disables/dts' | 'luxass/disables/cjs' | 'luxass/disables/github-actions' | 'luxass/disables/config-files';
|
|
17375
17274
|
//#endregion
|
|
17376
17275
|
//#region src/types.d.ts
|
|
17377
17276
|
type Awaitable<T> = T | Promise<T>;
|
|
@@ -17417,6 +17316,12 @@ interface ConfigOptions {
|
|
|
17417
17316
|
* @default []
|
|
17418
17317
|
*/
|
|
17419
17318
|
ignores?: string[] | ((originals: string[]) => string[]);
|
|
17319
|
+
/**
|
|
17320
|
+
* Options for [@e18e/eslint-plugin](https://github.com/e18e/eslint-plugin)
|
|
17321
|
+
*
|
|
17322
|
+
* @default true
|
|
17323
|
+
*/
|
|
17324
|
+
e18e?: boolean | E18eOptions;
|
|
17420
17325
|
/**
|
|
17421
17326
|
* Options for eslint-plugin-unicorn.
|
|
17422
17327
|
*
|
|
@@ -17473,7 +17378,6 @@ interface ConfigOptions {
|
|
|
17473
17378
|
*
|
|
17474
17379
|
* Requires installing:
|
|
17475
17380
|
* - `@eslint-react/eslint-plugin`
|
|
17476
|
-
* - `eslint-plugin-react-hooks`
|
|
17477
17381
|
* - `eslint-plugin-react-refresh`
|
|
17478
17382
|
*
|
|
17479
17383
|
* @default false
|
|
@@ -17807,4 +17711,4 @@ declare function isPackageInScope(name: string): boolean;
|
|
|
17807
17711
|
declare function isInEditorEnv(): boolean;
|
|
17808
17712
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
17809
17713
|
//#endregion
|
|
17810
|
-
export { type AstroOptions, Awaitable, type ConfigNames, ConfigOptions, type FormattersOptions, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_NEXTJS_OG, GLOB_NEXTJS_ROUTES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type ImportsOptions, type JSDOCOptions, type JSONOptions, type JavaScriptOptions, type MarkdownOptions, type PnpmOptions, ProjectType, type ReactOptions, type RegExpOptions, ResolvedOptions, type RuleOptions, Rules, type StylisticConfig, type StylisticOptions, type TOMLOptions, type TailwindCSSOptions, type TestOptions, type TypeScriptOptions, TypedFlatConfigItem, type UnicornOptions, type UnoCSSOptions, UserConfigItem, type VueOptions, type YAMLOptions, astro, combine, command, comments, luxass as default, luxass, disables, ensure, formatters, getOverrides, ignores, imports, interop, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
17714
|
+
export { type AstroOptions, Awaitable, type ConfigNames, ConfigOptions, type E18eOptions, type FormattersOptions, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_NEXTJS_OG, GLOB_NEXTJS_ROUTES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type ImportsOptions, type JSDOCOptions, type JSONOptions, type JavaScriptOptions, type MarkdownOptions, type PnpmOptions, ProjectType, type ReactOptions, type RegExpOptions, ResolvedOptions, type RuleOptions, Rules, type StylisticConfig, type StylisticOptions, type TOMLOptions, type TailwindCSSOptions, type TestOptions, type TypeScriptOptions, TypedFlatConfigItem, type UnicornOptions, type UnoCSSOptions, UserConfigItem, type VueOptions, type YAMLOptions, astro, combine, command, comments, luxass as default, luxass, disables, e18e, ensure, formatters, getOverrides, ignores, imports, interop, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|