@jsse/eslint-config 0.9.0 → 0.9.2
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/CHANGELOG.md +14 -0
- package/README.md +68 -21
- package/dist/cli.js +29 -30
- package/dist/dist-DS02OtwI.js +143 -0
- package/dist/{fixable-rules-map-CvRdO-mG.d.ts → fixable-rules-map-CCZ-PRHv.d.ts} +1073 -658
- package/dist/{fixable-rules-map-B2-5HybI.js → fixable-rules-map-dNndx2ig.js} +16 -0
- package/dist/fixable.d.ts +2 -2
- package/dist/fixable.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +851 -335
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +54 -54
|
@@ -1,7 +1,59 @@
|
|
|
1
1
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
2
2
|
import { Linter } from "eslint";
|
|
3
|
-
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
4
3
|
|
|
4
|
+
//#region node_modules/.pnpm/eslint-config-flat-gitignore@2.3.0_eslint@10.6.0_jiti@2.7.0_/node_modules/eslint-config-flat-gitignore/dist/index.d.mts
|
|
5
|
+
interface FlatGitignoreOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Name of the configuration.
|
|
8
|
+
* @default 'gitignore'
|
|
9
|
+
*/
|
|
10
|
+
name?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Path to `.gitignore` files, or files with compatible formats like `.eslintignore`.
|
|
13
|
+
* @default ['.gitignore'] // or findUpSync('.gitignore')
|
|
14
|
+
*/
|
|
15
|
+
files?: string | string[];
|
|
16
|
+
/**
|
|
17
|
+
* Path to `.gitmodules` file.
|
|
18
|
+
* @default ['.gitmodules'] // or findUpSync('.gitmodules')
|
|
19
|
+
*/
|
|
20
|
+
filesGitModules?: string | string[];
|
|
21
|
+
/**
|
|
22
|
+
* Throw an error if gitignore file not found.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
strict?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Mark the current working directory as the root directory,
|
|
28
|
+
* disable searching for `.gitignore` files in parent directories.
|
|
29
|
+
*
|
|
30
|
+
* This option is not effective when `files` is explicitly specified.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
root?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Current working directory.
|
|
36
|
+
* Used to resolve relative paths.
|
|
37
|
+
* @default process.cwd()
|
|
38
|
+
*/
|
|
39
|
+
cwd?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Also include recursive `.gitignore` files under `cwd`.
|
|
42
|
+
*
|
|
43
|
+
* This option is useful for monorepos or projects that keep
|
|
44
|
+
* per-folder `.gitignore` files.
|
|
45
|
+
*
|
|
46
|
+
* Pass `{ skipDirs: ['name'] }` to skip directory names while
|
|
47
|
+
* scanning recursively. `skipDirs` matches by directory name at
|
|
48
|
+
* any depth (not by path), and is applied in addition to `.git`
|
|
49
|
+
* and `node_modules`.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
recursive?: boolean | {
|
|
53
|
+
skipDirs: string[];
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
5
57
|
//#region src/_generated/dts/builtins.d.ts
|
|
6
58
|
interface BuiltinsRuleOptions {
|
|
7
59
|
/**
|
|
@@ -3864,152 +3916,6 @@ interface EslintReactRuleOptions {
|
|
|
3864
3916
|
* @see https://eslint-react.xyz/docs/rules/use-state
|
|
3865
3917
|
*/
|
|
3866
3918
|
"@eslint-react/x-use-state"?: Linter.RuleEntry<EslintReactXUseState>;
|
|
3867
|
-
/**
|
|
3868
|
-
* Validates against calling capitalized functions/methods instead of using JSX
|
|
3869
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/capitalized-calls
|
|
3870
|
-
*/
|
|
3871
|
-
"react-hooks/capitalized-calls"?: Linter.RuleEntry<ReactHooksCapitalizedCalls$1>;
|
|
3872
|
-
/**
|
|
3873
|
-
* Deprecated: this rule has been removed in 7.1.0.
|
|
3874
|
-
* @deprecated
|
|
3875
|
-
*/
|
|
3876
|
-
"react-hooks/component-hook-factories"?: Linter.RuleEntry<[]>;
|
|
3877
|
-
/**
|
|
3878
|
-
* Validates the compiler configuration options
|
|
3879
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/config
|
|
3880
|
-
*/
|
|
3881
|
-
"react-hooks/config"?: Linter.RuleEntry<ReactHooksConfig$1>;
|
|
3882
|
-
/**
|
|
3883
|
-
* Validates usage of error boundaries instead of try/catch for errors in child components
|
|
3884
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/error-boundaries
|
|
3885
|
-
*/
|
|
3886
|
-
"react-hooks/error-boundaries"?: Linter.RuleEntry<ReactHooksErrorBoundaries$1>;
|
|
3887
|
-
/**
|
|
3888
|
-
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
3889
|
-
* @see https://github.com/facebook/react/issues/14920
|
|
3890
|
-
*/
|
|
3891
|
-
"react-hooks/exhaustive-deps"?: Linter.RuleEntry<ReactHooksExhaustiveDeps$1>;
|
|
3892
|
-
/**
|
|
3893
|
-
* Validates that effect dependencies are exhaustive and without extraneous values
|
|
3894
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/exhaustive-effect-dependencies
|
|
3895
|
-
*/
|
|
3896
|
-
"react-hooks/exhaustive-effect-dependencies"?: Linter.RuleEntry<ReactHooksExhaustiveEffectDependencies$1>;
|
|
3897
|
-
/**
|
|
3898
|
-
* Validates usage of fbt
|
|
3899
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/fbt
|
|
3900
|
-
*/
|
|
3901
|
-
"react-hooks/fbt"?: Linter.RuleEntry<ReactHooksFbt$1>;
|
|
3902
|
-
/**
|
|
3903
|
-
* Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
|
|
3904
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/gating
|
|
3905
|
-
*/
|
|
3906
|
-
"react-hooks/gating"?: Linter.RuleEntry<ReactHooksGating$1>;
|
|
3907
|
-
/**
|
|
3908
|
-
* 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)
|
|
3909
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/globals
|
|
3910
|
-
*/
|
|
3911
|
-
"react-hooks/globals"?: Linter.RuleEntry<ReactHooksGlobals$1>;
|
|
3912
|
-
/**
|
|
3913
|
-
* Validates the rules of hooks
|
|
3914
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/hooks
|
|
3915
|
-
*/
|
|
3916
|
-
"react-hooks/hooks"?: Linter.RuleEntry<ReactHooksHooks$1>;
|
|
3917
|
-
/**
|
|
3918
|
-
* 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)
|
|
3919
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/immutability
|
|
3920
|
-
*/
|
|
3921
|
-
"react-hooks/immutability"?: Linter.RuleEntry<ReactHooksImmutability$1>;
|
|
3922
|
-
/**
|
|
3923
|
-
* Validates against usage of libraries which are incompatible with memoization (manual or automatic)
|
|
3924
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/incompatible-library
|
|
3925
|
-
*/
|
|
3926
|
-
"react-hooks/incompatible-library"?: Linter.RuleEntry<ReactHooksIncompatibleLibrary$1>;
|
|
3927
|
-
/**
|
|
3928
|
-
* Internal invariants
|
|
3929
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/invariant
|
|
3930
|
-
*/
|
|
3931
|
-
"react-hooks/invariant"?: Linter.RuleEntry<ReactHooksInvariant$1>;
|
|
3932
|
-
/**
|
|
3933
|
-
* Validates that useMemo() and useCallback() specify comprehensive dependencies without extraneous values. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
3934
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/memo-dependencies
|
|
3935
|
-
*/
|
|
3936
|
-
"react-hooks/memo-dependencies"?: Linter.RuleEntry<ReactHooksMemoDependencies$1>;
|
|
3937
|
-
/**
|
|
3938
|
-
* Validates that effect dependencies are memoized
|
|
3939
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/memoized-effect-dependencies
|
|
3940
|
-
*/
|
|
3941
|
-
"react-hooks/memoized-effect-dependencies"?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies$1>;
|
|
3942
|
-
/**
|
|
3943
|
-
* Validates against deriving values from state in an effect
|
|
3944
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/no-deriving-state-in-effects
|
|
3945
|
-
*/
|
|
3946
|
-
"react-hooks/no-deriving-state-in-effects"?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects$1>;
|
|
3947
|
-
/**
|
|
3948
|
-
* 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)
|
|
3949
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/preserve-manual-memoization
|
|
3950
|
-
*/
|
|
3951
|
-
"react-hooks/preserve-manual-memoization"?: Linter.RuleEntry<ReactHooksPreserveManualMemoization$1>;
|
|
3952
|
-
/**
|
|
3953
|
-
* 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
|
|
3954
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/purity
|
|
3955
|
-
*/
|
|
3956
|
-
"react-hooks/purity"?: Linter.RuleEntry<ReactHooksPurity$1>;
|
|
3957
|
-
/**
|
|
3958
|
-
* Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
|
|
3959
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/refs
|
|
3960
|
-
*/
|
|
3961
|
-
"react-hooks/refs"?: Linter.RuleEntry<ReactHooksRefs$1>;
|
|
3962
|
-
/**
|
|
3963
|
-
* Validates against suppression of other rules
|
|
3964
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/rule-suppression
|
|
3965
|
-
*/
|
|
3966
|
-
"react-hooks/rule-suppression"?: Linter.RuleEntry<ReactHooksRuleSuppression$1>;
|
|
3967
|
-
/**
|
|
3968
|
-
* enforces the Rules of Hooks
|
|
3969
|
-
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
3970
|
-
*/
|
|
3971
|
-
"react-hooks/rules-of-hooks"?: Linter.RuleEntry<ReactHooksRulesOfHooks$1>;
|
|
3972
|
-
/**
|
|
3973
|
-
* Validates against calling setState synchronously in an effect. This can indicate non-local derived data, a derived event pattern, or improper external data synchronization.
|
|
3974
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/set-state-in-effect
|
|
3975
|
-
*/
|
|
3976
|
-
"react-hooks/set-state-in-effect"?: Linter.RuleEntry<ReactHooksSetStateInEffect$1>;
|
|
3977
|
-
/**
|
|
3978
|
-
* Validates against setting state during render, which can trigger additional renders and potential infinite render loops
|
|
3979
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/set-state-in-render
|
|
3980
|
-
*/
|
|
3981
|
-
"react-hooks/set-state-in-render"?: Linter.RuleEntry<ReactHooksSetStateInRender$1>;
|
|
3982
|
-
/**
|
|
3983
|
-
* Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
|
|
3984
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/static-components
|
|
3985
|
-
*/
|
|
3986
|
-
"react-hooks/static-components"?: Linter.RuleEntry<ReactHooksStaticComponents$1>;
|
|
3987
|
-
/**
|
|
3988
|
-
* Validates against invalid syntax
|
|
3989
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/syntax
|
|
3990
|
-
*/
|
|
3991
|
-
"react-hooks/syntax"?: Linter.RuleEntry<ReactHooksSyntax$1>;
|
|
3992
|
-
/**
|
|
3993
|
-
* Unimplemented features
|
|
3994
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/todo
|
|
3995
|
-
*/
|
|
3996
|
-
"react-hooks/todo"?: Linter.RuleEntry<ReactHooksTodo$1>;
|
|
3997
|
-
/**
|
|
3998
|
-
* Validates against syntax that we do not plan to support in React Compiler
|
|
3999
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/unsupported-syntax
|
|
4000
|
-
*/
|
|
4001
|
-
"react-hooks/unsupported-syntax"?: Linter.RuleEntry<ReactHooksUnsupportedSyntax$1>;
|
|
4002
|
-
/**
|
|
4003
|
-
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
4004
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/use-memo
|
|
4005
|
-
*/
|
|
4006
|
-
"react-hooks/use-memo"?: Linter.RuleEntry<ReactHooksUseMemo$1>;
|
|
4007
|
-
/**
|
|
4008
|
-
* 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.
|
|
4009
|
-
* @see https://react.dev/reference/eslint-plugin-react-hooks/lints/void-use-memo
|
|
4010
|
-
*/
|
|
4011
|
-
"react-hooks/void-use-memo"?: Linter.RuleEntry<ReactHooksVoidUseMemo$1>;
|
|
4012
|
-
"react-refresh/only-export-components"?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
4013
3919
|
}
|
|
4014
3920
|
/* ======= Declarations ======= */
|
|
4015
3921
|
// ----- @eslint-react/dom-no-unknown-property -----
|
|
@@ -4054,99 +3960,6 @@ type EslintReactXUseState = [] | [{
|
|
|
4054
3960
|
enforceAssignment?: boolean;
|
|
4055
3961
|
enforceLazyInitialization?: boolean;
|
|
4056
3962
|
enforceSetterName?: boolean;
|
|
4057
|
-
}]; // ----- react-hooks/capitalized-calls -----
|
|
4058
|
-
type ReactHooksCapitalizedCalls$1 = [] | [{
|
|
4059
|
-
[k: string]: unknown | undefined;
|
|
4060
|
-
}]; // ----- react-hooks/config -----
|
|
4061
|
-
type ReactHooksConfig$1 = [] | [{
|
|
4062
|
-
[k: string]: unknown | undefined;
|
|
4063
|
-
}]; // ----- react-hooks/error-boundaries -----
|
|
4064
|
-
type ReactHooksErrorBoundaries$1 = [] | [{
|
|
4065
|
-
[k: string]: unknown | undefined;
|
|
4066
|
-
}]; // ----- react-hooks/exhaustive-deps -----
|
|
4067
|
-
type ReactHooksExhaustiveDeps$1 = [] | [{
|
|
4068
|
-
additionalHooks?: string;
|
|
4069
|
-
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
4070
|
-
experimental_autoDependenciesHooks?: string[];
|
|
4071
|
-
requireExplicitEffectDeps?: boolean;
|
|
4072
|
-
}]; // ----- react-hooks/exhaustive-effect-dependencies -----
|
|
4073
|
-
type ReactHooksExhaustiveEffectDependencies$1 = [] | [{
|
|
4074
|
-
[k: string]: unknown | undefined;
|
|
4075
|
-
}]; // ----- react-hooks/fbt -----
|
|
4076
|
-
type ReactHooksFbt$1 = [] | [{
|
|
4077
|
-
[k: string]: unknown | undefined;
|
|
4078
|
-
}]; // ----- react-hooks/gating -----
|
|
4079
|
-
type ReactHooksGating$1 = [] | [{
|
|
4080
|
-
[k: string]: unknown | undefined;
|
|
4081
|
-
}]; // ----- react-hooks/globals -----
|
|
4082
|
-
type ReactHooksGlobals$1 = [] | [{
|
|
4083
|
-
[k: string]: unknown | undefined;
|
|
4084
|
-
}]; // ----- react-hooks/hooks -----
|
|
4085
|
-
type ReactHooksHooks$1 = [] | [{
|
|
4086
|
-
[k: string]: unknown | undefined;
|
|
4087
|
-
}]; // ----- react-hooks/immutability -----
|
|
4088
|
-
type ReactHooksImmutability$1 = [] | [{
|
|
4089
|
-
[k: string]: unknown | undefined;
|
|
4090
|
-
}]; // ----- react-hooks/incompatible-library -----
|
|
4091
|
-
type ReactHooksIncompatibleLibrary$1 = [] | [{
|
|
4092
|
-
[k: string]: unknown | undefined;
|
|
4093
|
-
}]; // ----- react-hooks/invariant -----
|
|
4094
|
-
type ReactHooksInvariant$1 = [] | [{
|
|
4095
|
-
[k: string]: unknown | undefined;
|
|
4096
|
-
}]; // ----- react-hooks/memo-dependencies -----
|
|
4097
|
-
type ReactHooksMemoDependencies$1 = [] | [{
|
|
4098
|
-
[k: string]: unknown | undefined;
|
|
4099
|
-
}]; // ----- react-hooks/memoized-effect-dependencies -----
|
|
4100
|
-
type ReactHooksMemoizedEffectDependencies$1 = [] | [{
|
|
4101
|
-
[k: string]: unknown | undefined;
|
|
4102
|
-
}]; // ----- react-hooks/no-deriving-state-in-effects -----
|
|
4103
|
-
type ReactHooksNoDerivingStateInEffects$1 = [] | [{
|
|
4104
|
-
[k: string]: unknown | undefined;
|
|
4105
|
-
}]; // ----- react-hooks/preserve-manual-memoization -----
|
|
4106
|
-
type ReactHooksPreserveManualMemoization$1 = [] | [{
|
|
4107
|
-
[k: string]: unknown | undefined;
|
|
4108
|
-
}]; // ----- react-hooks/purity -----
|
|
4109
|
-
type ReactHooksPurity$1 = [] | [{
|
|
4110
|
-
[k: string]: unknown | undefined;
|
|
4111
|
-
}]; // ----- react-hooks/refs -----
|
|
4112
|
-
type ReactHooksRefs$1 = [] | [{
|
|
4113
|
-
[k: string]: unknown | undefined;
|
|
4114
|
-
}]; // ----- react-hooks/rule-suppression -----
|
|
4115
|
-
type ReactHooksRuleSuppression$1 = [] | [{
|
|
4116
|
-
[k: string]: unknown | undefined;
|
|
4117
|
-
}]; // ----- react-hooks/rules-of-hooks -----
|
|
4118
|
-
type ReactHooksRulesOfHooks$1 = [] | [{
|
|
4119
|
-
additionalHooks?: string;
|
|
4120
|
-
}]; // ----- react-hooks/set-state-in-effect -----
|
|
4121
|
-
type ReactHooksSetStateInEffect$1 = [] | [{
|
|
4122
|
-
[k: string]: unknown | undefined;
|
|
4123
|
-
}]; // ----- react-hooks/set-state-in-render -----
|
|
4124
|
-
type ReactHooksSetStateInRender$1 = [] | [{
|
|
4125
|
-
[k: string]: unknown | undefined;
|
|
4126
|
-
}]; // ----- react-hooks/static-components -----
|
|
4127
|
-
type ReactHooksStaticComponents$1 = [] | [{
|
|
4128
|
-
[k: string]: unknown | undefined;
|
|
4129
|
-
}]; // ----- react-hooks/syntax -----
|
|
4130
|
-
type ReactHooksSyntax$1 = [] | [{
|
|
4131
|
-
[k: string]: unknown | undefined;
|
|
4132
|
-
}]; // ----- react-hooks/todo -----
|
|
4133
|
-
type ReactHooksTodo$1 = [] | [{
|
|
4134
|
-
[k: string]: unknown | undefined;
|
|
4135
|
-
}]; // ----- react-hooks/unsupported-syntax -----
|
|
4136
|
-
type ReactHooksUnsupportedSyntax$1 = [] | [{
|
|
4137
|
-
[k: string]: unknown | undefined;
|
|
4138
|
-
}]; // ----- react-hooks/use-memo -----
|
|
4139
|
-
type ReactHooksUseMemo$1 = [] | [{
|
|
4140
|
-
[k: string]: unknown | undefined;
|
|
4141
|
-
}]; // ----- react-hooks/void-use-memo -----
|
|
4142
|
-
type ReactHooksVoidUseMemo$1 = [] | [{
|
|
4143
|
-
[k: string]: unknown | undefined;
|
|
4144
|
-
}]; // ----- react-refresh/only-export-components -----
|
|
4145
|
-
type ReactRefreshOnlyExportComponents = [] | [{
|
|
4146
|
-
extraHOCs?: string[];
|
|
4147
|
-
allowExportNames?: string[];
|
|
4148
|
-
allowConstantExport?: boolean;
|
|
4149
|
-
checkJS?: boolean;
|
|
4150
3963
|
}];
|
|
4151
3964
|
//#endregion
|
|
4152
3965
|
//#region src/_generated/dts/ignores.d.ts
|
|
@@ -5542,11 +5355,13 @@ type JsoncSortArrayValues = [{
|
|
|
5542
5355
|
type?: "asc" | "desc";
|
|
5543
5356
|
caseSensitive?: boolean;
|
|
5544
5357
|
natural?: boolean;
|
|
5358
|
+
key?: string;
|
|
5545
5359
|
};
|
|
5546
5360
|
})[] | {
|
|
5547
5361
|
type?: "asc" | "desc";
|
|
5548
5362
|
caseSensitive?: boolean;
|
|
5549
5363
|
natural?: boolean;
|
|
5364
|
+
key?: string;
|
|
5550
5365
|
};
|
|
5551
5366
|
minValues?: number;
|
|
5552
5367
|
}, ...{
|
|
@@ -5557,11 +5372,13 @@ type JsoncSortArrayValues = [{
|
|
|
5557
5372
|
type?: "asc" | "desc";
|
|
5558
5373
|
caseSensitive?: boolean;
|
|
5559
5374
|
natural?: boolean;
|
|
5375
|
+
key?: string;
|
|
5560
5376
|
};
|
|
5561
5377
|
})[] | {
|
|
5562
5378
|
type?: "asc" | "desc";
|
|
5563
5379
|
caseSensitive?: boolean;
|
|
5564
5380
|
natural?: boolean;
|
|
5381
|
+
key?: string;
|
|
5565
5382
|
};
|
|
5566
5383
|
minValues?: number;
|
|
5567
5384
|
}[]]; // ----- jsonc/sort-keys -----
|
|
@@ -6234,18 +6051,472 @@ type NShebang = [] | [{
|
|
|
6234
6051
|
//#region src/_generated/dts/no-only-tests.d.ts
|
|
6235
6052
|
interface NoOnlyTestsRuleOptions {
|
|
6236
6053
|
/**
|
|
6237
|
-
* disallow focused/only tests
|
|
6238
|
-
* @see https://github.com/levibuzolic/eslint-plugin-no-only-tests
|
|
6054
|
+
* disallow focused/only tests
|
|
6055
|
+
* @see https://github.com/levibuzolic/eslint-plugin-no-only-tests
|
|
6056
|
+
*/
|
|
6057
|
+
"no-only-tests/no-only-tests"?: Linter.RuleEntry<NoOnlyTestsNoOnlyTests>;
|
|
6058
|
+
}
|
|
6059
|
+
/* ======= Declarations ======= */
|
|
6060
|
+
// ----- no-only-tests/no-only-tests -----
|
|
6061
|
+
type NoOnlyTestsNoOnlyTests = [] | [{
|
|
6062
|
+
block?: string[];
|
|
6063
|
+
focus?: string[];
|
|
6064
|
+
functions?: string[];
|
|
6065
|
+
fix?: boolean;
|
|
6066
|
+
}];
|
|
6067
|
+
//#endregion
|
|
6068
|
+
//#region src/_generated/dts/node-test.d.ts
|
|
6069
|
+
interface NodeTestRuleOptions {
|
|
6070
|
+
/**
|
|
6071
|
+
* Enforce the correct number of arguments for `node:assert` assertions.
|
|
6072
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/assertion-arguments.md
|
|
6073
|
+
*/
|
|
6074
|
+
"node-test/assertion-arguments"?: Linter.RuleEntry<[]>;
|
|
6075
|
+
/**
|
|
6076
|
+
* Enforce a consistent truthiness assertion style.
|
|
6077
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/consistent-assert-style.md
|
|
6078
|
+
*/
|
|
6079
|
+
"node-test/consistent-assert-style"?: Linter.RuleEntry<NodeTestConsistentAssertStyle>;
|
|
6080
|
+
/**
|
|
6081
|
+
* Enforce a consistent body style for `assert.throws()` arrow callbacks.
|
|
6082
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/consistent-assert-throws-callback-style.md
|
|
6083
|
+
*/
|
|
6084
|
+
"node-test/consistent-assert-throws-callback-style"?: Linter.RuleEntry<NodeTestConsistentAssertThrowsCallbackStyle>;
|
|
6085
|
+
/**
|
|
6086
|
+
* Enforce a consistent style for test modifiers.
|
|
6087
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/consistent-modifier-style.md
|
|
6088
|
+
*/
|
|
6089
|
+
"node-test/consistent-modifier-style"?: Linter.RuleEntry<NodeTestConsistentModifierStyle>;
|
|
6090
|
+
/**
|
|
6091
|
+
* Enforce a consistent name for the test context parameter.
|
|
6092
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/consistent-test-context-name.md
|
|
6093
|
+
*/
|
|
6094
|
+
"node-test/consistent-test-context-name"?: Linter.RuleEntry<NodeTestConsistentTestContextName>;
|
|
6095
|
+
/**
|
|
6096
|
+
* Enforce a consistent test file name pattern.
|
|
6097
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/consistent-test-filename.md
|
|
6098
|
+
*/
|
|
6099
|
+
"node-test/consistent-test-filename"?: Linter.RuleEntry<NodeTestConsistentTestFilename>;
|
|
6100
|
+
/**
|
|
6101
|
+
* Enforce consistent use of `test` or `it`.
|
|
6102
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/consistent-test-it.md
|
|
6103
|
+
*/
|
|
6104
|
+
"node-test/consistent-test-it"?: Linter.RuleEntry<NodeTestConsistentTestIt>;
|
|
6105
|
+
/**
|
|
6106
|
+
* Enforce a consistent order of hook declarations.
|
|
6107
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/hooks-order.md
|
|
6108
|
+
*/
|
|
6109
|
+
"node-test/hooks-order"?: Linter.RuleEntry<[]>;
|
|
6110
|
+
/**
|
|
6111
|
+
* Enforce a maximum number of assertions in a test.
|
|
6112
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/max-assertions.md
|
|
6113
|
+
*/
|
|
6114
|
+
"node-test/max-assertions"?: Linter.RuleEntry<NodeTestMaxAssertions>;
|
|
6115
|
+
/**
|
|
6116
|
+
* Enforce a maximum depth for nested `describe` blocks.
|
|
6117
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/max-nested-describe.md
|
|
6118
|
+
*/
|
|
6119
|
+
"node-test/max-nested-describe"?: Linter.RuleEntry<NodeTestMaxNestedDescribe>;
|
|
6120
|
+
/**
|
|
6121
|
+
* Disallow assertions directly inside a `describe` body.
|
|
6122
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-assert-in-describe.md
|
|
6123
|
+
*/
|
|
6124
|
+
"node-test/no-assert-in-describe"?: Linter.RuleEntry<[]>;
|
|
6125
|
+
/**
|
|
6126
|
+
* Disallow assertions inside hooks.
|
|
6127
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-assert-in-hook.md
|
|
6128
|
+
*/
|
|
6129
|
+
"node-test/no-assert-in-hook"?: Linter.RuleEntry<[]>;
|
|
6130
|
+
/**
|
|
6131
|
+
* Disallow strings as the regexp argument of `assert.match()`/`assert.doesNotMatch()`.
|
|
6132
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-assert-match-string.md
|
|
6133
|
+
*/
|
|
6134
|
+
"node-test/no-assert-match-string"?: Linter.RuleEntry<[]>;
|
|
6135
|
+
/**
|
|
6136
|
+
* Disallow passing an async function to `assert.throws()`/`assert.doesNotThrow()`.
|
|
6137
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-assert-throws-async.md
|
|
6138
|
+
*/
|
|
6139
|
+
"node-test/no-assert-throws-async"?: Linter.RuleEntry<[]>;
|
|
6140
|
+
/**
|
|
6141
|
+
* Disallow calling the function passed to `assert.throws()`.
|
|
6142
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-assert-throws-call.md
|
|
6143
|
+
*/
|
|
6144
|
+
"node-test/no-assert-throws-call"?: Linter.RuleEntry<[]>;
|
|
6145
|
+
/**
|
|
6146
|
+
* Disallow multiple statements in `assert.throws()`/`assert.rejects()` callbacks.
|
|
6147
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-assert-throws-multiple-statements.md
|
|
6148
|
+
*/
|
|
6149
|
+
"node-test/no-assert-throws-multiple-statements"?: Linter.RuleEntry<[]>;
|
|
6150
|
+
/**
|
|
6151
|
+
* Disallow a string as the error matcher of `assert.throws()`/`assert.rejects()`.
|
|
6152
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-assert-throws-string.md
|
|
6153
|
+
*/
|
|
6154
|
+
"node-test/no-assert-throws-string"?: Linter.RuleEntry<[]>;
|
|
6155
|
+
/**
|
|
6156
|
+
* Disallow `async` `describe` callbacks.
|
|
6157
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-async-describe.md
|
|
6158
|
+
*/
|
|
6159
|
+
"node-test/no-async-describe"?: Linter.RuleEntry<[]>;
|
|
6160
|
+
/**
|
|
6161
|
+
* Disallow async test/hook functions that have no `await` expression.
|
|
6162
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-async-fn-without-await.md
|
|
6163
|
+
*/
|
|
6164
|
+
"node-test/no-async-fn-without-await"?: Linter.RuleEntry<[]>;
|
|
6165
|
+
/**
|
|
6166
|
+
* Disallow a test or hook from using both a callback and a Promise.
|
|
6167
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-callback-and-promise.md
|
|
6168
|
+
*/
|
|
6169
|
+
"node-test/no-callback-and-promise"?: Linter.RuleEntry<[]>;
|
|
6170
|
+
/**
|
|
6171
|
+
* Disallow commented-out tests.
|
|
6172
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-commented-tests.md
|
|
6173
|
+
*/
|
|
6174
|
+
"node-test/no-commented-tests"?: Linter.RuleEntry<[]>;
|
|
6175
|
+
/**
|
|
6176
|
+
* Disallow compound truthiness assertions.
|
|
6177
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-compound-assertion.md
|
|
6178
|
+
*/
|
|
6179
|
+
"node-test/no-compound-assertion"?: Linter.RuleEntry<[]>;
|
|
6180
|
+
/**
|
|
6181
|
+
* Disallow assertions inside conditional code within a test.
|
|
6182
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-conditional-assertion.md
|
|
6183
|
+
*/
|
|
6184
|
+
"node-test/no-conditional-assertion"?: Linter.RuleEntry<[]>;
|
|
6185
|
+
/**
|
|
6186
|
+
* Disallow conditional logic inside tests.
|
|
6187
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-conditional-in-test.md
|
|
6188
|
+
*/
|
|
6189
|
+
"node-test/no-conditional-in-test"?: Linter.RuleEntry<[]>;
|
|
6190
|
+
/**
|
|
6191
|
+
* Disallow conditionally registering tests, suites, and hooks.
|
|
6192
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-conditional-tests.md
|
|
6193
|
+
*/
|
|
6194
|
+
"node-test/no-conditional-tests"?: Linter.RuleEntry<[]>;
|
|
6195
|
+
/**
|
|
6196
|
+
* Disallow conflicting `only`/`skip`/`todo` modifiers.
|
|
6197
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-conflicting-modifiers.md
|
|
6198
|
+
*/
|
|
6199
|
+
"node-test/no-conflicting-modifiers"?: Linter.RuleEntry<[]>;
|
|
6200
|
+
/**
|
|
6201
|
+
* Disallow assertions with constant outcomes.
|
|
6202
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-constant-assertion.md
|
|
6203
|
+
*/
|
|
6204
|
+
"node-test/no-constant-assertion"?: Linter.RuleEntry<[]>;
|
|
6205
|
+
/**
|
|
6206
|
+
* Disallow callback (`done`) parameters in tests and hooks.
|
|
6207
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-done-callback.md
|
|
6208
|
+
*/
|
|
6209
|
+
"node-test/no-done-callback"?: Linter.RuleEntry<[]>;
|
|
6210
|
+
/**
|
|
6211
|
+
* Disallow adjacent duplicate assertions.
|
|
6212
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-duplicate-assertions.md
|
|
6213
|
+
*/
|
|
6214
|
+
"node-test/no-duplicate-assertions"?: Linter.RuleEntry<[]>;
|
|
6215
|
+
/**
|
|
6216
|
+
* Disallow duplicate hooks within the same scope.
|
|
6217
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-duplicate-hooks.md
|
|
6218
|
+
*/
|
|
6219
|
+
"node-test/no-duplicate-hooks"?: Linter.RuleEntry<[]>;
|
|
6220
|
+
/**
|
|
6221
|
+
* Disallow setting a test plan more than once in the same test.
|
|
6222
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-duplicate-plan.md
|
|
6223
|
+
*/
|
|
6224
|
+
"node-test/no-duplicate-plan"?: Linter.RuleEntry<[]>;
|
|
6225
|
+
/**
|
|
6226
|
+
* Disallow exports from test files.
|
|
6227
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-export.md
|
|
6228
|
+
*/
|
|
6229
|
+
"node-test/no-export"?: Linter.RuleEntry<[]>;
|
|
6230
|
+
/**
|
|
6231
|
+
* Disallow comparing a value to itself in an assertion.
|
|
6232
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-identical-assertion-arguments.md
|
|
6233
|
+
*/
|
|
6234
|
+
"node-test/no-identical-assertion-arguments"?: Linter.RuleEntry<[]>;
|
|
6235
|
+
/**
|
|
6236
|
+
* Disallow identical test titles within the same scope.
|
|
6237
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-identical-title.md
|
|
6238
|
+
*/
|
|
6239
|
+
"node-test/no-identical-title"?: Linter.RuleEntry<[]>;
|
|
6240
|
+
/**
|
|
6241
|
+
* Disallow `deepEqual`/`deepStrictEqual` (and their `notDeep*` variants) when comparing with primitives.
|
|
6242
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-incorrect-deep-equal.md
|
|
6243
|
+
*/
|
|
6244
|
+
"node-test/no-incorrect-deep-equal"?: Linter.RuleEntry<[]>;
|
|
6245
|
+
/**
|
|
6246
|
+
* Disallow `strictEqual`/`equal` (and their `not*` variants) when comparing with an object or array literal.
|
|
6247
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-incorrect-strict-equal.md
|
|
6248
|
+
*/
|
|
6249
|
+
"node-test/no-incorrect-strict-equal"?: Linter.RuleEntry<[]>;
|
|
6250
|
+
/**
|
|
6251
|
+
* Disallow a static test or suite title inside a loop.
|
|
6252
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-loop-static-title.md
|
|
6253
|
+
*/
|
|
6254
|
+
"node-test/no-loop-static-title"?: Linter.RuleEntry<[]>;
|
|
6255
|
+
/**
|
|
6256
|
+
* Disallow the `concurrency` option on a test without subtests.
|
|
6257
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-misused-concurrency.md
|
|
6258
|
+
*/
|
|
6259
|
+
"node-test/no-misused-concurrency"?: Linter.RuleEntry<[]>;
|
|
6260
|
+
/**
|
|
6261
|
+
* Disallow destructured timer imports when using `mock.timers`.
|
|
6262
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-mock-timers-destructured-import.md
|
|
6263
|
+
*/
|
|
6264
|
+
"node-test/no-mock-timers-destructured-import"?: Linter.RuleEntry<[]>;
|
|
6265
|
+
/**
|
|
6266
|
+
* Disallow tests and suites nested inside a test body.
|
|
6267
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-nested-tests.md
|
|
6268
|
+
*/
|
|
6269
|
+
"node-test/no-nested-tests"?: Linter.RuleEntry<[]>;
|
|
6270
|
+
/**
|
|
6271
|
+
* Disallow the `.only` test modifier.
|
|
6272
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-only-test.md
|
|
6273
|
+
*/
|
|
6274
|
+
"node-test/no-only-test"?: Linter.RuleEntry<[]>;
|
|
6275
|
+
/**
|
|
6276
|
+
* Disallow references to parent test contexts inside subtests.
|
|
6277
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-parent-test-context.md
|
|
6278
|
+
*/
|
|
6279
|
+
"node-test/no-parent-test-context"?: Linter.RuleEntry<[]>;
|
|
6280
|
+
/**
|
|
6281
|
+
* Disallow mutating `process.env` inside tests.
|
|
6282
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-process-env-mutation.md
|
|
6283
|
+
*/
|
|
6284
|
+
"node-test/no-process-env-mutation"?: Linter.RuleEntry<[]>;
|
|
6285
|
+
/**
|
|
6286
|
+
* Disallow process exit control in test files.
|
|
6287
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-process-exit-in-test.md
|
|
6288
|
+
*/
|
|
6289
|
+
"node-test/no-process-exit-in-test"?: Linter.RuleEntry<[]>;
|
|
6290
|
+
/**
|
|
6291
|
+
* Disallow the `.skip` test modifier.
|
|
6292
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-skip-test.md
|
|
6293
|
+
*/
|
|
6294
|
+
"node-test/no-skip-test"?: Linter.RuleEntry<[]>;
|
|
6295
|
+
/**
|
|
6296
|
+
* Require a reason when skipping or marking a test as todo.
|
|
6297
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-skip-without-reason.md
|
|
6298
|
+
*/
|
|
6299
|
+
"node-test/no-skip-without-reason"?: Linter.RuleEntry<[]>;
|
|
6300
|
+
/**
|
|
6301
|
+
* Disallow `t.skip()`/`t.todo()` without returning afterwards.
|
|
6302
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-skip-without-return.md
|
|
6303
|
+
*/
|
|
6304
|
+
"node-test/no-skip-without-return"?: Linter.RuleEntry<[]>;
|
|
6305
|
+
/**
|
|
6306
|
+
* Disallow sleeping in tests with `setTimeout`.
|
|
6307
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-sleep-in-test.md
|
|
6308
|
+
*/
|
|
6309
|
+
"node-test/no-sleep-in-test"?: Linter.RuleEntry<[]>;
|
|
6310
|
+
/**
|
|
6311
|
+
* Disallow snapshot assertions inside loop bodies.
|
|
6312
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-snapshot-in-loop.md
|
|
6313
|
+
*/
|
|
6314
|
+
"node-test/no-snapshot-in-loop"?: Linter.RuleEntry<[]>;
|
|
6315
|
+
/**
|
|
6316
|
+
* Disallow assertions outside of a test.
|
|
6317
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-standalone-assert.md
|
|
6318
|
+
*/
|
|
6319
|
+
"node-test/no-standalone-assert"?: Linter.RuleEntry<[]>;
|
|
6320
|
+
/**
|
|
6321
|
+
* Disallow defining tests and suites inside a hook.
|
|
6322
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-test-inside-hook.md
|
|
6323
|
+
*/
|
|
6324
|
+
"node-test/no-test-inside-hook"?: Linter.RuleEntry<[]>;
|
|
6325
|
+
/**
|
|
6326
|
+
* Disallow returning a concrete non-Promise value from a test or hook.
|
|
6327
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-test-return-statement.md
|
|
6328
|
+
*/
|
|
6329
|
+
"node-test/no-test-return-statement"?: Linter.RuleEntry<[]>;
|
|
6330
|
+
/**
|
|
6331
|
+
* Disallow the `.todo` test modifier.
|
|
6332
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-todo-test.md
|
|
6333
|
+
*/
|
|
6334
|
+
"node-test/no-todo-test"?: Linter.RuleEntry<[]>;
|
|
6335
|
+
/**
|
|
6336
|
+
* Disallow assertions inside unawaited Promise callbacks.
|
|
6337
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-unawaited-promise-assertion.md
|
|
6338
|
+
*/
|
|
6339
|
+
"node-test/no-unawaited-promise-assertion"?: Linter.RuleEntry<[]>;
|
|
6340
|
+
/**
|
|
6341
|
+
* Require `assert.rejects()`/`assert.doesNotReject()` to be awaited or returned.
|
|
6342
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-unawaited-rejects.md
|
|
6343
|
+
*/
|
|
6344
|
+
"node-test/no-unawaited-rejects"?: Linter.RuleEntry<[]>;
|
|
6345
|
+
/**
|
|
6346
|
+
* Require subtests created with the test context to be awaited or returned.
|
|
6347
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-unawaited-subtest.md
|
|
6348
|
+
*/
|
|
6349
|
+
"node-test/no-unawaited-subtest"?: Linter.RuleEntry<[]>;
|
|
6350
|
+
/**
|
|
6351
|
+
* Disallow unknown options in test and hook option objects.
|
|
6352
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-unknown-test-options.md
|
|
6353
|
+
*/
|
|
6354
|
+
"node-test/no-unknown-test-options"?: Linter.RuleEntry<[]>;
|
|
6355
|
+
/**
|
|
6356
|
+
* Disallow `assert.doesNotThrow()` and `assert.doesNotReject()`.
|
|
6357
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/no-useless-assertion.md
|
|
6358
|
+
*/
|
|
6359
|
+
"node-test/no-useless-assertion"?: Linter.RuleEntry<[]>;
|
|
6360
|
+
/**
|
|
6361
|
+
* Prefer `assert.match()`/`assert.doesNotMatch()` over asserting `RegExp#test()` / `String#match()` results.
|
|
6362
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-assert-match.md
|
|
6363
|
+
*/
|
|
6364
|
+
"node-test/prefer-assert-match"?: Linter.RuleEntry<[]>;
|
|
6365
|
+
/**
|
|
6366
|
+
* Prefer `assert.throws()`/`assert.rejects()` over try/catch with an assertion.
|
|
6367
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-assert-throws.md
|
|
6239
6368
|
*/
|
|
6240
|
-
"
|
|
6369
|
+
"node-test/prefer-assert-throws"?: Linter.RuleEntry<[]>;
|
|
6370
|
+
/**
|
|
6371
|
+
* Prefer async/await over returning a Promise.
|
|
6372
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-async-await.md
|
|
6373
|
+
*/
|
|
6374
|
+
"node-test/prefer-async-await"?: Linter.RuleEntry<[]>;
|
|
6375
|
+
/**
|
|
6376
|
+
* Prefer the test context `t.mock` over the global `mock`.
|
|
6377
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-context-mock.md
|
|
6378
|
+
*/
|
|
6379
|
+
"node-test/prefer-context-mock"?: Linter.RuleEntry<[]>;
|
|
6380
|
+
/**
|
|
6381
|
+
* Prefer the test context `diagnostic()` over `console` inside tests.
|
|
6382
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-diagnostic.md
|
|
6383
|
+
*/
|
|
6384
|
+
"node-test/prefer-diagnostic"?: Linter.RuleEntry<[]>;
|
|
6385
|
+
/**
|
|
6386
|
+
* Prefer an equality assertion over a truthiness assertion on a comparison.
|
|
6387
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-equality-assertion.md
|
|
6388
|
+
*/
|
|
6389
|
+
"node-test/prefer-equality-assertion"?: Linter.RuleEntry<[]>;
|
|
6390
|
+
/**
|
|
6391
|
+
* Require hooks to be declared before the tests in their scope.
|
|
6392
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-hooks-on-top.md
|
|
6393
|
+
*/
|
|
6394
|
+
"node-test/prefer-hooks-on-top"?: Linter.RuleEntry<[]>;
|
|
6395
|
+
/**
|
|
6396
|
+
* Enforce lowercase test titles.
|
|
6397
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-lowercase-title.md
|
|
6398
|
+
*/
|
|
6399
|
+
"node-test/prefer-lowercase-title"?: Linter.RuleEntry<NodeTestPreferLowercaseTitle>;
|
|
6400
|
+
/**
|
|
6401
|
+
* Prefer `mock.method()` over assigning `mock.fn()` to an object property.
|
|
6402
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-mock-method.md
|
|
6403
|
+
*/
|
|
6404
|
+
"node-test/prefer-mock-method"?: Linter.RuleEntry<[]>;
|
|
6405
|
+
/**
|
|
6406
|
+
* Prefer strict assertion methods over their legacy loose counterparts.
|
|
6407
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-strict-assert.md
|
|
6408
|
+
*/
|
|
6409
|
+
"node-test/prefer-strict-assert"?: Linter.RuleEntry<[]>;
|
|
6410
|
+
/**
|
|
6411
|
+
* Prefer the test context `t.assert` over the imported `node:assert`.
|
|
6412
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-test-context-assert.md
|
|
6413
|
+
*/
|
|
6414
|
+
"node-test/prefer-test-context-assert"?: Linter.RuleEntry<[]>;
|
|
6415
|
+
/**
|
|
6416
|
+
* Prefer `.todo` for empty placeholder tests.
|
|
6417
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/prefer-todo.md
|
|
6418
|
+
*/
|
|
6419
|
+
"node-test/prefer-todo"?: Linter.RuleEntry<[]>;
|
|
6420
|
+
/**
|
|
6421
|
+
* Require that each test contains at least one assertion.
|
|
6422
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-assertion.md
|
|
6423
|
+
*/
|
|
6424
|
+
"node-test/require-assertion"?: Linter.RuleEntry<[]>;
|
|
6425
|
+
/**
|
|
6426
|
+
* Require subtests created in a loop callback to be awaited.
|
|
6427
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-await-concurrent-subtests.md
|
|
6428
|
+
*/
|
|
6429
|
+
"node-test/require-await-concurrent-subtests"?: Linter.RuleEntry<[]>;
|
|
6430
|
+
/**
|
|
6431
|
+
* Require assertions to use the test context when the test sets a plan.
|
|
6432
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-context-assert-with-plan.md
|
|
6433
|
+
*/
|
|
6434
|
+
"node-test/require-context-assert-with-plan"?: Linter.RuleEntry<[]>;
|
|
6435
|
+
/**
|
|
6436
|
+
* Require setup and teardown code to be inside a hook.
|
|
6437
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-hook.md
|
|
6438
|
+
*/
|
|
6439
|
+
"node-test/require-hook"?: Linter.RuleEntry<NodeTestRequireHook>;
|
|
6440
|
+
/**
|
|
6441
|
+
* Require mock timers to be advanced after enabling timer APIs.
|
|
6442
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-mock-timers-advance.md
|
|
6443
|
+
*/
|
|
6444
|
+
"node-test/require-mock-timers-advance"?: Linter.RuleEntry<[]>;
|
|
6445
|
+
/**
|
|
6446
|
+
* Require an explicit `apis` option when enabling `mock.timers`.
|
|
6447
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-mock-timers-apis.md
|
|
6448
|
+
*/
|
|
6449
|
+
"node-test/require-mock-timers-apis"?: Linter.RuleEntry<[]>;
|
|
6450
|
+
/**
|
|
6451
|
+
* Require an error matcher for `assert.throws()`/`assert.rejects()`.
|
|
6452
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-throws-expectation.md
|
|
6453
|
+
*/
|
|
6454
|
+
"node-test/require-throws-expectation"?: Linter.RuleEntry<[]>;
|
|
6455
|
+
/**
|
|
6456
|
+
* Require validator functions in `assert.throws()`/`assert.rejects()` to return `true`.
|
|
6457
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-throws-validator-return-true.md
|
|
6458
|
+
*/
|
|
6459
|
+
"node-test/require-throws-validator-return-true"?: Linter.RuleEntry<[]>;
|
|
6460
|
+
/**
|
|
6461
|
+
* Require tests and hooks to be inside a top-level `describe`.
|
|
6462
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/require-top-level-describe.md
|
|
6463
|
+
*/
|
|
6464
|
+
"node-test/require-top-level-describe"?: Linter.RuleEntry<NodeTestRequireTopLevelDescribe>;
|
|
6465
|
+
/**
|
|
6466
|
+
* Require tests to have a title.
|
|
6467
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/test-title.md
|
|
6468
|
+
*/
|
|
6469
|
+
"node-test/test-title"?: Linter.RuleEntry<[]>;
|
|
6470
|
+
/**
|
|
6471
|
+
* Require test titles to match a configured pattern.
|
|
6472
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/test-title-format.md
|
|
6473
|
+
*/
|
|
6474
|
+
"node-test/test-title-format"?: Linter.RuleEntry<NodeTestTestTitleFormat>;
|
|
6475
|
+
/**
|
|
6476
|
+
* Enforce valid `describe` callbacks.
|
|
6477
|
+
* @see https://github.com/sindresorhus/eslint-node-test/blob/v0.2.0/docs/rules/valid-describe-callback.md
|
|
6478
|
+
*/
|
|
6479
|
+
"node-test/valid-describe-callback"?: Linter.RuleEntry<[]>;
|
|
6241
6480
|
}
|
|
6242
6481
|
/* ======= Declarations ======= */
|
|
6243
|
-
// -----
|
|
6244
|
-
type
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6482
|
+
// ----- node-test/consistent-assert-style -----
|
|
6483
|
+
type NodeTestConsistentAssertStyle = [] | [{
|
|
6484
|
+
style?: "assert" | "assert-ok";
|
|
6485
|
+
}]; // ----- node-test/consistent-assert-throws-callback-style -----
|
|
6486
|
+
type NodeTestConsistentAssertThrowsCallbackStyle = [] | [{
|
|
6487
|
+
style?: "block" | "expression";
|
|
6488
|
+
}]; // ----- node-test/consistent-modifier-style -----
|
|
6489
|
+
type NodeTestConsistentModifierStyle = [] | [{
|
|
6490
|
+
style?: "chained" | "options";
|
|
6491
|
+
}]; // ----- node-test/consistent-test-context-name -----
|
|
6492
|
+
type NodeTestConsistentTestContextName = [] | [{
|
|
6493
|
+
name?: string;
|
|
6494
|
+
}]; // ----- node-test/consistent-test-filename -----
|
|
6495
|
+
type NodeTestConsistentTestFilename = [] | [{
|
|
6496
|
+
pattern?: string;
|
|
6497
|
+
}]; // ----- node-test/consistent-test-it -----
|
|
6498
|
+
type NodeTestConsistentTestIt = [] | [{
|
|
6499
|
+
fn?: "test" | "it";
|
|
6500
|
+
withinDescribe?: "test" | "it";
|
|
6501
|
+
}]; // ----- node-test/max-assertions -----
|
|
6502
|
+
type NodeTestMaxAssertions = [] | [{
|
|
6503
|
+
max?: number;
|
|
6504
|
+
}]; // ----- node-test/max-nested-describe -----
|
|
6505
|
+
type NodeTestMaxNestedDescribe = [] | [{
|
|
6506
|
+
max?: number;
|
|
6507
|
+
}]; // ----- node-test/prefer-lowercase-title -----
|
|
6508
|
+
type NodeTestPreferLowercaseTitle = [] | [{
|
|
6509
|
+
ignore?: ("test" | "it" | "describe" | "suite")[];
|
|
6510
|
+
allowedPrefixes?: string[];
|
|
6511
|
+
}]; // ----- node-test/require-hook -----
|
|
6512
|
+
type NodeTestRequireHook = [] | [{
|
|
6513
|
+
allow?: string[];
|
|
6514
|
+
}]; // ----- node-test/require-top-level-describe -----
|
|
6515
|
+
type NodeTestRequireTopLevelDescribe = [] | [{
|
|
6516
|
+
maxTopLevelDescribes?: number;
|
|
6517
|
+
}]; // ----- node-test/test-title-format -----
|
|
6518
|
+
type NodeTestTestTitleFormat = [] | [{
|
|
6519
|
+
format?: string;
|
|
6249
6520
|
}];
|
|
6250
6521
|
//#endregion
|
|
6251
6522
|
//#region src/_generated/dts/perfectionist.d.ts
|
|
@@ -6474,7 +6745,112 @@ type PerfectionistSortArrayIncludes = {
|
|
|
6474
6745
|
};
|
|
6475
6746
|
partitionByNewLine?: boolean;
|
|
6476
6747
|
}[]; // ----- perfectionist/sort-arrays -----
|
|
6477
|
-
type PerfectionistSortArrays = {
|
|
6748
|
+
type PerfectionistSortArrays = [{
|
|
6749
|
+
fallbackSort?: {
|
|
6750
|
+
type: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6751
|
+
order?: "asc" | "desc";
|
|
6752
|
+
};
|
|
6753
|
+
type?: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6754
|
+
specialCharacters?: "remove" | "trim" | "keep";
|
|
6755
|
+
ignoreCase?: boolean;
|
|
6756
|
+
alphabet?: string;
|
|
6757
|
+
locales?: string | string[];
|
|
6758
|
+
order?: "asc" | "desc";
|
|
6759
|
+
customGroups?: ({
|
|
6760
|
+
fallbackSort?: {
|
|
6761
|
+
type: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6762
|
+
order?: "asc" | "desc";
|
|
6763
|
+
};
|
|
6764
|
+
type?: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6765
|
+
groupName: string;
|
|
6766
|
+
newlinesInside?: "ignore" | number;
|
|
6767
|
+
order?: "asc" | "desc";
|
|
6768
|
+
anyOf: [{
|
|
6769
|
+
elementNamePattern?: ({
|
|
6770
|
+
pattern: string;
|
|
6771
|
+
flags?: string;
|
|
6772
|
+
} | string)[] | ({
|
|
6773
|
+
pattern: string;
|
|
6774
|
+
flags?: string;
|
|
6775
|
+
} | string);
|
|
6776
|
+
selector?: "literal";
|
|
6777
|
+
}, ...{
|
|
6778
|
+
elementNamePattern?: ({
|
|
6779
|
+
pattern: string;
|
|
6780
|
+
flags?: string;
|
|
6781
|
+
} | string)[] | ({
|
|
6782
|
+
pattern: string;
|
|
6783
|
+
flags?: string;
|
|
6784
|
+
} | string);
|
|
6785
|
+
selector?: "literal";
|
|
6786
|
+
}[]];
|
|
6787
|
+
} | {
|
|
6788
|
+
fallbackSort?: {
|
|
6789
|
+
type: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6790
|
+
order?: "asc" | "desc";
|
|
6791
|
+
};
|
|
6792
|
+
type?: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6793
|
+
groupName: string;
|
|
6794
|
+
newlinesInside?: "ignore" | number;
|
|
6795
|
+
order?: "asc" | "desc";
|
|
6796
|
+
elementNamePattern?: ({
|
|
6797
|
+
pattern: string;
|
|
6798
|
+
flags?: string;
|
|
6799
|
+
} | string)[] | ({
|
|
6800
|
+
pattern: string;
|
|
6801
|
+
flags?: string;
|
|
6802
|
+
} | string);
|
|
6803
|
+
selector?: "literal";
|
|
6804
|
+
})[];
|
|
6805
|
+
newlinesInside?: ("ignore" | number) | "newlinesBetween";
|
|
6806
|
+
groups?: (string | [string, ...string[]] | {
|
|
6807
|
+
newlinesBetween: "ignore" | number;
|
|
6808
|
+
} | {
|
|
6809
|
+
group: string | [string, ...string[]];
|
|
6810
|
+
fallbackSort?: {
|
|
6811
|
+
type: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6812
|
+
order?: "asc" | "desc";
|
|
6813
|
+
};
|
|
6814
|
+
commentAbove?: string;
|
|
6815
|
+
type?: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6816
|
+
newlinesInside?: "ignore" | number;
|
|
6817
|
+
order?: "asc" | "desc";
|
|
6818
|
+
})[];
|
|
6819
|
+
newlinesBetween?: "ignore" | number;
|
|
6820
|
+
useConfigurationIf: {
|
|
6821
|
+
allNamesMatchPattern?: ({
|
|
6822
|
+
pattern: string;
|
|
6823
|
+
flags?: string;
|
|
6824
|
+
} | string)[] | ({
|
|
6825
|
+
pattern: string;
|
|
6826
|
+
flags?: string;
|
|
6827
|
+
} | string);
|
|
6828
|
+
matchesAstSelector?: string;
|
|
6829
|
+
};
|
|
6830
|
+
partitionByComment?: boolean | (({
|
|
6831
|
+
pattern: string;
|
|
6832
|
+
flags?: string;
|
|
6833
|
+
} | string)[] | ({
|
|
6834
|
+
pattern: string;
|
|
6835
|
+
flags?: string;
|
|
6836
|
+
} | string)) | {
|
|
6837
|
+
block?: boolean | (({
|
|
6838
|
+
pattern: string;
|
|
6839
|
+
flags?: string;
|
|
6840
|
+
} | string)[] | ({
|
|
6841
|
+
pattern: string;
|
|
6842
|
+
flags?: string;
|
|
6843
|
+
} | string));
|
|
6844
|
+
line?: boolean | (({
|
|
6845
|
+
pattern: string;
|
|
6846
|
+
flags?: string;
|
|
6847
|
+
} | string)[] | ({
|
|
6848
|
+
pattern: string;
|
|
6849
|
+
flags?: string;
|
|
6850
|
+
} | string));
|
|
6851
|
+
};
|
|
6852
|
+
partitionByNewLine?: boolean;
|
|
6853
|
+
}, ...{
|
|
6478
6854
|
fallbackSort?: {
|
|
6479
6855
|
type: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
6480
6856
|
order?: "asc" | "desc";
|
|
@@ -6579,7 +6955,7 @@ type PerfectionistSortArrays = {
|
|
|
6579
6955
|
} | string));
|
|
6580
6956
|
};
|
|
6581
6957
|
partitionByNewLine?: boolean;
|
|
6582
|
-
}[]; // ----- perfectionist/sort-classes -----
|
|
6958
|
+
}[]]; // ----- perfectionist/sort-classes -----
|
|
6583
6959
|
type PerfectionistSortClasses = {
|
|
6584
6960
|
fallbackSort?: {
|
|
6585
6961
|
type: "alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order";
|
|
@@ -6928,6 +7304,7 @@ type PerfectionistSortEnums = {
|
|
|
6928
7304
|
order?: "asc" | "desc";
|
|
6929
7305
|
})[];
|
|
6930
7306
|
newlinesBetween?: "ignore" | number;
|
|
7307
|
+
sortByValue?: "always" | "ifNumericEnum" | "never";
|
|
6931
7308
|
useConfigurationIf?: {
|
|
6932
7309
|
allNamesMatchPattern?: ({
|
|
6933
7310
|
pattern: string;
|
|
@@ -6938,7 +7315,6 @@ type PerfectionistSortEnums = {
|
|
|
6938
7315
|
} | string);
|
|
6939
7316
|
matchesAstSelector?: string;
|
|
6940
7317
|
};
|
|
6941
|
-
sortByValue?: "always" | "ifNumericEnum" | "never";
|
|
6942
7318
|
useExperimentalDependencyDetection?: boolean;
|
|
6943
7319
|
partitionByComment?: boolean | (({
|
|
6944
7320
|
pattern: string;
|
|
@@ -7756,6 +8132,7 @@ type PerfectionistSortIntersectionTypes = {
|
|
|
7756
8132
|
} | string));
|
|
7757
8133
|
};
|
|
7758
8134
|
partitionByNewLine?: boolean;
|
|
8135
|
+
ignoreCallableTypes?: boolean;
|
|
7759
8136
|
}[]; // ----- perfectionist/sort-jsx-props -----
|
|
7760
8137
|
type PerfectionistSortJsxProps = {
|
|
7761
8138
|
fallbackSort?: {
|
|
@@ -9289,6 +9666,19 @@ type ReactHooksVoidUseMemo = [] | [{
|
|
|
9289
9666
|
[k: string]: unknown | undefined;
|
|
9290
9667
|
}];
|
|
9291
9668
|
//#endregion
|
|
9669
|
+
//#region src/_generated/dts/react-refresh.d.ts
|
|
9670
|
+
interface ReactRefreshRuleOptions {
|
|
9671
|
+
"react-refresh/only-export-components"?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
9672
|
+
}
|
|
9673
|
+
/* ======= Declarations ======= */
|
|
9674
|
+
// ----- react-refresh/only-export-components -----
|
|
9675
|
+
type ReactRefreshOnlyExportComponents = [] | [{
|
|
9676
|
+
extraHOCs?: string[];
|
|
9677
|
+
allowExportNames?: string[];
|
|
9678
|
+
allowConstantExport?: boolean;
|
|
9679
|
+
checkJS?: boolean;
|
|
9680
|
+
}];
|
|
9681
|
+
//#endregion
|
|
9292
9682
|
//#region src/_generated/dts/regexp.d.ts
|
|
9293
9683
|
interface RegexpRuleOptions {
|
|
9294
9684
|
/**
|
|
@@ -13354,1670 +13744,1670 @@ type ImportPreferDefaultExport = [] | [{
|
|
|
13354
13744
|
interface UnicornRuleOptions {
|
|
13355
13745
|
/**
|
|
13356
13746
|
* Prefer better DOM traversal APIs.
|
|
13357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/better-dom-traversing.md
|
|
13358
13748
|
*/
|
|
13359
13749
|
"unicorn/better-dom-traversing"?: Linter.RuleEntry<[]>;
|
|
13360
13750
|
/**
|
|
13361
13751
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
13362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
13363
13753
|
* @deprecated
|
|
13364
13754
|
*/
|
|
13365
13755
|
"unicorn/better-regex"?: Linter.RuleEntry<[]>;
|
|
13366
13756
|
/**
|
|
13367
13757
|
* Enforce a specific parameter name in catch clauses.
|
|
13368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/catch-error-name.md
|
|
13369
13759
|
*/
|
|
13370
13760
|
"unicorn/catch-error-name"?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
13371
13761
|
/**
|
|
13372
13762
|
* Enforce consistent class references in static methods.
|
|
13373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/class-reference-in-static-methods.md
|
|
13374
13764
|
*/
|
|
13375
13765
|
"unicorn/class-reference-in-static-methods"?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
13376
13766
|
/**
|
|
13377
13767
|
* Enforce better comment content.
|
|
13378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/comment-content.md
|
|
13379
13769
|
*/
|
|
13380
13770
|
"unicorn/comment-content"?: Linter.RuleEntry<UnicornCommentContent>;
|
|
13381
13771
|
/**
|
|
13382
13772
|
* Enforce consistent assertion style with `node:assert`.
|
|
13383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-assert.md
|
|
13384
13774
|
*/
|
|
13385
13775
|
"unicorn/consistent-assert"?: Linter.RuleEntry<[]>;
|
|
13386
13776
|
/**
|
|
13387
13777
|
* Enforce consistent naming for boolean names.
|
|
13388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-boolean-name.md
|
|
13389
13779
|
*/
|
|
13390
13780
|
"unicorn/consistent-boolean-name"?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
13391
13781
|
/**
|
|
13392
13782
|
* Enforce consistent class member order.
|
|
13393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-class-member-order.md
|
|
13394
13784
|
*/
|
|
13395
13785
|
"unicorn/consistent-class-member-order"?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
13396
13786
|
/**
|
|
13397
13787
|
* Enforce consistent spelling of compound words in identifiers.
|
|
13398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-compound-words.md
|
|
13399
13789
|
*/
|
|
13400
13790
|
"unicorn/consistent-compound-words"?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
13401
13791
|
/**
|
|
13402
13792
|
* Enforce consistent conditional object spread style.
|
|
13403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-conditional-object-spread.md
|
|
13404
13794
|
*/
|
|
13405
13795
|
"unicorn/consistent-conditional-object-spread"?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
13406
13796
|
/**
|
|
13407
13797
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
13408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-date-clone.md
|
|
13409
13799
|
*/
|
|
13410
13800
|
"unicorn/consistent-date-clone"?: Linter.RuleEntry<[]>;
|
|
13411
13801
|
/**
|
|
13412
13802
|
* Use destructured variables over properties.
|
|
13413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-destructuring.md
|
|
13414
13804
|
*/
|
|
13415
13805
|
"unicorn/consistent-destructuring"?: Linter.RuleEntry<[]>;
|
|
13416
13806
|
/**
|
|
13417
13807
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
13418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-empty-array-spread.md
|
|
13419
13809
|
*/
|
|
13420
13810
|
"unicorn/consistent-empty-array-spread"?: Linter.RuleEntry<[]>;
|
|
13421
13811
|
/**
|
|
13422
13812
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
13423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-existence-index-check.md
|
|
13424
13814
|
*/
|
|
13425
13815
|
"unicorn/consistent-existence-index-check"?: Linter.RuleEntry<[]>;
|
|
13426
13816
|
/**
|
|
13427
13817
|
* Enforce consistent decorator position on exported classes.
|
|
13428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-export-decorator-position.md
|
|
13429
13819
|
*/
|
|
13430
13820
|
"unicorn/consistent-export-decorator-position"?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
13431
13821
|
/**
|
|
13432
13822
|
* Move function definitions to the highest possible scope.
|
|
13433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-function-scoping.md
|
|
13434
13824
|
*/
|
|
13435
13825
|
"unicorn/consistent-function-scoping"?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
13436
13826
|
/**
|
|
13437
13827
|
* Enforce function syntax by role.
|
|
13438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-function-style.md
|
|
13439
13829
|
*/
|
|
13440
13830
|
"unicorn/consistent-function-style"?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
13441
13831
|
/**
|
|
13442
13832
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
13443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-json-file-read.md
|
|
13444
13834
|
*/
|
|
13445
13835
|
"unicorn/consistent-json-file-read"?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
13446
13836
|
/**
|
|
13447
13837
|
* Enforce consistent optional chaining for same-base member access.
|
|
13448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-optional-chaining.md
|
|
13449
13839
|
*/
|
|
13450
13840
|
"unicorn/consistent-optional-chaining"?: Linter.RuleEntry<[]>;
|
|
13451
13841
|
/**
|
|
13452
13842
|
* Enforce consistent style for escaping `${` in template literals.
|
|
13453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-template-literal-escape.md
|
|
13454
13844
|
*/
|
|
13455
13845
|
"unicorn/consistent-template-literal-escape"?: Linter.RuleEntry<[]>;
|
|
13456
13846
|
/**
|
|
13457
13847
|
* Enforce consistent labels on tuple type elements.
|
|
13458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-tuple-labels.md
|
|
13459
13849
|
*/
|
|
13460
13850
|
"unicorn/consistent-tuple-labels"?: Linter.RuleEntry<[]>;
|
|
13461
13851
|
/**
|
|
13462
13852
|
* Enforce correct `Error` subclassing.
|
|
13463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/custom-error-definition.md
|
|
13464
13854
|
*/
|
|
13465
13855
|
"unicorn/custom-error-definition"?: Linter.RuleEntry<[]>;
|
|
13466
13856
|
/**
|
|
13467
13857
|
* Enforce consistent default export declarations.
|
|
13468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/default-export-style.md
|
|
13469
13859
|
*/
|
|
13470
13860
|
"unicorn/default-export-style"?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
13471
13861
|
/**
|
|
13472
13862
|
* Enforce consistent style for DOM element dataset access.
|
|
13473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/dom-node-dataset.md
|
|
13474
13864
|
*/
|
|
13475
13865
|
"unicorn/dom-node-dataset"?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
13476
13866
|
/**
|
|
13477
13867
|
* Enforce no spaces between braces.
|
|
13478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/empty-brace-spaces.md
|
|
13479
13869
|
*/
|
|
13480
13870
|
"unicorn/empty-brace-spaces"?: Linter.RuleEntry<[]>;
|
|
13481
13871
|
/**
|
|
13482
13872
|
* Enforce passing a `message` value when creating a built-in error.
|
|
13483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/error-message.md
|
|
13484
13874
|
*/
|
|
13485
13875
|
"unicorn/error-message"?: Linter.RuleEntry<[]>;
|
|
13486
13876
|
/**
|
|
13487
13877
|
* Require escape sequences to use uppercase or lowercase values.
|
|
13488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/escape-case.md
|
|
13489
13879
|
*/
|
|
13490
13880
|
"unicorn/escape-case"?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
13491
13881
|
/**
|
|
13492
13882
|
* Add expiration conditions to TODO comments.
|
|
13493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/expiring-todo-comments.md
|
|
13494
13884
|
*/
|
|
13495
13885
|
"unicorn/expiring-todo-comments"?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
13496
13886
|
/**
|
|
13497
13887
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
13498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/explicit-length-check.md
|
|
13499
13889
|
*/
|
|
13500
13890
|
"unicorn/explicit-length-check"?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
13501
13891
|
/**
|
|
13502
13892
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
13503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/explicit-timer-delay.md
|
|
13504
13894
|
*/
|
|
13505
13895
|
"unicorn/explicit-timer-delay"?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
13506
13896
|
/**
|
|
13507
13897
|
* Enforce a case style for filenames and directory names.
|
|
13508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/filename-case.md
|
|
13509
13899
|
*/
|
|
13510
13900
|
"unicorn/filename-case"?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
13511
13901
|
/**
|
|
13512
13902
|
* Require identifiers to match a specified regular expression.
|
|
13513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/id-match.md
|
|
13514
13904
|
*/
|
|
13515
13905
|
"unicorn/id-match"?: Linter.RuleEntry<UnicornIdMatch>;
|
|
13516
13906
|
/**
|
|
13517
13907
|
* Enforce specific import styles per module.
|
|
13518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/import-style.md
|
|
13519
13909
|
*/
|
|
13520
13910
|
"unicorn/import-style"?: Linter.RuleEntry<UnicornImportStyle>;
|
|
13521
13911
|
/**
|
|
13522
13912
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
13523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/isolated-functions.md
|
|
13524
13914
|
*/
|
|
13525
13915
|
"unicorn/isolated-functions"?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
13526
13916
|
/**
|
|
13527
13917
|
* Require or disallow logical assignment operator shorthand
|
|
13528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/logical-assignment-operators.md
|
|
13529
13919
|
*/
|
|
13530
13920
|
"unicorn/logical-assignment-operators"?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
13531
13921
|
/**
|
|
13532
13922
|
* Limit the depth of nested calls.
|
|
13533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/max-nested-calls.md
|
|
13534
13924
|
*/
|
|
13535
13925
|
"unicorn/max-nested-calls"?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
13536
13926
|
/**
|
|
13537
13927
|
* Enforce replacements for variable, property, and filenames.
|
|
13538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/name-replacements.md
|
|
13539
13929
|
*/
|
|
13540
13930
|
"unicorn/name-replacements"?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
13541
13931
|
/**
|
|
13542
13932
|
* Enforce correct use of `new` for builtin constructors.
|
|
13543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/new-for-builtins.md
|
|
13544
13934
|
*/
|
|
13545
13935
|
"unicorn/new-for-builtins"?: Linter.RuleEntry<[]>;
|
|
13546
13936
|
/**
|
|
13547
13937
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
13548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-abusive-eslint-disable.md
|
|
13549
13939
|
*/
|
|
13550
13940
|
"unicorn/no-abusive-eslint-disable"?: Linter.RuleEntry<[]>;
|
|
13551
13941
|
/**
|
|
13552
13942
|
* Disallow recursive access to `this` within getters and setters.
|
|
13553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-accessor-recursion.md
|
|
13554
13944
|
*/
|
|
13555
13945
|
"unicorn/no-accessor-recursion"?: Linter.RuleEntry<[]>;
|
|
13556
13946
|
/**
|
|
13557
13947
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
13558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-accidental-bitwise-operator.md
|
|
13559
13949
|
*/
|
|
13560
13950
|
"unicorn/no-accidental-bitwise-operator"?: Linter.RuleEntry<[]>;
|
|
13561
13951
|
/**
|
|
13562
13952
|
* Disallow anonymous functions and classes as the default export.
|
|
13563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-anonymous-default-export.md
|
|
13564
13954
|
*/
|
|
13565
13955
|
"unicorn/no-anonymous-default-export"?: Linter.RuleEntry<[]>;
|
|
13566
13956
|
/**
|
|
13567
13957
|
* Prevent passing a function reference directly to iterator methods.
|
|
13568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-callback-reference.md
|
|
13569
13959
|
*/
|
|
13570
13960
|
"unicorn/no-array-callback-reference"?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
13571
13961
|
/**
|
|
13572
13962
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
13573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-concat-in-loop.md
|
|
13574
13964
|
*/
|
|
13575
13965
|
"unicorn/no-array-concat-in-loop"?: Linter.RuleEntry<[]>;
|
|
13576
13966
|
/**
|
|
13577
13967
|
* Disallow using reference values as `Array#fill()` values.
|
|
13578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-fill-with-reference-type.md
|
|
13579
13969
|
*/
|
|
13580
13970
|
"unicorn/no-array-fill-with-reference-type"?: Linter.RuleEntry<[]>;
|
|
13581
13971
|
/**
|
|
13582
13972
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
13583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-from-fill.md
|
|
13584
13974
|
*/
|
|
13585
13975
|
"unicorn/no-array-from-fill"?: Linter.RuleEntry<[]>;
|
|
13586
13976
|
/**
|
|
13587
13977
|
* Disallow front-of-array mutation.
|
|
13588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13978
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-front-mutation.md
|
|
13589
13979
|
*/
|
|
13590
13980
|
"unicorn/no-array-front-mutation"?: Linter.RuleEntry<[]>;
|
|
13591
13981
|
/**
|
|
13592
13982
|
* Disallow using the `this` argument in array methods.
|
|
13593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-method-this-argument.md
|
|
13594
13984
|
*/
|
|
13595
13985
|
"unicorn/no-array-method-this-argument"?: Linter.RuleEntry<[]>;
|
|
13596
13986
|
/**
|
|
13597
13987
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
13598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
13599
13989
|
* @deprecated
|
|
13600
13990
|
*/
|
|
13601
13991
|
"unicorn/no-array-push-push"?: Linter.RuleEntry<[]>;
|
|
13602
13992
|
/**
|
|
13603
13993
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
13604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-reduce.md
|
|
13605
13995
|
*/
|
|
13606
13996
|
"unicorn/no-array-reduce"?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
13607
13997
|
/**
|
|
13608
13998
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
13609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-reverse.md
|
|
13610
14000
|
*/
|
|
13611
14001
|
"unicorn/no-array-reverse"?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
13612
14002
|
/**
|
|
13613
14003
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
13614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-sort.md
|
|
13615
14005
|
*/
|
|
13616
14006
|
"unicorn/no-array-sort"?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
13617
14007
|
/**
|
|
13618
14008
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
13619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-sort-for-min-max.md
|
|
13620
14010
|
*/
|
|
13621
14011
|
"unicorn/no-array-sort-for-min-max"?: Linter.RuleEntry<[]>;
|
|
13622
14012
|
/**
|
|
13623
14013
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
13624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-splice.md
|
|
13625
14015
|
*/
|
|
13626
14016
|
"unicorn/no-array-splice"?: Linter.RuleEntry<[]>;
|
|
13627
14017
|
/**
|
|
13628
14018
|
* Disallow asterisk prefixes in documentation comments.
|
|
13629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
13630
14020
|
*/
|
|
13631
14021
|
"unicorn/no-asterisk-prefix-in-documentation-comments"?: Linter.RuleEntry<[]>;
|
|
13632
14022
|
/**
|
|
13633
14023
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
13634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-async-promise-finally.md
|
|
13635
14025
|
*/
|
|
13636
14026
|
"unicorn/no-async-promise-finally"?: Linter.RuleEntry<[]>;
|
|
13637
14027
|
/**
|
|
13638
14028
|
* Disallow member access from await expression.
|
|
13639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-await-expression-member.md
|
|
13640
14030
|
*/
|
|
13641
14031
|
"unicorn/no-await-expression-member"?: Linter.RuleEntry<[]>;
|
|
13642
14032
|
/**
|
|
13643
14033
|
* Disallow using `await` in `Promise` method parameters.
|
|
13644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-await-in-promise-methods.md
|
|
13645
14035
|
*/
|
|
13646
14036
|
"unicorn/no-await-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
13647
14037
|
/**
|
|
13648
14038
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
13649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-blob-to-file.md
|
|
13650
14040
|
*/
|
|
13651
14041
|
"unicorn/no-blob-to-file"?: Linter.RuleEntry<[]>;
|
|
13652
14042
|
/**
|
|
13653
14043
|
* Disallow boolean-returning sort comparators.
|
|
13654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-boolean-sort-comparator.md
|
|
13655
14045
|
*/
|
|
13656
14046
|
"unicorn/no-boolean-sort-comparator"?: Linter.RuleEntry<[]>;
|
|
13657
14047
|
/**
|
|
13658
14048
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
13659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-break-in-nested-loop.md
|
|
13660
14050
|
*/
|
|
13661
14051
|
"unicorn/no-break-in-nested-loop"?: Linter.RuleEntry<[]>;
|
|
13662
14052
|
/**
|
|
13663
14053
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
13664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-canvas-to-image.md
|
|
13665
14055
|
*/
|
|
13666
14056
|
"unicorn/no-canvas-to-image"?: Linter.RuleEntry<[]>;
|
|
13667
14057
|
/**
|
|
13668
14058
|
* Disallow chained comparisons such as `a < b < c`.
|
|
13669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-chained-comparison.md
|
|
13670
14060
|
*/
|
|
13671
14061
|
"unicorn/no-chained-comparison"?: Linter.RuleEntry<[]>;
|
|
13672
14062
|
/**
|
|
13673
14063
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
13674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-collection-bracket-access.md
|
|
13675
14065
|
*/
|
|
13676
14066
|
"unicorn/no-collection-bracket-access"?: Linter.RuleEntry<[]>;
|
|
13677
14067
|
/**
|
|
13678
14068
|
* Disallow dynamic object property existence checks.
|
|
13679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-computed-property-existence-check.md
|
|
13680
14070
|
*/
|
|
13681
14071
|
"unicorn/no-computed-property-existence-check"?: Linter.RuleEntry<[]>;
|
|
13682
14072
|
/**
|
|
13683
14073
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
13684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-confusing-array-splice.md
|
|
13685
14075
|
*/
|
|
13686
14076
|
"unicorn/no-confusing-array-splice"?: Linter.RuleEntry<[]>;
|
|
13687
14077
|
/**
|
|
13688
14078
|
* Disallow confusing uses of `Array#with()`.
|
|
13689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-confusing-array-with.md
|
|
13690
14080
|
*/
|
|
13691
14081
|
"unicorn/no-confusing-array-with"?: Linter.RuleEntry<[]>;
|
|
13692
14082
|
/**
|
|
13693
14083
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
13694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-console-spaces.md
|
|
13695
14085
|
*/
|
|
13696
14086
|
"unicorn/no-console-spaces"?: Linter.RuleEntry<[]>;
|
|
13697
14087
|
/**
|
|
13698
14088
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
13699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-constant-zero-expression.md
|
|
13700
14090
|
*/
|
|
13701
14091
|
"unicorn/no-constant-zero-expression"?: Linter.RuleEntry<[]>;
|
|
13702
14092
|
/**
|
|
13703
14093
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
13704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-declarations-before-early-exit.md
|
|
13705
14095
|
*/
|
|
13706
14096
|
"unicorn/no-declarations-before-early-exit"?: Linter.RuleEntry<[]>;
|
|
13707
14097
|
/**
|
|
13708
14098
|
* Do not use `document.cookie` directly.
|
|
13709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-document-cookie.md
|
|
13710
14100
|
*/
|
|
13711
14101
|
"unicorn/no-document-cookie"?: Linter.RuleEntry<[]>;
|
|
13712
14102
|
/**
|
|
13713
14103
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
13714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-double-comparison.md
|
|
13715
14105
|
*/
|
|
13716
14106
|
"unicorn/no-double-comparison"?: Linter.RuleEntry<[]>;
|
|
13717
14107
|
/**
|
|
13718
14108
|
* Disallow duplicate adjacent branches in if chains.
|
|
13719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-if-branches.md
|
|
13720
14110
|
*/
|
|
13721
14111
|
"unicorn/no-duplicate-if-branches"?: Linter.RuleEntry<[]>;
|
|
13722
14112
|
/**
|
|
13723
14113
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
13724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-logical-operands.md
|
|
13725
14115
|
*/
|
|
13726
14116
|
"unicorn/no-duplicate-logical-operands"?: Linter.RuleEntry<[]>;
|
|
13727
14117
|
/**
|
|
13728
14118
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
13729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-loops.md
|
|
13730
14120
|
*/
|
|
13731
14121
|
"unicorn/no-duplicate-loops"?: Linter.RuleEntry<[]>;
|
|
13732
14122
|
/**
|
|
13733
14123
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
13734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-set-values.md
|
|
13735
14125
|
*/
|
|
13736
14126
|
"unicorn/no-duplicate-set-values"?: Linter.RuleEntry<[]>;
|
|
13737
14127
|
/**
|
|
13738
14128
|
* Disallow empty files.
|
|
13739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-empty-file.md
|
|
13740
14130
|
*/
|
|
13741
14131
|
"unicorn/no-empty-file"?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
13742
14132
|
/**
|
|
13743
14133
|
* Disallow assigning to built-in error properties.
|
|
13744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-error-property-assignment.md
|
|
13745
14135
|
*/
|
|
13746
14136
|
"unicorn/no-error-property-assignment"?: Linter.RuleEntry<[]>;
|
|
13747
14137
|
/**
|
|
13748
14138
|
* Disallow exports in scripts.
|
|
13749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-exports-in-scripts.md
|
|
13750
14140
|
*/
|
|
13751
14141
|
"unicorn/no-exports-in-scripts"?: Linter.RuleEntry<[]>;
|
|
13752
14142
|
/**
|
|
13753
14143
|
* Prefer `for…of` over the `forEach` method.
|
|
13754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-for-each.md
|
|
13755
14145
|
*/
|
|
13756
14146
|
"unicorn/no-for-each"?: Linter.RuleEntry<[]>;
|
|
13757
14147
|
/**
|
|
13758
14148
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
13759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-for-loop.md
|
|
13760
14150
|
*/
|
|
13761
14151
|
"unicorn/no-for-loop"?: Linter.RuleEntry<[]>;
|
|
13762
14152
|
/**
|
|
13763
14153
|
* Disallow assigning properties on the global object.
|
|
13764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-global-object-property-assignment.md
|
|
13765
14155
|
*/
|
|
13766
14156
|
"unicorn/no-global-object-property-assignment"?: Linter.RuleEntry<[]>;
|
|
13767
14157
|
/**
|
|
13768
14158
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
13769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
13770
14160
|
* @deprecated
|
|
13771
14161
|
*/
|
|
13772
14162
|
"unicorn/no-hex-escape"?: Linter.RuleEntry<[]>;
|
|
13773
14163
|
/**
|
|
13774
14164
|
* Disallow immediate mutation after variable assignment.
|
|
13775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-immediate-mutation.md
|
|
13776
14166
|
*/
|
|
13777
14167
|
"unicorn/no-immediate-mutation"?: Linter.RuleEntry<[]>;
|
|
13778
14168
|
/**
|
|
13779
14169
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
13780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-impossible-length-comparison.md
|
|
13781
14171
|
*/
|
|
13782
14172
|
"unicorn/no-impossible-length-comparison"?: Linter.RuleEntry<[]>;
|
|
13783
14173
|
/**
|
|
13784
14174
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
13785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-incorrect-query-selector.md
|
|
13786
14176
|
*/
|
|
13787
14177
|
"unicorn/no-incorrect-query-selector"?: Linter.RuleEntry<[]>;
|
|
13788
14178
|
/**
|
|
13789
14179
|
* Disallow incorrect template literal interpolation syntax.
|
|
13790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
13791
14181
|
*/
|
|
13792
14182
|
"unicorn/no-incorrect-template-string-interpolation"?: Linter.RuleEntry<[]>;
|
|
13793
14183
|
/**
|
|
13794
14184
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
13795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
13796
14186
|
* @deprecated
|
|
13797
14187
|
*/
|
|
13798
14188
|
"unicorn/no-instanceof-array"?: Linter.RuleEntry<[]>;
|
|
13799
14189
|
/**
|
|
13800
14190
|
* Disallow `instanceof` with built-in objects
|
|
13801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-instanceof-builtins.md
|
|
13802
14192
|
*/
|
|
13803
14193
|
"unicorn/no-instanceof-builtins"?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
13804
14194
|
/**
|
|
13805
14195
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
13806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-argument-count.md
|
|
13807
14197
|
*/
|
|
13808
14198
|
"unicorn/no-invalid-argument-count"?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
13809
14199
|
/**
|
|
13810
14200
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
13811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-character-comparison.md
|
|
13812
14202
|
*/
|
|
13813
14203
|
"unicorn/no-invalid-character-comparison"?: Linter.RuleEntry<[]>;
|
|
13814
14204
|
/**
|
|
13815
14205
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
13816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-fetch-options.md
|
|
13817
14207
|
*/
|
|
13818
14208
|
"unicorn/no-invalid-fetch-options"?: Linter.RuleEntry<[]>;
|
|
13819
14209
|
/**
|
|
13820
14210
|
* Disallow invalid `accept` values on file inputs.
|
|
13821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-file-input-accept.md
|
|
13822
14212
|
*/
|
|
13823
14213
|
"unicorn/no-invalid-file-input-accept"?: Linter.RuleEntry<[]>;
|
|
13824
14214
|
/**
|
|
13825
14215
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
13826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-remove-event-listener.md
|
|
13827
14217
|
*/
|
|
13828
14218
|
"unicorn/no-invalid-remove-event-listener"?: Linter.RuleEntry<[]>;
|
|
13829
14219
|
/**
|
|
13830
14220
|
* Disallow invalid implementations of well-known symbol methods.
|
|
13831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
13832
14222
|
*/
|
|
13833
14223
|
"unicorn/no-invalid-well-known-symbol-methods"?: Linter.RuleEntry<[]>;
|
|
13834
14224
|
/**
|
|
13835
14225
|
* Disallow identifiers starting with `new` or `class`.
|
|
13836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-keyword-prefix.md
|
|
13837
14227
|
*/
|
|
13838
14228
|
"unicorn/no-keyword-prefix"?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
13839
14229
|
/**
|
|
13840
14230
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
13841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-late-current-target-access.md
|
|
13842
14232
|
*/
|
|
13843
14233
|
"unicorn/no-late-current-target-access"?: Linter.RuleEntry<[]>;
|
|
13844
14234
|
/**
|
|
13845
14235
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
13846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-late-event-control.md
|
|
13847
14237
|
*/
|
|
13848
14238
|
"unicorn/no-late-event-control"?: Linter.RuleEntry<[]>;
|
|
13849
14239
|
/**
|
|
13850
14240
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
13851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
13852
14242
|
* @deprecated
|
|
13853
14243
|
*/
|
|
13854
14244
|
"unicorn/no-length-as-slice-end"?: Linter.RuleEntry<[]>;
|
|
13855
14245
|
/**
|
|
13856
14246
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
13857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-lonely-if.md
|
|
13858
14248
|
*/
|
|
13859
14249
|
"unicorn/no-lonely-if"?: Linter.RuleEntry<[]>;
|
|
13860
14250
|
/**
|
|
13861
14251
|
* Disallow mutating a loop iterable during iteration.
|
|
13862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-loop-iterable-mutation.md
|
|
13863
14253
|
*/
|
|
13864
14254
|
"unicorn/no-loop-iterable-mutation"?: Linter.RuleEntry<[]>;
|
|
13865
14255
|
/**
|
|
13866
14256
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
13867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-magic-array-flat-depth.md
|
|
13868
14258
|
*/
|
|
13869
14259
|
"unicorn/no-magic-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
13870
14260
|
/**
|
|
13871
14261
|
* Disallow manually wrapped comments.
|
|
13872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-manually-wrapped-comments.md
|
|
13873
14263
|
*/
|
|
13874
14264
|
"unicorn/no-manually-wrapped-comments"?: Linter.RuleEntry<[]>;
|
|
13875
14265
|
/**
|
|
13876
14266
|
* Disallow checking a Map key before accessing a different key.
|
|
13877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-mismatched-map-key.md
|
|
13878
14268
|
*/
|
|
13879
14269
|
"unicorn/no-mismatched-map-key"?: Linter.RuleEntry<[]>;
|
|
13880
14270
|
/**
|
|
13881
14271
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
13882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-misrefactored-assignment.md
|
|
13883
14273
|
*/
|
|
13884
14274
|
"unicorn/no-misrefactored-assignment"?: Linter.RuleEntry<[]>;
|
|
13885
14275
|
/**
|
|
13886
14276
|
* Disallow named usage of default import and export.
|
|
13887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-named-default.md
|
|
13888
14278
|
*/
|
|
13889
14279
|
"unicorn/no-named-default"?: Linter.RuleEntry<[]>;
|
|
13890
14280
|
/**
|
|
13891
14281
|
* Disallow negated array predicate calls.
|
|
13892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-array-predicate.md
|
|
13893
14283
|
*/
|
|
13894
14284
|
"unicorn/no-negated-array-predicate"?: Linter.RuleEntry<[]>;
|
|
13895
14285
|
/**
|
|
13896
14286
|
* Disallow negated comparisons.
|
|
13897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-comparison.md
|
|
13898
14288
|
*/
|
|
13899
14289
|
"unicorn/no-negated-comparison"?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
13900
14290
|
/**
|
|
13901
14291
|
* Disallow negated conditions.
|
|
13902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-condition.md
|
|
13903
14293
|
*/
|
|
13904
14294
|
"unicorn/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
13905
14295
|
/**
|
|
13906
14296
|
* Disallow negated expression in equality check.
|
|
13907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negation-in-equality-check.md
|
|
13908
14298
|
*/
|
|
13909
14299
|
"unicorn/no-negation-in-equality-check"?: Linter.RuleEntry<[]>;
|
|
13910
14300
|
/**
|
|
13911
14301
|
* Disallow nested ternary expressions.
|
|
13912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-nested-ternary.md
|
|
13913
14303
|
*/
|
|
13914
14304
|
"unicorn/no-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
13915
14305
|
/**
|
|
13916
14306
|
* Disallow `new Array()`.
|
|
13917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-new-array.md
|
|
13918
14308
|
*/
|
|
13919
14309
|
"unicorn/no-new-array"?: Linter.RuleEntry<[]>;
|
|
13920
14310
|
/**
|
|
13921
14311
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
13922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-new-buffer.md
|
|
13923
14313
|
*/
|
|
13924
14314
|
"unicorn/no-new-buffer"?: Linter.RuleEntry<[]>;
|
|
13925
14315
|
/**
|
|
13926
14316
|
* Disallow non-function values with function-style verb prefixes.
|
|
13927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-non-function-verb-prefix.md
|
|
13928
14318
|
*/
|
|
13929
14319
|
"unicorn/no-non-function-verb-prefix"?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
13930
14320
|
/**
|
|
13931
14321
|
* Disallow non-standard properties on built-in objects.
|
|
13932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
13933
14323
|
*/
|
|
13934
14324
|
"unicorn/no-nonstandard-builtin-properties"?: Linter.RuleEntry<[]>;
|
|
13935
14325
|
/**
|
|
13936
14326
|
* Disallow the use of the `null` literal.
|
|
13937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-null.md
|
|
13938
14328
|
*/
|
|
13939
14329
|
"unicorn/no-null"?: Linter.RuleEntry<UnicornNoNull>;
|
|
13940
14330
|
/**
|
|
13941
14331
|
* Disallow the use of objects as default parameters.
|
|
13942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-object-as-default-parameter.md
|
|
13943
14333
|
*/
|
|
13944
14334
|
"unicorn/no-object-as-default-parameter"?: Linter.RuleEntry<[]>;
|
|
13945
14335
|
/**
|
|
13946
14336
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
13947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-object-methods-with-collections.md
|
|
13948
14338
|
*/
|
|
13949
14339
|
"unicorn/no-object-methods-with-collections"?: Linter.RuleEntry<[]>;
|
|
13950
14340
|
/**
|
|
13951
14341
|
* Disallow optional chaining on undeclared variables.
|
|
13952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
13953
14343
|
*/
|
|
13954
14344
|
"unicorn/no-optional-chaining-on-undeclared-variable"?: Linter.RuleEntry<[]>;
|
|
13955
14345
|
/**
|
|
13956
14346
|
* Disallow `process.exit()`.
|
|
13957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-process-exit.md
|
|
13958
14348
|
*/
|
|
13959
14349
|
"unicorn/no-process-exit"?: Linter.RuleEntry<[]>;
|
|
13960
14350
|
/**
|
|
13961
14351
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
13962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-redundant-comparison.md
|
|
13963
14353
|
*/
|
|
13964
14354
|
"unicorn/no-redundant-comparison"?: Linter.RuleEntry<[]>;
|
|
13965
14355
|
/**
|
|
13966
14356
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
13967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-return-array-push.md
|
|
13968
14358
|
*/
|
|
13969
14359
|
"unicorn/no-return-array-push"?: Linter.RuleEntry<[]>;
|
|
13970
14360
|
/**
|
|
13971
14361
|
* Disallow selector syntax in DOM names.
|
|
13972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-selector-as-dom-name.md
|
|
13973
14363
|
*/
|
|
13974
14364
|
"unicorn/no-selector-as-dom-name"?: Linter.RuleEntry<[]>;
|
|
13975
14365
|
/**
|
|
13976
14366
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
13977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
13978
14368
|
*/
|
|
13979
14369
|
"unicorn/no-single-promise-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
13980
14370
|
/**
|
|
13981
14371
|
* Disallow classes that only have static members.
|
|
13982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-static-only-class.md
|
|
13983
14373
|
*/
|
|
13984
14374
|
"unicorn/no-static-only-class"?: Linter.RuleEntry<[]>;
|
|
13985
14375
|
/**
|
|
13986
14376
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
13987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-subtraction-comparison.md
|
|
13988
14378
|
*/
|
|
13989
14379
|
"unicorn/no-subtraction-comparison"?: Linter.RuleEntry<[]>;
|
|
13990
14380
|
/**
|
|
13991
14381
|
* Disallow `then` property.
|
|
13992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-thenable.md
|
|
13993
14383
|
*/
|
|
13994
14384
|
"unicorn/no-thenable"?: Linter.RuleEntry<[]>;
|
|
13995
14385
|
/**
|
|
13996
14386
|
* Disallow assigning `this` to a variable.
|
|
13997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-this-assignment.md
|
|
13998
14388
|
*/
|
|
13999
14389
|
"unicorn/no-this-assignment"?: Linter.RuleEntry<[]>;
|
|
14000
14390
|
/**
|
|
14001
14391
|
* Disallow `this` outside of classes.
|
|
14002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-this-outside-of-class.md
|
|
14003
14393
|
*/
|
|
14004
14394
|
"unicorn/no-this-outside-of-class"?: Linter.RuleEntry<[]>;
|
|
14005
14395
|
/**
|
|
14006
14396
|
* Disallow assigning to top-level variables from inside functions.
|
|
14007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-top-level-assignment-in-function.md
|
|
14008
14398
|
*/
|
|
14009
14399
|
"unicorn/no-top-level-assignment-in-function"?: Linter.RuleEntry<[]>;
|
|
14010
14400
|
/**
|
|
14011
14401
|
* Disallow top-level side effects in exported modules.
|
|
14012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-top-level-side-effects.md
|
|
14013
14403
|
*/
|
|
14014
14404
|
"unicorn/no-top-level-side-effects"?: Linter.RuleEntry<[]>;
|
|
14015
14405
|
/**
|
|
14016
14406
|
* Disallow comparing `undefined` using `typeof`.
|
|
14017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-typeof-undefined.md
|
|
14018
14408
|
*/
|
|
14019
14409
|
"unicorn/no-typeof-undefined"?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
14020
14410
|
/**
|
|
14021
14411
|
* Disallow referencing methods without calling them.
|
|
14022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-uncalled-method.md
|
|
14023
14413
|
*/
|
|
14024
14414
|
"unicorn/no-uncalled-method"?: Linter.RuleEntry<[]>;
|
|
14025
14415
|
/**
|
|
14026
14416
|
* Require class members to be declared.
|
|
14027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-undeclared-class-members.md
|
|
14028
14418
|
*/
|
|
14029
14419
|
"unicorn/no-undeclared-class-members"?: Linter.RuleEntry<[]>;
|
|
14030
14420
|
/**
|
|
14031
14421
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
14032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
14033
14423
|
*/
|
|
14034
14424
|
"unicorn/no-unnecessary-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
14035
14425
|
/**
|
|
14036
14426
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
14037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
14038
14428
|
*/
|
|
14039
14429
|
"unicorn/no-unnecessary-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
14040
14430
|
/**
|
|
14041
14431
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
14042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
14043
14433
|
*/
|
|
14044
14434
|
"unicorn/no-unnecessary-array-splice-count"?: Linter.RuleEntry<[]>;
|
|
14045
14435
|
/**
|
|
14046
14436
|
* Disallow awaiting non-promise values.
|
|
14047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-await.md
|
|
14048
14438
|
*/
|
|
14049
14439
|
"unicorn/no-unnecessary-await"?: Linter.RuleEntry<[]>;
|
|
14050
14440
|
/**
|
|
14051
14441
|
* Disallow unnecessary comparisons against boolean literals.
|
|
14052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
14053
14443
|
*/
|
|
14054
14444
|
"unicorn/no-unnecessary-boolean-comparison"?: Linter.RuleEntry<[]>;
|
|
14055
14445
|
/**
|
|
14056
14446
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
14057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-fetch-options.md
|
|
14058
14448
|
*/
|
|
14059
14449
|
"unicorn/no-unnecessary-fetch-options"?: Linter.RuleEntry<[]>;
|
|
14060
14450
|
/**
|
|
14061
14451
|
* Disallow unnecessary `globalThis` references.
|
|
14062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-global-this.md
|
|
14063
14453
|
*/
|
|
14064
14454
|
"unicorn/no-unnecessary-global-this"?: Linter.RuleEntry<[]>;
|
|
14065
14455
|
/**
|
|
14066
14456
|
* Disallow unnecessary nested ternary expressions.
|
|
14067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
14068
14458
|
*/
|
|
14069
14459
|
"unicorn/no-unnecessary-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
14070
14460
|
/**
|
|
14071
14461
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
14072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-polyfills.md
|
|
14073
14463
|
*/
|
|
14074
14464
|
"unicorn/no-unnecessary-polyfills"?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
14075
14465
|
/**
|
|
14076
14466
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
14077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-slice-end.md
|
|
14078
14468
|
*/
|
|
14079
14469
|
"unicorn/no-unnecessary-slice-end"?: Linter.RuleEntry<[]>;
|
|
14080
14470
|
/**
|
|
14081
14471
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
14082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-splice.md
|
|
14083
14473
|
*/
|
|
14084
14474
|
"unicorn/no-unnecessary-splice"?: Linter.RuleEntry<[]>;
|
|
14085
14475
|
/**
|
|
14086
14476
|
* Disallow unreadable array destructuring.
|
|
14087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-array-destructuring.md
|
|
14088
14478
|
*/
|
|
14089
14479
|
"unicorn/no-unreadable-array-destructuring"?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
14090
14480
|
/**
|
|
14091
14481
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
14092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-for-of-expression.md
|
|
14093
14483
|
*/
|
|
14094
14484
|
"unicorn/no-unreadable-for-of-expression"?: Linter.RuleEntry<[]>;
|
|
14095
14485
|
/**
|
|
14096
14486
|
* Disallow unreadable IIFEs.
|
|
14097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-iife.md
|
|
14098
14488
|
*/
|
|
14099
14489
|
"unicorn/no-unreadable-iife"?: Linter.RuleEntry<[]>;
|
|
14100
14490
|
/**
|
|
14101
14491
|
* Disallow unreadable `new` expressions.
|
|
14102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-new-expression.md
|
|
14103
14493
|
*/
|
|
14104
14494
|
"unicorn/no-unreadable-new-expression"?: Linter.RuleEntry<[]>;
|
|
14105
14495
|
/**
|
|
14106
14496
|
* Disallow unreadable object destructuring.
|
|
14107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-object-destructuring.md
|
|
14108
14498
|
*/
|
|
14109
14499
|
"unicorn/no-unreadable-object-destructuring"?: Linter.RuleEntry<[]>;
|
|
14110
14500
|
/**
|
|
14111
14501
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
14112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
14113
14503
|
*/
|
|
14114
14504
|
"unicorn/no-unsafe-buffer-conversion"?: Linter.RuleEntry<[]>;
|
|
14115
14505
|
/**
|
|
14116
14506
|
* Disallow unsafe DOM HTML APIs.
|
|
14117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-dom-html.md
|
|
14118
14508
|
*/
|
|
14119
14509
|
"unicorn/no-unsafe-dom-html"?: Linter.RuleEntry<[]>;
|
|
14120
14510
|
/**
|
|
14121
14511
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
14122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
14123
14513
|
*/
|
|
14124
14514
|
"unicorn/no-unsafe-promise-all-settled-values"?: Linter.RuleEntry<[]>;
|
|
14125
14515
|
/**
|
|
14126
14516
|
* Disallow unsafe values as property keys.
|
|
14127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-property-key.md
|
|
14128
14518
|
*/
|
|
14129
14519
|
"unicorn/no-unsafe-property-key"?: Linter.RuleEntry<[]>;
|
|
14130
14520
|
/**
|
|
14131
14521
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
14132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-string-replacement.md
|
|
14133
14523
|
*/
|
|
14134
14524
|
"unicorn/no-unsafe-string-replacement"?: Linter.RuleEntry<[]>;
|
|
14135
14525
|
/**
|
|
14136
14526
|
* Disallow ignoring the return value of selected array methods.
|
|
14137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unused-array-method-return.md
|
|
14138
14528
|
*/
|
|
14139
14529
|
"unicorn/no-unused-array-method-return"?: Linter.RuleEntry<[]>;
|
|
14140
14530
|
/**
|
|
14141
14531
|
* Disallow unused object properties.
|
|
14142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unused-properties.md
|
|
14143
14533
|
*/
|
|
14144
14534
|
"unicorn/no-unused-properties"?: Linter.RuleEntry<[]>;
|
|
14145
14535
|
/**
|
|
14146
14536
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
14147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-boolean-cast.md
|
|
14148
14538
|
*/
|
|
14149
14539
|
"unicorn/no-useless-boolean-cast"?: Linter.RuleEntry<[]>;
|
|
14150
14540
|
/**
|
|
14151
14541
|
* Disallow useless type coercions of values that are already of the target type.
|
|
14152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-coercion.md
|
|
14153
14543
|
*/
|
|
14154
14544
|
"unicorn/no-useless-coercion"?: Linter.RuleEntry<[]>;
|
|
14155
14545
|
/**
|
|
14156
14546
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
14157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-collection-argument.md
|
|
14158
14548
|
*/
|
|
14159
14549
|
"unicorn/no-useless-collection-argument"?: Linter.RuleEntry<[]>;
|
|
14160
14550
|
/**
|
|
14161
14551
|
* Disallow useless compound assignments such as `x += 0`.
|
|
14162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-compound-assignment.md
|
|
14163
14553
|
*/
|
|
14164
14554
|
"unicorn/no-useless-compound-assignment"?: Linter.RuleEntry<[]>;
|
|
14165
14555
|
/**
|
|
14166
14556
|
* Disallow useless concatenation of literals.
|
|
14167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-concat.md
|
|
14168
14558
|
*/
|
|
14169
14559
|
"unicorn/no-useless-concat"?: Linter.RuleEntry<[]>;
|
|
14170
14560
|
/**
|
|
14171
14561
|
* Disallow useless `continue` statements.
|
|
14172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-continue.md
|
|
14173
14563
|
*/
|
|
14174
14564
|
"unicorn/no-useless-continue"?: Linter.RuleEntry<[]>;
|
|
14175
14565
|
/**
|
|
14176
14566
|
* Disallow unnecessary existence checks before deletion.
|
|
14177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-delete-check.md
|
|
14178
14568
|
*/
|
|
14179
14569
|
"unicorn/no-useless-delete-check"?: Linter.RuleEntry<[]>;
|
|
14180
14570
|
/**
|
|
14181
14571
|
* Disallow `else` after a statement that exits.
|
|
14182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-else.md
|
|
14183
14573
|
*/
|
|
14184
14574
|
"unicorn/no-useless-else"?: Linter.RuleEntry<[]>;
|
|
14185
14575
|
/**
|
|
14186
14576
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
14187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
14188
14578
|
*/
|
|
14189
14579
|
"unicorn/no-useless-error-capture-stack-trace"?: Linter.RuleEntry<[]>;
|
|
14190
14580
|
/**
|
|
14191
14581
|
* Disallow useless fallback when spreading in object literals.
|
|
14192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-fallback-in-spread.md
|
|
14193
14583
|
*/
|
|
14194
14584
|
"unicorn/no-useless-fallback-in-spread"?: Linter.RuleEntry<[]>;
|
|
14195
14585
|
/**
|
|
14196
14586
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
14197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-iterator-to-array.md
|
|
14198
14588
|
*/
|
|
14199
14589
|
"unicorn/no-useless-iterator-to-array"?: Linter.RuleEntry<[]>;
|
|
14200
14590
|
/**
|
|
14201
14591
|
* Disallow useless array length check.
|
|
14202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-length-check.md
|
|
14203
14593
|
*/
|
|
14204
14594
|
"unicorn/no-useless-length-check"?: Linter.RuleEntry<[]>;
|
|
14205
14595
|
/**
|
|
14206
14596
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
14207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-logical-operand.md
|
|
14208
14598
|
*/
|
|
14209
14599
|
"unicorn/no-useless-logical-operand"?: Linter.RuleEntry<[]>;
|
|
14210
14600
|
/**
|
|
14211
14601
|
* Disallow useless overrides of class methods.
|
|
14212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-override.md
|
|
14213
14603
|
*/
|
|
14214
14604
|
"unicorn/no-useless-override"?: Linter.RuleEntry<[]>;
|
|
14215
14605
|
/**
|
|
14216
14606
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
14217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
14218
14608
|
*/
|
|
14219
14609
|
"unicorn/no-useless-promise-resolve-reject"?: Linter.RuleEntry<[]>;
|
|
14220
14610
|
/**
|
|
14221
14611
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
14222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-recursion.md
|
|
14223
14613
|
*/
|
|
14224
14614
|
"unicorn/no-useless-recursion"?: Linter.RuleEntry<[]>;
|
|
14225
14615
|
/**
|
|
14226
14616
|
* Disallow unnecessary spread.
|
|
14227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-spread.md
|
|
14228
14618
|
*/
|
|
14229
14619
|
"unicorn/no-useless-spread"?: Linter.RuleEntry<[]>;
|
|
14230
14620
|
/**
|
|
14231
14621
|
* Disallow useless case in switch statements.
|
|
14232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-switch-case.md
|
|
14233
14623
|
*/
|
|
14234
14624
|
"unicorn/no-useless-switch-case"?: Linter.RuleEntry<[]>;
|
|
14235
14625
|
/**
|
|
14236
14626
|
* Disallow useless template literal expressions.
|
|
14237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-template-literals.md
|
|
14238
14628
|
*/
|
|
14239
14629
|
"unicorn/no-useless-template-literals"?: Linter.RuleEntry<[]>;
|
|
14240
14630
|
/**
|
|
14241
14631
|
* Disallow useless `undefined`.
|
|
14242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-undefined.md
|
|
14243
14633
|
*/
|
|
14244
14634
|
"unicorn/no-useless-undefined"?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
14245
14635
|
/**
|
|
14246
14636
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
14247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-xor-as-exponentiation.md
|
|
14248
14638
|
*/
|
|
14249
14639
|
"unicorn/no-xor-as-exponentiation"?: Linter.RuleEntry<[]>;
|
|
14250
14640
|
/**
|
|
14251
14641
|
* Disallow number literals with zero fractions or dangling dots.
|
|
14252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-zero-fractions.md
|
|
14253
14643
|
*/
|
|
14254
14644
|
"unicorn/no-zero-fractions"?: Linter.RuleEntry<[]>;
|
|
14255
14645
|
/**
|
|
14256
14646
|
* Enforce proper case for numeric literals.
|
|
14257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/number-literal-case.md
|
|
14258
14648
|
*/
|
|
14259
14649
|
"unicorn/number-literal-case"?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
14260
14650
|
/**
|
|
14261
14651
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
14262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/numeric-separators-style.md
|
|
14263
14653
|
*/
|
|
14264
14654
|
"unicorn/numeric-separators-style"?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
14265
14655
|
/**
|
|
14266
14656
|
* Require assignment operator shorthand where possible.
|
|
14267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/operator-assignment.md
|
|
14268
14658
|
*/
|
|
14269
14659
|
"unicorn/operator-assignment"?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
14270
14660
|
/**
|
|
14271
14661
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
14272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-abort-signal-any.md
|
|
14273
14663
|
*/
|
|
14274
14664
|
"unicorn/prefer-abort-signal-any"?: Linter.RuleEntry<[]>;
|
|
14275
14665
|
/**
|
|
14276
14666
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
14277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-abort-signal-timeout.md
|
|
14278
14668
|
*/
|
|
14279
14669
|
"unicorn/prefer-abort-signal-timeout"?: Linter.RuleEntry<[]>;
|
|
14280
14670
|
/**
|
|
14281
14671
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
14282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-add-event-listener.md
|
|
14283
14673
|
*/
|
|
14284
14674
|
"unicorn/prefer-add-event-listener"?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
14285
14675
|
/**
|
|
14286
14676
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
14287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-add-event-listener-options.md
|
|
14288
14678
|
*/
|
|
14289
14679
|
"unicorn/prefer-add-event-listener-options"?: Linter.RuleEntry<[]>;
|
|
14290
14680
|
/**
|
|
14291
14681
|
* Prefer `AggregateError` when throwing collected errors.
|
|
14292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-aggregate-error.md
|
|
14293
14683
|
*/
|
|
14294
14684
|
"unicorn/prefer-aggregate-error"?: Linter.RuleEntry<[]>;
|
|
14295
14685
|
/**
|
|
14296
14686
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
14297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-find.md
|
|
14298
14688
|
*/
|
|
14299
14689
|
"unicorn/prefer-array-find"?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
14300
14690
|
/**
|
|
14301
14691
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
14302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-flat.md
|
|
14303
14693
|
*/
|
|
14304
14694
|
"unicorn/prefer-array-flat"?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
14305
14695
|
/**
|
|
14306
14696
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
14307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-flat-map.md
|
|
14308
14698
|
*/
|
|
14309
14699
|
"unicorn/prefer-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
14310
14700
|
/**
|
|
14311
14701
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
14312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-async.md
|
|
14313
14703
|
*/
|
|
14314
14704
|
"unicorn/prefer-array-from-async"?: Linter.RuleEntry<[]>;
|
|
14315
14705
|
/**
|
|
14316
14706
|
* Prefer using the `Array.from()` mapping function argument.
|
|
14317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-map.md
|
|
14318
14708
|
*/
|
|
14319
14709
|
"unicorn/prefer-array-from-map"?: Linter.RuleEntry<[]>;
|
|
14320
14710
|
/**
|
|
14321
14711
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
14322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-range.md
|
|
14323
14713
|
*/
|
|
14324
14714
|
"unicorn/prefer-array-from-range"?: Linter.RuleEntry<[]>;
|
|
14325
14715
|
/**
|
|
14326
14716
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
14327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-index-of.md
|
|
14328
14718
|
*/
|
|
14329
14719
|
"unicorn/prefer-array-index-of"?: Linter.RuleEntry<[]>;
|
|
14330
14720
|
/**
|
|
14331
14721
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
14332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-iterable-methods.md
|
|
14333
14723
|
*/
|
|
14334
14724
|
"unicorn/prefer-array-iterable-methods"?: Linter.RuleEntry<[]>;
|
|
14335
14725
|
/**
|
|
14336
14726
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
14337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-last-methods.md
|
|
14338
14728
|
*/
|
|
14339
14729
|
"unicorn/prefer-array-last-methods"?: Linter.RuleEntry<[]>;
|
|
14340
14730
|
/**
|
|
14341
14731
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
14342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-slice.md
|
|
14343
14733
|
*/
|
|
14344
14734
|
"unicorn/prefer-array-slice"?: Linter.RuleEntry<[]>;
|
|
14345
14735
|
/**
|
|
14346
14736
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
14347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-some.md
|
|
14348
14738
|
*/
|
|
14349
14739
|
"unicorn/prefer-array-some"?: Linter.RuleEntry<[]>;
|
|
14350
14740
|
/**
|
|
14351
14741
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
14352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-at.md
|
|
14353
14743
|
*/
|
|
14354
14744
|
"unicorn/prefer-at"?: Linter.RuleEntry<UnicornPreferAt>;
|
|
14355
14745
|
/**
|
|
14356
14746
|
* Prefer `await` over promise chaining.
|
|
14357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-await.md
|
|
14358
14748
|
*/
|
|
14359
14749
|
"unicorn/prefer-await"?: Linter.RuleEntry<[]>;
|
|
14360
14750
|
/**
|
|
14361
14751
|
* Prefer `BigInt` literals over the constructor.
|
|
14362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-bigint-literals.md
|
|
14363
14753
|
*/
|
|
14364
14754
|
"unicorn/prefer-bigint-literals"?: Linter.RuleEntry<[]>;
|
|
14365
14755
|
/**
|
|
14366
14756
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
14367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-blob-reading-methods.md
|
|
14368
14758
|
*/
|
|
14369
14759
|
"unicorn/prefer-blob-reading-methods"?: Linter.RuleEntry<[]>;
|
|
14370
14760
|
/**
|
|
14371
14761
|
* Prefer block statements over IIFEs used only for scoping.
|
|
14372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-block-statement-over-iife.md
|
|
14373
14763
|
*/
|
|
14374
14764
|
"unicorn/prefer-block-statement-over-iife"?: Linter.RuleEntry<[]>;
|
|
14375
14765
|
/**
|
|
14376
14766
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
14377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-boolean-return.md
|
|
14378
14768
|
*/
|
|
14379
14769
|
"unicorn/prefer-boolean-return"?: Linter.RuleEntry<[]>;
|
|
14380
14770
|
/**
|
|
14381
14771
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
14382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-class-fields.md
|
|
14383
14773
|
*/
|
|
14384
14774
|
"unicorn/prefer-class-fields"?: Linter.RuleEntry<[]>;
|
|
14385
14775
|
/**
|
|
14386
14776
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
14387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-classlist-toggle.md
|
|
14388
14778
|
*/
|
|
14389
14779
|
"unicorn/prefer-classlist-toggle"?: Linter.RuleEntry<[]>;
|
|
14390
14780
|
/**
|
|
14391
14781
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
14392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-code-point.md
|
|
14393
14783
|
*/
|
|
14394
14784
|
"unicorn/prefer-code-point"?: Linter.RuleEntry<[]>;
|
|
14395
14785
|
/**
|
|
14396
14786
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
14397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-continue.md
|
|
14398
14788
|
*/
|
|
14399
14789
|
"unicorn/prefer-continue"?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
14400
14790
|
/**
|
|
14401
14791
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
14402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-date-now.md
|
|
14403
14793
|
*/
|
|
14404
14794
|
"unicorn/prefer-date-now"?: Linter.RuleEntry<[]>;
|
|
14405
14795
|
/**
|
|
14406
14796
|
* Prefer default parameters over reassignment.
|
|
14407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-default-parameters.md
|
|
14408
14798
|
*/
|
|
14409
14799
|
"unicorn/prefer-default-parameters"?: Linter.RuleEntry<[]>;
|
|
14410
14800
|
/**
|
|
14411
14801
|
* Prefer direct iteration over default iterator method calls.
|
|
14412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-direct-iteration.md
|
|
14413
14803
|
*/
|
|
14414
14804
|
"unicorn/prefer-direct-iteration"?: Linter.RuleEntry<[]>;
|
|
14415
14805
|
/**
|
|
14416
14806
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
14417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dispose.md
|
|
14418
14808
|
*/
|
|
14419
14809
|
"unicorn/prefer-dispose"?: Linter.RuleEntry<[]>;
|
|
14420
14810
|
/**
|
|
14421
14811
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
14422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-append.md
|
|
14423
14813
|
*/
|
|
14424
14814
|
"unicorn/prefer-dom-node-append"?: Linter.RuleEntry<[]>;
|
|
14425
14815
|
/**
|
|
14426
14816
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
14427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
14428
14818
|
* @deprecated
|
|
14429
14819
|
*/
|
|
14430
14820
|
"unicorn/prefer-dom-node-dataset"?: Linter.RuleEntry<[]>;
|
|
14431
14821
|
/**
|
|
14432
14822
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
14433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-html-methods.md
|
|
14434
14824
|
*/
|
|
14435
14825
|
"unicorn/prefer-dom-node-html-methods"?: Linter.RuleEntry<[]>;
|
|
14436
14826
|
/**
|
|
14437
14827
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
14438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-remove.md
|
|
14439
14829
|
*/
|
|
14440
14830
|
"unicorn/prefer-dom-node-remove"?: Linter.RuleEntry<[]>;
|
|
14441
14831
|
/**
|
|
14442
14832
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
14443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-replace-children.md
|
|
14444
14834
|
*/
|
|
14445
14835
|
"unicorn/prefer-dom-node-replace-children"?: Linter.RuleEntry<[]>;
|
|
14446
14836
|
/**
|
|
14447
14837
|
* Prefer `.textContent` over `.innerText`.
|
|
14448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-text-content.md
|
|
14449
14839
|
*/
|
|
14450
14840
|
"unicorn/prefer-dom-node-text-content"?: Linter.RuleEntry<[]>;
|
|
14451
14841
|
/**
|
|
14452
14842
|
* Prefer early returns over full-function conditional wrapping.
|
|
14453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-early-return.md
|
|
14454
14844
|
*/
|
|
14455
14845
|
"unicorn/prefer-early-return"?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
14456
14846
|
/**
|
|
14457
14847
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
14458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-else-if.md
|
|
14459
14849
|
*/
|
|
14460
14850
|
"unicorn/prefer-else-if"?: Linter.RuleEntry<[]>;
|
|
14461
14851
|
/**
|
|
14462
14852
|
* Prefer `Error.isError()` when checking for errors.
|
|
14463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-error-is-error.md
|
|
14464
14854
|
*/
|
|
14465
14855
|
"unicorn/prefer-error-is-error"?: Linter.RuleEntry<[]>;
|
|
14466
14856
|
/**
|
|
14467
14857
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
14468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-event-target.md
|
|
14469
14859
|
*/
|
|
14470
14860
|
"unicorn/prefer-event-target"?: Linter.RuleEntry<[]>;
|
|
14471
14861
|
/**
|
|
14472
14862
|
* Prefer `export…from` when re-exporting.
|
|
14473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-export-from.md
|
|
14474
14864
|
*/
|
|
14475
14865
|
"unicorn/prefer-export-from"?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
14476
14866
|
/**
|
|
14477
14867
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
14478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-flat-math-min-max.md
|
|
14479
14869
|
*/
|
|
14480
14870
|
"unicorn/prefer-flat-math-min-max"?: Linter.RuleEntry<[]>;
|
|
14481
14871
|
/**
|
|
14482
14872
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
14483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-get-or-insert-computed.md
|
|
14484
14874
|
*/
|
|
14485
14875
|
"unicorn/prefer-get-or-insert-computed"?: Linter.RuleEntry<[]>;
|
|
14486
14876
|
/**
|
|
14487
14877
|
* Prefer global numeric constants over `Number` static properties.
|
|
14488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-global-number-constants.md
|
|
14489
14879
|
*/
|
|
14490
14880
|
"unicorn/prefer-global-number-constants"?: Linter.RuleEntry<[]>;
|
|
14491
14881
|
/**
|
|
14492
14882
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
14493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-global-this.md
|
|
14494
14884
|
*/
|
|
14495
14885
|
"unicorn/prefer-global-this"?: Linter.RuleEntry<[]>;
|
|
14496
14886
|
/**
|
|
14497
14887
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
14498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-group-by.md
|
|
14499
14889
|
*/
|
|
14500
14890
|
"unicorn/prefer-group-by"?: Linter.RuleEntry<[]>;
|
|
14501
14891
|
/**
|
|
14502
14892
|
* Prefer `.has()` when checking existence.
|
|
14503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-has-check.md
|
|
14504
14894
|
*/
|
|
14505
14895
|
"unicorn/prefer-has-check"?: Linter.RuleEntry<[]>;
|
|
14506
14896
|
/**
|
|
14507
14897
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
14508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-hoisting-branch-code.md
|
|
14509
14899
|
*/
|
|
14510
14900
|
"unicorn/prefer-hoisting-branch-code"?: Linter.RuleEntry<[]>;
|
|
14511
14901
|
/**
|
|
14512
14902
|
* Prefer HTTPS over HTTP.
|
|
14513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-https.md
|
|
14514
14904
|
*/
|
|
14515
14905
|
"unicorn/prefer-https"?: Linter.RuleEntry<[]>;
|
|
14516
14906
|
/**
|
|
14517
14907
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
14518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
14519
14909
|
*/
|
|
14520
14910
|
"unicorn/prefer-identifier-import-export-specifiers"?: Linter.RuleEntry<[]>;
|
|
14521
14911
|
/**
|
|
14522
14912
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
14523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-import-meta-properties.md
|
|
14524
14914
|
*/
|
|
14525
14915
|
"unicorn/prefer-import-meta-properties"?: Linter.RuleEntry<[]>;
|
|
14526
14916
|
/**
|
|
14527
14917
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
14528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14918
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-includes.md
|
|
14529
14919
|
*/
|
|
14530
14920
|
"unicorn/prefer-includes"?: Linter.RuleEntry<[]>;
|
|
14531
14921
|
/**
|
|
14532
14922
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
14533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14923
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
14534
14924
|
*/
|
|
14535
14925
|
"unicorn/prefer-includes-over-repeated-comparisons"?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
14536
14926
|
/**
|
|
14537
14927
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
14538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterable-in-constructor.md
|
|
14539
14929
|
*/
|
|
14540
14930
|
"unicorn/prefer-iterable-in-constructor"?: Linter.RuleEntry<[]>;
|
|
14541
14931
|
/**
|
|
14542
14932
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
14543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-concat.md
|
|
14544
14934
|
*/
|
|
14545
14935
|
"unicorn/prefer-iterator-concat"?: Linter.RuleEntry<[]>;
|
|
14546
14936
|
/**
|
|
14547
14937
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
14548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14938
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-helpers.md
|
|
14549
14939
|
*/
|
|
14550
14940
|
"unicorn/prefer-iterator-helpers"?: Linter.RuleEntry<[]>;
|
|
14551
14941
|
/**
|
|
14552
14942
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
14553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14943
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-to-array.md
|
|
14554
14944
|
*/
|
|
14555
14945
|
"unicorn/prefer-iterator-to-array"?: Linter.RuleEntry<[]>;
|
|
14556
14946
|
/**
|
|
14557
14947
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
14558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14948
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
14559
14949
|
*/
|
|
14560
14950
|
"unicorn/prefer-iterator-to-array-at-end"?: Linter.RuleEntry<[]>;
|
|
14561
14951
|
/**
|
|
14562
14952
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
14563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14953
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
14564
14954
|
* @deprecated
|
|
14565
14955
|
*/
|
|
14566
14956
|
"unicorn/prefer-json-parse-buffer"?: Linter.RuleEntry<[]>;
|
|
14567
14957
|
/**
|
|
14568
14958
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
14569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-keyboard-event-key.md
|
|
14570
14960
|
*/
|
|
14571
14961
|
"unicorn/prefer-keyboard-event-key"?: Linter.RuleEntry<[]>;
|
|
14572
14962
|
/**
|
|
14573
14963
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
14574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-location-assign.md
|
|
14575
14965
|
*/
|
|
14576
14966
|
"unicorn/prefer-location-assign"?: Linter.RuleEntry<[]>;
|
|
14577
14967
|
/**
|
|
14578
14968
|
* Prefer using a logical operator over a ternary.
|
|
14579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
14580
14970
|
*/
|
|
14581
14971
|
"unicorn/prefer-logical-operator-over-ternary"?: Linter.RuleEntry<[]>;
|
|
14582
14972
|
/**
|
|
14583
14973
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
14584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-map-from-entries.md
|
|
14585
14975
|
*/
|
|
14586
14976
|
"unicorn/prefer-map-from-entries"?: Linter.RuleEntry<[]>;
|
|
14587
14977
|
/**
|
|
14588
14978
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
14589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-abs.md
|
|
14590
14980
|
*/
|
|
14591
14981
|
"unicorn/prefer-math-abs"?: Linter.RuleEntry<[]>;
|
|
14592
14982
|
/**
|
|
14593
14983
|
* Prefer `Math` constants over their approximate numeric values.
|
|
14594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-constants.md
|
|
14595
14985
|
*/
|
|
14596
14986
|
"unicorn/prefer-math-constants"?: Linter.RuleEntry<[]>;
|
|
14597
14987
|
/**
|
|
14598
14988
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
14599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-min-max.md
|
|
14600
14990
|
*/
|
|
14601
14991
|
"unicorn/prefer-math-min-max"?: Linter.RuleEntry<[]>;
|
|
14602
14992
|
/**
|
|
14603
14993
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
14604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-trunc.md
|
|
14605
14995
|
*/
|
|
14606
14996
|
"unicorn/prefer-math-trunc"?: Linter.RuleEntry<[]>;
|
|
14607
14997
|
/**
|
|
14608
14998
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
14609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-minimal-ternary.md
|
|
14610
15000
|
*/
|
|
14611
15001
|
"unicorn/prefer-minimal-ternary"?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
14612
15002
|
/**
|
|
14613
15003
|
* Prefer modern DOM APIs.
|
|
14614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-modern-dom-apis.md
|
|
14615
15005
|
*/
|
|
14616
15006
|
"unicorn/prefer-modern-dom-apis"?: Linter.RuleEntry<[]>;
|
|
14617
15007
|
/**
|
|
14618
15008
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
14619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-modern-math-apis.md
|
|
14620
15010
|
*/
|
|
14621
15011
|
"unicorn/prefer-modern-math-apis"?: Linter.RuleEntry<[]>;
|
|
14622
15012
|
/**
|
|
14623
15013
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
14624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-module.md
|
|
14625
15015
|
*/
|
|
14626
15016
|
"unicorn/prefer-module"?: Linter.RuleEntry<[]>;
|
|
14627
15017
|
/**
|
|
14628
15018
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
14629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-native-coercion-functions.md
|
|
14630
15020
|
*/
|
|
14631
15021
|
"unicorn/prefer-native-coercion-functions"?: Linter.RuleEntry<[]>;
|
|
14632
15022
|
/**
|
|
14633
15023
|
* Prefer negative index over `.length - index` when possible.
|
|
14634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-negative-index.md
|
|
14635
15025
|
*/
|
|
14636
15026
|
"unicorn/prefer-negative-index"?: Linter.RuleEntry<[]>;
|
|
14637
15027
|
/**
|
|
14638
15028
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
14639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-node-protocol.md
|
|
14640
15030
|
*/
|
|
14641
15031
|
"unicorn/prefer-node-protocol"?: Linter.RuleEntry<[]>;
|
|
14642
15032
|
/**
|
|
14643
15033
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
14644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-coercion.md
|
|
14645
15035
|
*/
|
|
14646
15036
|
"unicorn/prefer-number-coercion"?: Linter.RuleEntry<[]>;
|
|
14647
15037
|
/**
|
|
14648
15038
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
14649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-is-safe-integer.md
|
|
14650
15040
|
*/
|
|
14651
15041
|
"unicorn/prefer-number-is-safe-integer"?: Linter.RuleEntry<[]>;
|
|
14652
15042
|
/**
|
|
14653
15043
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
14654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-properties.md
|
|
14655
15045
|
*/
|
|
14656
15046
|
"unicorn/prefer-number-properties"?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
14657
15047
|
/**
|
|
14658
15048
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
14659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-define-properties.md
|
|
14660
15050
|
*/
|
|
14661
15051
|
"unicorn/prefer-object-define-properties"?: Linter.RuleEntry<[]>;
|
|
14662
15052
|
/**
|
|
14663
15053
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
14664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
14665
15055
|
*/
|
|
14666
15056
|
"unicorn/prefer-object-destructuring-defaults"?: Linter.RuleEntry<[]>;
|
|
14667
15057
|
/**
|
|
14668
15058
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
14669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-from-entries.md
|
|
14670
15060
|
*/
|
|
14671
15061
|
"unicorn/prefer-object-from-entries"?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
14672
15062
|
/**
|
|
14673
15063
|
* Prefer the most specific `Object` iterable method.
|
|
14674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-iterable-methods.md
|
|
14675
15065
|
*/
|
|
14676
15066
|
"unicorn/prefer-object-iterable-methods"?: Linter.RuleEntry<[]>;
|
|
14677
15067
|
/**
|
|
14678
15068
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
14679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-observer-apis.md
|
|
14680
15070
|
*/
|
|
14681
15071
|
"unicorn/prefer-observer-apis"?: Linter.RuleEntry<[]>;
|
|
14682
15072
|
/**
|
|
14683
15073
|
* Prefer omitting the `catch` binding parameter.
|
|
14684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-optional-catch-binding.md
|
|
14685
15075
|
*/
|
|
14686
15076
|
"unicorn/prefer-optional-catch-binding"?: Linter.RuleEntry<[]>;
|
|
14687
15077
|
/**
|
|
14688
15078
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
14689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-path2d.md
|
|
14690
15080
|
*/
|
|
14691
15081
|
"unicorn/prefer-path2d"?: Linter.RuleEntry<[]>;
|
|
14692
15082
|
/**
|
|
14693
15083
|
* Prefer private class fields over the underscore-prefix convention.
|
|
14694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-private-class-fields.md
|
|
14695
15085
|
*/
|
|
14696
15086
|
"unicorn/prefer-private-class-fields"?: Linter.RuleEntry<[]>;
|
|
14697
15087
|
/**
|
|
14698
15088
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
14699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-promise-try.md
|
|
14700
15090
|
*/
|
|
14701
15091
|
"unicorn/prefer-promise-try"?: Linter.RuleEntry<[]>;
|
|
14702
15092
|
/**
|
|
14703
15093
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
14704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-promise-with-resolvers.md
|
|
14705
15095
|
*/
|
|
14706
15096
|
"unicorn/prefer-promise-with-resolvers"?: Linter.RuleEntry<[]>;
|
|
14707
15097
|
/**
|
|
14708
15098
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
14709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-prototype-methods.md
|
|
14710
15100
|
*/
|
|
14711
15101
|
"unicorn/prefer-prototype-methods"?: Linter.RuleEntry<[]>;
|
|
14712
15102
|
/**
|
|
14713
15103
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
14714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-query-selector.md
|
|
14715
15105
|
*/
|
|
14716
15106
|
"unicorn/prefer-query-selector"?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
14717
15107
|
/**
|
|
14718
15108
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
14719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-queue-microtask.md
|
|
14720
15110
|
*/
|
|
14721
15111
|
"unicorn/prefer-queue-microtask"?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
14722
15112
|
/**
|
|
14723
15113
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
14724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-reflect-apply.md
|
|
14725
15115
|
*/
|
|
14726
15116
|
"unicorn/prefer-reflect-apply"?: Linter.RuleEntry<[]>;
|
|
14727
15117
|
/**
|
|
14728
15118
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
14729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-regexp-escape.md
|
|
14730
15120
|
*/
|
|
14731
15121
|
"unicorn/prefer-regexp-escape"?: Linter.RuleEntry<[]>;
|
|
14732
15122
|
/**
|
|
14733
15123
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
14734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-regexp-test.md
|
|
14735
15125
|
*/
|
|
14736
15126
|
"unicorn/prefer-regexp-test"?: Linter.RuleEntry<[]>;
|
|
14737
15127
|
/**
|
|
14738
15128
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
14739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-response-static-json.md
|
|
14740
15130
|
*/
|
|
14741
15131
|
"unicorn/prefer-response-static-json"?: Linter.RuleEntry<[]>;
|
|
14742
15132
|
/**
|
|
14743
15133
|
* Prefer `:scope` when using element query selector methods.
|
|
14744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-scoped-selector.md
|
|
14745
15135
|
*/
|
|
14746
15136
|
"unicorn/prefer-scoped-selector"?: Linter.RuleEntry<[]>;
|
|
14747
15137
|
/**
|
|
14748
15138
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
14749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-has.md
|
|
14750
15140
|
*/
|
|
14751
15141
|
"unicorn/prefer-set-has"?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
14752
15142
|
/**
|
|
14753
15143
|
* Prefer `Set` methods for Set operations.
|
|
14754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-methods.md
|
|
14755
15145
|
*/
|
|
14756
15146
|
"unicorn/prefer-set-methods"?: Linter.RuleEntry<[]>;
|
|
14757
15147
|
/**
|
|
14758
15148
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
14759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-size.md
|
|
14760
15150
|
*/
|
|
14761
15151
|
"unicorn/prefer-set-size"?: Linter.RuleEntry<[]>;
|
|
14762
15152
|
/**
|
|
14763
15153
|
* Prefer arrow function properties over methods with a single return.
|
|
14764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-short-arrow-method.md
|
|
14765
15155
|
*/
|
|
14766
15156
|
"unicorn/prefer-short-arrow-method"?: Linter.RuleEntry<[]>;
|
|
14767
15157
|
/**
|
|
14768
15158
|
* Prefer simple conditions first in logical expressions.
|
|
14769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simple-condition-first.md
|
|
14770
15160
|
*/
|
|
14771
15161
|
"unicorn/prefer-simple-condition-first"?: Linter.RuleEntry<[]>;
|
|
14772
15162
|
/**
|
|
14773
15163
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
14774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simple-sort-comparator.md
|
|
14775
15165
|
*/
|
|
14776
15166
|
"unicorn/prefer-simple-sort-comparator"?: Linter.RuleEntry<[]>;
|
|
14777
15167
|
/**
|
|
14778
15168
|
* Prefer simplified conditions.
|
|
14779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simplified-conditions.md
|
|
14780
15170
|
*/
|
|
14781
15171
|
"unicorn/prefer-simplified-conditions"?: Linter.RuleEntry<[]>;
|
|
14782
15172
|
/**
|
|
14783
15173
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
14784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-array-predicate.md
|
|
14785
15175
|
*/
|
|
14786
15176
|
"unicorn/prefer-single-array-predicate"?: Linter.RuleEntry<[]>;
|
|
14787
15177
|
/**
|
|
14788
15178
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
14789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-call.md
|
|
14790
15180
|
*/
|
|
14791
15181
|
"unicorn/prefer-single-call"?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
14792
15182
|
/**
|
|
14793
15183
|
* Prefer a single object destructuring declaration per local const source.
|
|
14794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-object-destructuring.md
|
|
14795
15185
|
*/
|
|
14796
15186
|
"unicorn/prefer-single-object-destructuring"?: Linter.RuleEntry<[]>;
|
|
14797
15187
|
/**
|
|
14798
15188
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
14799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-replace.md
|
|
14800
15190
|
*/
|
|
14801
15191
|
"unicorn/prefer-single-replace"?: Linter.RuleEntry<[]>;
|
|
14802
15192
|
/**
|
|
14803
15193
|
* Prefer declaring variables in the smallest possible scope.
|
|
14804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-smaller-scope.md
|
|
14805
15195
|
*/
|
|
14806
15196
|
"unicorn/prefer-smaller-scope"?: Linter.RuleEntry<[]>;
|
|
14807
15197
|
/**
|
|
14808
15198
|
* Prefer `String#split()` with a limit.
|
|
14809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-split-limit.md
|
|
14810
15200
|
*/
|
|
14811
15201
|
"unicorn/prefer-split-limit"?: Linter.RuleEntry<[]>;
|
|
14812
15202
|
/**
|
|
14813
15203
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
14814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-spread.md
|
|
14815
15205
|
*/
|
|
14816
15206
|
"unicorn/prefer-spread"?: Linter.RuleEntry<[]>;
|
|
14817
15207
|
/**
|
|
14818
15208
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
14819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-match-all.md
|
|
14820
15210
|
*/
|
|
14821
15211
|
"unicorn/prefer-string-match-all"?: Linter.RuleEntry<[]>;
|
|
14822
15212
|
/**
|
|
14823
15213
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
14824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-pad-start-end.md
|
|
14825
15215
|
*/
|
|
14826
15216
|
"unicorn/prefer-string-pad-start-end"?: Linter.RuleEntry<[]>;
|
|
14827
15217
|
/**
|
|
14828
15218
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
14829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-raw.md
|
|
14830
15220
|
*/
|
|
14831
15221
|
"unicorn/prefer-string-raw"?: Linter.RuleEntry<[]>;
|
|
14832
15222
|
/**
|
|
14833
15223
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
14834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-repeat.md
|
|
14835
15225
|
*/
|
|
14836
15226
|
"unicorn/prefer-string-repeat"?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
14837
15227
|
/**
|
|
14838
15228
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
14839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-replace-all.md
|
|
14840
15230
|
*/
|
|
14841
15231
|
"unicorn/prefer-string-replace-all"?: Linter.RuleEntry<[]>;
|
|
14842
15232
|
/**
|
|
14843
15233
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
14844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-slice.md
|
|
14845
15235
|
*/
|
|
14846
15236
|
"unicorn/prefer-string-slice"?: Linter.RuleEntry<[]>;
|
|
14847
15237
|
/**
|
|
14848
15238
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
14849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-starts-ends-with.md
|
|
14850
15240
|
*/
|
|
14851
15241
|
"unicorn/prefer-string-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
14852
15242
|
/**
|
|
14853
15243
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
14854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-trim-start-end.md
|
|
14855
15245
|
*/
|
|
14856
15246
|
"unicorn/prefer-string-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
14857
15247
|
/**
|
|
14858
15248
|
* Prefer using `structuredClone` to create a deep clone.
|
|
14859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-structured-clone.md
|
|
14860
15250
|
*/
|
|
14861
15251
|
"unicorn/prefer-structured-clone"?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
14862
15252
|
/**
|
|
14863
15253
|
* Prefer `switch` over multiple `else-if`.
|
|
14864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-switch.md
|
|
14865
15255
|
*/
|
|
14866
15256
|
"unicorn/prefer-switch"?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
14867
15257
|
/**
|
|
14868
15258
|
* Prefer `Temporal` over `Date`.
|
|
14869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-temporal.md
|
|
14870
15260
|
*/
|
|
14871
15261
|
"unicorn/prefer-temporal"?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
14872
15262
|
/**
|
|
14873
15263
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
14874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-ternary.md
|
|
14875
15265
|
*/
|
|
14876
15266
|
"unicorn/prefer-ternary"?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
14877
15267
|
/**
|
|
14878
15268
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
14879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-toggle-attribute.md
|
|
14880
15270
|
*/
|
|
14881
15271
|
"unicorn/prefer-toggle-attribute"?: Linter.RuleEntry<[]>;
|
|
14882
15272
|
/**
|
|
14883
15273
|
* Prefer top-level await over top-level promises and async function calls.
|
|
14884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-top-level-await.md
|
|
14885
15275
|
*/
|
|
14886
15276
|
"unicorn/prefer-top-level-await"?: Linter.RuleEntry<[]>;
|
|
14887
15277
|
/**
|
|
14888
15278
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
14889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-type-error.md
|
|
14890
15280
|
*/
|
|
14891
15281
|
"unicorn/prefer-type-error"?: Linter.RuleEntry<[]>;
|
|
14892
15282
|
/**
|
|
14893
15283
|
* Require type literals to be last in union types.
|
|
14894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-type-literal-last.md
|
|
14895
15285
|
*/
|
|
14896
15286
|
"unicorn/prefer-type-literal-last"?: Linter.RuleEntry<[]>;
|
|
14897
15287
|
/**
|
|
14898
15288
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
14899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-uint8array-base64.md
|
|
14900
15290
|
*/
|
|
14901
15291
|
"unicorn/prefer-uint8array-base64"?: Linter.RuleEntry<[]>;
|
|
14902
15292
|
/**
|
|
14903
15293
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
14904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-unary-minus.md
|
|
14905
15295
|
*/
|
|
14906
15296
|
"unicorn/prefer-unary-minus"?: Linter.RuleEntry<[]>;
|
|
14907
15297
|
/**
|
|
14908
15298
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
14909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
14910
15300
|
*/
|
|
14911
15301
|
"unicorn/prefer-unicode-code-point-escapes"?: Linter.RuleEntry<[]>;
|
|
14912
15302
|
/**
|
|
14913
15303
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
14914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-can-parse.md
|
|
14915
15305
|
*/
|
|
14916
15306
|
"unicorn/prefer-url-can-parse"?: Linter.RuleEntry<[]>;
|
|
14917
15307
|
/**
|
|
14918
15308
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
14919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-href.md
|
|
14920
15310
|
*/
|
|
14921
15311
|
"unicorn/prefer-url-href"?: Linter.RuleEntry<[]>;
|
|
14922
15312
|
/**
|
|
14923
15313
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
14924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-search-parameters.md
|
|
14925
15315
|
*/
|
|
14926
15316
|
"unicorn/prefer-url-search-parameters"?: Linter.RuleEntry<[]>;
|
|
14927
15317
|
/**
|
|
14928
15318
|
* Prefer putting the condition in the while statement.
|
|
14929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-while-loop-condition.md
|
|
14930
15320
|
*/
|
|
14931
15321
|
"unicorn/prefer-while-loop-condition"?: Linter.RuleEntry<[]>;
|
|
14932
15322
|
/**
|
|
14933
15323
|
* Renamed to `unicorn/name-replacements`.
|
|
14934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
14935
15325
|
* @deprecated
|
|
14936
15326
|
*/
|
|
14937
15327
|
"unicorn/prevent-abbreviations"?: Linter.RuleEntry<[]>;
|
|
14938
15328
|
/**
|
|
14939
15329
|
* Enforce consistent relative URL style.
|
|
14940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/relative-url-style.md
|
|
14941
15331
|
*/
|
|
14942
15332
|
"unicorn/relative-url-style"?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
14943
15333
|
/**
|
|
14944
15334
|
* Enforce using the separator argument with `Array#join()`.
|
|
14945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-array-join-separator.md
|
|
14946
15336
|
*/
|
|
14947
15337
|
"unicorn/require-array-join-separator"?: Linter.RuleEntry<[]>;
|
|
14948
15338
|
/**
|
|
14949
15339
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
14950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-array-sort-compare.md
|
|
14951
15341
|
*/
|
|
14952
15342
|
"unicorn/require-array-sort-compare"?: Linter.RuleEntry<[]>;
|
|
14953
15343
|
/**
|
|
14954
15344
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
14955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-css-escape.md
|
|
14956
15346
|
*/
|
|
14957
15347
|
"unicorn/require-css-escape"?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
14958
15348
|
/**
|
|
14959
15349
|
* Require non-empty module attributes for imports and exports
|
|
14960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-module-attributes.md
|
|
14961
15351
|
*/
|
|
14962
15352
|
"unicorn/require-module-attributes"?: Linter.RuleEntry<[]>;
|
|
14963
15353
|
/**
|
|
14964
15354
|
* Require non-empty specifier list in import and export statements.
|
|
14965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-module-specifiers.md
|
|
14966
15356
|
*/
|
|
14967
15357
|
"unicorn/require-module-specifiers"?: Linter.RuleEntry<[]>;
|
|
14968
15358
|
/**
|
|
14969
15359
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
14970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
14971
15361
|
*/
|
|
14972
15362
|
"unicorn/require-number-to-fixed-digits-argument"?: Linter.RuleEntry<[]>;
|
|
14973
15363
|
/**
|
|
14974
15364
|
* Require passive event listeners for high-frequency events.
|
|
14975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-passive-events.md
|
|
14976
15366
|
*/
|
|
14977
15367
|
"unicorn/require-passive-events"?: Linter.RuleEntry<[]>;
|
|
14978
15368
|
/**
|
|
14979
15369
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
14980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-post-message-target-origin.md
|
|
14981
15371
|
*/
|
|
14982
15372
|
"unicorn/require-post-message-target-origin"?: Linter.RuleEntry<[]>;
|
|
14983
15373
|
/**
|
|
14984
15374
|
* Require boolean-returning Proxy traps to return booleans.
|
|
14985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
14986
15376
|
*/
|
|
14987
15377
|
"unicorn/require-proxy-trap-boolean-return"?: Linter.RuleEntry<[]>;
|
|
14988
15378
|
/**
|
|
14989
15379
|
* Enforce better string content.
|
|
14990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/string-content.md
|
|
14991
15381
|
*/
|
|
14992
15382
|
"unicorn/string-content"?: Linter.RuleEntry<UnicornStringContent>;
|
|
14993
15383
|
/**
|
|
14994
15384
|
* Enforce consistent brace style for `case` clauses.
|
|
14995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/switch-case-braces.md
|
|
14996
15386
|
*/
|
|
14997
15387
|
"unicorn/switch-case-braces"?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
14998
15388
|
/**
|
|
14999
15389
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
15000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/switch-case-break-position.md
|
|
15001
15391
|
*/
|
|
15002
15392
|
"unicorn/switch-case-break-position"?: Linter.RuleEntry<[]>;
|
|
15003
15393
|
/**
|
|
15004
15394
|
* Fix whitespace-insensitive template indentation.
|
|
15005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/template-indent.md
|
|
15006
15396
|
*/
|
|
15007
15397
|
"unicorn/template-indent"?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
15008
15398
|
/**
|
|
15009
15399
|
* Enforce consistent case for text encoding identifiers.
|
|
15010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/text-encoding-identifier-case.md
|
|
15011
15401
|
*/
|
|
15012
15402
|
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
15013
15403
|
/**
|
|
15014
15404
|
* Require `new` when creating an error.
|
|
15015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/throw-new-error.md
|
|
15016
15406
|
*/
|
|
15017
15407
|
"unicorn/throw-new-error"?: Linter.RuleEntry<[]>;
|
|
15018
15408
|
/**
|
|
15019
15409
|
* Limit the complexity of `try` blocks.
|
|
15020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
15410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/try-complexity.md
|
|
15021
15411
|
*/
|
|
15022
15412
|
"unicorn/try-complexity"?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
15023
15413
|
}
|
|
@@ -15809,7 +16199,7 @@ type VitestNoFocusedTests = [] | [{
|
|
|
15809
16199
|
fixable?: boolean;
|
|
15810
16200
|
}]; // ----- vitest/no-hooks -----
|
|
15811
16201
|
type VitestNoHooks = [] | [{
|
|
15812
|
-
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[];
|
|
16202
|
+
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach" | "aroundAll" | "aroundEach")[];
|
|
15813
16203
|
}]; // ----- vitest/no-large-snapshots -----
|
|
15814
16204
|
type VitestNoLargeSnapshots = [] | [{
|
|
15815
16205
|
maxSize?: number;
|
|
@@ -16185,11 +16575,13 @@ type YamlSortSequenceValues = [{
|
|
|
16185
16575
|
type?: "asc" | "desc";
|
|
16186
16576
|
caseSensitive?: boolean;
|
|
16187
16577
|
natural?: boolean;
|
|
16578
|
+
key?: string;
|
|
16188
16579
|
};
|
|
16189
16580
|
})[] | {
|
|
16190
16581
|
type?: "asc" | "desc";
|
|
16191
16582
|
caseSensitive?: boolean;
|
|
16192
16583
|
natural?: boolean;
|
|
16584
|
+
key?: string;
|
|
16193
16585
|
};
|
|
16194
16586
|
minValues?: number;
|
|
16195
16587
|
}, ...{
|
|
@@ -16200,11 +16592,13 @@ type YamlSortSequenceValues = [{
|
|
|
16200
16592
|
type?: "asc" | "desc";
|
|
16201
16593
|
caseSensitive?: boolean;
|
|
16202
16594
|
natural?: boolean;
|
|
16595
|
+
key?: string;
|
|
16203
16596
|
};
|
|
16204
16597
|
})[] | {
|
|
16205
16598
|
type?: "asc" | "desc";
|
|
16206
16599
|
caseSensitive?: boolean;
|
|
16207
16600
|
natural?: boolean;
|
|
16601
|
+
key?: string;
|
|
16208
16602
|
};
|
|
16209
16603
|
minValues?: number;
|
|
16210
16604
|
}[]]; // ----- yaml/spaced-comment -----
|
|
@@ -16214,7 +16608,7 @@ type YamlSpacedComment = [] | ["always" | "never"] | ["always" | "never", {
|
|
|
16214
16608
|
}];
|
|
16215
16609
|
//#endregion
|
|
16216
16610
|
//#region src/_generated/rule-options.d.ts
|
|
16217
|
-
type RuleOptionsUnion = BuiltinsRuleOptions & AntfuRuleOptions & CommandRuleOptions & DeMorganRuleOptions & E18eRuleOptions & EslintCommentsRuleOptions & EslintReactRuleOptions & IgnoresRuleOptions & ImportsRuleOptions & JavascriptRuleOptions$1 & JsdocRuleOptions & JsoncRuleOptions & MarkdownRuleOptions & NRuleOptions & NoOnlyTestsRuleOptions & PerfectionistRuleOptions & PnpmRuleOptions & PrettierRuleOptions & ReactHooksRuleOptions & RegexpRuleOptions & SortPackageJsonRuleOptions & SortTsconfigRuleOptions & StylisticRuleOptions & TomlRuleOptions & TypescriptRuleOptions & UnicornRuleOptions & VitestRuleOptions & YmlRuleOptions;
|
|
16611
|
+
type RuleOptionsUnion = BuiltinsRuleOptions & AntfuRuleOptions & CommandRuleOptions & DeMorganRuleOptions & E18eRuleOptions & EslintCommentsRuleOptions & EslintReactRuleOptions & IgnoresRuleOptions & ImportsRuleOptions & JavascriptRuleOptions$1 & JsdocRuleOptions & JsoncRuleOptions & MarkdownRuleOptions & NRuleOptions & NoOnlyTestsRuleOptions & NodeTestRuleOptions & PerfectionistRuleOptions & PnpmRuleOptions & PrettierRuleOptions & ReactHooksRuleOptions & ReactRefreshRuleOptions & RegexpRuleOptions & SortPackageJsonRuleOptions & SortTsconfigRuleOptions & StylisticRuleOptions & TomlRuleOptions & TypescriptRuleOptions & UnicornRuleOptions & VitestRuleOptions & YmlRuleOptions;
|
|
16218
16612
|
//#endregion
|
|
16219
16613
|
//#region src/types.d.ts
|
|
16220
16614
|
type RulesRecord = Linter.RulesRecord & RuleOptionsUnion;
|
|
@@ -16228,25 +16622,10 @@ type Config = Omit<Linter.Config<Linter.RulesRecord & RuleOptionsUnion>, "plugin
|
|
|
16228
16622
|
type JavascriptRuleOptions = BuiltinsRuleOptions;
|
|
16229
16623
|
type TypescriptConfigRules = TypescriptRuleOptions & BuiltinsRuleOptions;
|
|
16230
16624
|
type Awaitable<T> = T | Promise<T>;
|
|
16231
|
-
type UnPromise<T> = T extends Promise<infer U> ? U : T;
|
|
16232
|
-
type LanguageOptions = Linter.Config["languageOptions"];
|
|
16233
16625
|
type RuleName = keyof RuleOptionsUnion;
|
|
16234
16626
|
type TypedFlatConfigItemWithId = Config & {
|
|
16235
16627
|
name: string;
|
|
16236
16628
|
};
|
|
16237
|
-
type OptionsCommon = {
|
|
16238
|
-
debug?: boolean;
|
|
16239
|
-
/**
|
|
16240
|
-
* The prefix for the name of the config item.
|
|
16241
|
-
* @default "jsse"
|
|
16242
|
-
*/
|
|
16243
|
-
rootId?: string;
|
|
16244
|
-
/**
|
|
16245
|
-
* Type of the project. `lib` will enable more strict rules for libraries.
|
|
16246
|
-
* @default 'lib'
|
|
16247
|
-
*/
|
|
16248
|
-
type?: "app" | "lib";
|
|
16249
|
-
};
|
|
16250
16629
|
type OptionsComponentExts = {
|
|
16251
16630
|
/**
|
|
16252
16631
|
* Additional extensions for components.
|
|
@@ -16255,7 +16634,9 @@ type OptionsComponentExts = {
|
|
|
16255
16634
|
*/
|
|
16256
16635
|
componentExts?: string[];
|
|
16257
16636
|
};
|
|
16258
|
-
type
|
|
16637
|
+
type EslintConfigFnAsync<T = undefined> = (options?: T) => Promise<TypedFlatConfigItemWithId[]>;
|
|
16638
|
+
type EslintConfigFnSync<T = undefined> = (options?: T) => TypedFlatConfigItemWithId[];
|
|
16639
|
+
type EslintConfigFn<T = undefined> = EslintConfigFnAsync<T> | EslintConfigFnSync<T>;
|
|
16259
16640
|
type OptionsFiles = {
|
|
16260
16641
|
/**
|
|
16261
16642
|
* Override the `files` option to provide custom globs.
|
|
@@ -16290,6 +16671,7 @@ type OptionsTypeScriptParserOptions = {
|
|
|
16290
16671
|
*/
|
|
16291
16672
|
ignoresTypeAware?: string[];
|
|
16292
16673
|
};
|
|
16674
|
+
type TypescriptPreset = "all" | "base" | "disable-type-checked" | "eslint-recommended" | "recommended" | "recommended-type-checked" | "recommended-type-checked-only" | "strict" | "strict-type-checked" | "strict-type-checked-only" | "stylistic" | "stylistic-type-checked" | "stylistic-type-checked-only";
|
|
16293
16675
|
type OptionsTypeScriptWithTypes = {
|
|
16294
16676
|
/**
|
|
16295
16677
|
* When this options is provided, type aware rules will be enabled.
|
|
@@ -16305,7 +16687,14 @@ type OptionsTypeScriptWithTypes = {
|
|
|
16305
16687
|
*/
|
|
16306
16688
|
overrides?: TypescriptConfigRules;
|
|
16307
16689
|
/**
|
|
16308
|
-
*
|
|
16690
|
+
* TypeScript ESLint preset or presets to use as the base ruleset.
|
|
16691
|
+
*
|
|
16692
|
+
* Preset names match the kebab-case TypeScript ESLint config names.
|
|
16693
|
+
* @default "recommended-type-checked" when type-aware, otherwise "recommended"
|
|
16694
|
+
*/
|
|
16695
|
+
presets?: TypescriptPreset | TypescriptPreset[];
|
|
16696
|
+
/**
|
|
16697
|
+
* strict vs recommended configs, cannot be used with presets
|
|
16309
16698
|
* @default false
|
|
16310
16699
|
*/
|
|
16311
16700
|
strict?: boolean;
|
|
@@ -16314,9 +16703,8 @@ type OptionsTypeScriptWithTypes = {
|
|
|
16314
16703
|
*/
|
|
16315
16704
|
typeAware?: boolean;
|
|
16316
16705
|
};
|
|
16317
|
-
type OptionsTypescript = OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions
|
|
16318
|
-
type
|
|
16319
|
-
typescript?: boolean;
|
|
16706
|
+
type OptionsTypescript = OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & {
|
|
16707
|
+
typedefs?: "type" | "interface";
|
|
16320
16708
|
};
|
|
16321
16709
|
type OptionsStylistic = {
|
|
16322
16710
|
stylistic?: boolean | StylisticConfig;
|
|
@@ -16326,18 +16714,6 @@ type StylisticConfig = {
|
|
|
16326
16714
|
quotes?: "single" | "double";
|
|
16327
16715
|
jsx?: boolean;
|
|
16328
16716
|
};
|
|
16329
|
-
type OptionsPrefix = {
|
|
16330
|
-
prefix?: {
|
|
16331
|
-
from: string;
|
|
16332
|
-
to: string;
|
|
16333
|
-
};
|
|
16334
|
-
};
|
|
16335
|
-
type OptionsOverrides = {
|
|
16336
|
-
overrides?: Config["rules"];
|
|
16337
|
-
};
|
|
16338
|
-
type OptionsIsInEditor = {
|
|
16339
|
-
isInEditor?: boolean;
|
|
16340
|
-
};
|
|
16341
16717
|
type OptionsAntfu = {
|
|
16342
16718
|
topLevelFunction?: "error" | "off";
|
|
16343
16719
|
overrides?: AntfuRuleOptions;
|
|
@@ -16369,19 +16745,56 @@ type OptionsMarkdown = OptionsComponentExts & {
|
|
|
16369
16745
|
type OptionsN = {
|
|
16370
16746
|
overrides?: NRuleOptions;
|
|
16371
16747
|
};
|
|
16748
|
+
type OptionsNodeTest = {
|
|
16749
|
+
/**
|
|
16750
|
+
* Files to include for node-test rules.
|
|
16751
|
+
*
|
|
16752
|
+
* Defaults to `GLOB_TESTS`
|
|
16753
|
+
*/
|
|
16754
|
+
files?: string[];
|
|
16755
|
+
/**
|
|
16756
|
+
* eslint-node-test preset to use as the base ruleset.
|
|
16757
|
+
* @default "recommended"
|
|
16758
|
+
*/
|
|
16759
|
+
preset?: "recommended" | "unopinionated" | "all";
|
|
16760
|
+
/**
|
|
16761
|
+
* Override eslint-node-test rules after applying the preset.
|
|
16762
|
+
*/
|
|
16763
|
+
overrides?: NodeTestRuleOptions;
|
|
16764
|
+
};
|
|
16372
16765
|
type OptionsPnpm = {
|
|
16373
16766
|
overrides?: PnpmRuleOptions;
|
|
16374
16767
|
};
|
|
16768
|
+
type ReactHooksPreset = "recommended" | "recommended-latest";
|
|
16769
|
+
type ReactPreset = "recommended" | "recommended-type-checked" | "recommended-typescript" | "strict" | "strict-type-checked" | "strict-typescript";
|
|
16375
16770
|
type OptionsReactConfig = {
|
|
16771
|
+
/**
|
|
16772
|
+
* Enable eslint-plugin-react-hooks rules or select its preset.
|
|
16773
|
+
* @default "recommended"
|
|
16774
|
+
*/
|
|
16775
|
+
hooks?: boolean | ReactHooksPreset;
|
|
16776
|
+
/**
|
|
16777
|
+
* Enable eslint-plugin-react-refresh rules.
|
|
16778
|
+
* @default true
|
|
16779
|
+
*/
|
|
16780
|
+
refresh?: boolean;
|
|
16781
|
+
/**
|
|
16782
|
+
* Use `refresh` instead.
|
|
16783
|
+
* @deprecated
|
|
16784
|
+
*/
|
|
16376
16785
|
reactRefresh?: boolean;
|
|
16377
|
-
overrides?: EslintReactRuleOptions;
|
|
16786
|
+
overrides?: EslintReactRuleOptions & ReactHooksRuleOptions & ReactRefreshRuleOptions;
|
|
16787
|
+
/**
|
|
16788
|
+
* `@eslint-react/eslint-plugin` preset to use as the base ruleset.
|
|
16789
|
+
*
|
|
16790
|
+
* Preset names match the kebab-case `@eslint-react` config names.
|
|
16791
|
+
* @default "recommended"
|
|
16792
|
+
*/
|
|
16793
|
+
preset?: ReactPreset;
|
|
16378
16794
|
};
|
|
16379
16795
|
type OptionsSortTsconfig = {
|
|
16380
16796
|
extendTsconfigGlobs?: string[];
|
|
16381
16797
|
};
|
|
16382
|
-
type OptionsTest = {
|
|
16383
|
-
overrides?: VitestRuleOptions;
|
|
16384
|
-
};
|
|
16385
16798
|
type OptionsUnicorn = {
|
|
16386
16799
|
/**
|
|
16387
16800
|
* Unicorn preset to use as the base ruleset.
|
|
@@ -16393,28 +16806,12 @@ type OptionsUnicorn = {
|
|
|
16393
16806
|
*/
|
|
16394
16807
|
overrides?: UnicornRuleOptions;
|
|
16395
16808
|
};
|
|
16809
|
+
type OptionsVitest = {
|
|
16810
|
+
overrides?: VitestRuleOptions;
|
|
16811
|
+
};
|
|
16396
16812
|
type OptionsYaml = OptionsFiles & OptionsStylistic & {
|
|
16397
16813
|
overrides?: YmlRuleOptions;
|
|
16398
16814
|
};
|
|
16399
|
-
/**
|
|
16400
|
-
* Tailwind CSS ESLint settings
|
|
16401
|
-
*/
|
|
16402
|
-
type TailwindEslintSettings = {
|
|
16403
|
-
/**
|
|
16404
|
-
* call expressions to check for tailwind classes
|
|
16405
|
-
* @default ["classnames", "clsx", "ctl", "cn", "cx", "twMerge", "twJoin"]
|
|
16406
|
-
*/
|
|
16407
|
-
callees: string[];
|
|
16408
|
-
classRegex: string;
|
|
16409
|
-
config: string;
|
|
16410
|
-
cssFiles: string[];
|
|
16411
|
-
cssFilesRefreshRate: number;
|
|
16412
|
-
removeDuplicates: boolean;
|
|
16413
|
-
skipClassAttribute: boolean;
|
|
16414
|
-
tags: string[];
|
|
16415
|
-
whitelist: string[];
|
|
16416
|
-
};
|
|
16417
|
-
type TailwindOptions = Partial<TailwindEslintSettings> | boolean | undefined;
|
|
16418
16815
|
type OptionsConfigs = {
|
|
16419
16816
|
/**
|
|
16420
16817
|
* Enable eslint-plugin-antfu.
|
|
@@ -16451,18 +16848,15 @@ type OptionsConfigs = {
|
|
|
16451
16848
|
*/
|
|
16452
16849
|
n?: boolean | OptionsN;
|
|
16453
16850
|
/**
|
|
16454
|
-
* Enable eslint-
|
|
16851
|
+
* Enable `eslint-node-test` (Node.js built-in test runner rules).
|
|
16455
16852
|
* @default false
|
|
16456
16853
|
*/
|
|
16457
|
-
|
|
16854
|
+
nodeTest?: boolean | OptionsNodeTest;
|
|
16458
16855
|
/**
|
|
16459
|
-
* Enable
|
|
16460
|
-
*
|
|
16461
|
-
* Passing an object to configure the options.
|
|
16462
|
-
* Tailwind support is currently disabled; passing this option only logs a warning.
|
|
16856
|
+
* Enable eslint-plugin-pnpm.
|
|
16463
16857
|
* @default false
|
|
16464
16858
|
*/
|
|
16465
|
-
|
|
16859
|
+
pnpm?: boolean | OptionsPnpm;
|
|
16466
16860
|
/**
|
|
16467
16861
|
* Enable TypeScript support.
|
|
16468
16862
|
*
|
|
@@ -16476,17 +16870,16 @@ type OptionsConfigs = {
|
|
|
16476
16870
|
*/
|
|
16477
16871
|
unicorn?: boolean | OptionsUnicorn;
|
|
16478
16872
|
react?: boolean | OptionsReactConfig;
|
|
16479
|
-
reactRefresh?: boolean;
|
|
16480
16873
|
/**
|
|
16481
16874
|
* Enable regexp plugin
|
|
16482
16875
|
* @default true
|
|
16483
16876
|
*/
|
|
16484
16877
|
regexp?: boolean;
|
|
16485
16878
|
/**
|
|
16486
|
-
* Enable
|
|
16487
|
-
* @default
|
|
16879
|
+
* Enable `@vitest/eslint-plugin` (Vitest rules).
|
|
16880
|
+
* @default auto-detect based on the dependencies
|
|
16488
16881
|
*/
|
|
16489
|
-
|
|
16882
|
+
vitest?: boolean | OptionsVitest;
|
|
16490
16883
|
/**
|
|
16491
16884
|
* Enable JSONC support.
|
|
16492
16885
|
* @default true
|
|
@@ -16508,7 +16901,29 @@ type OptionsConfigs = {
|
|
|
16508
16901
|
*/
|
|
16509
16902
|
stylistic?: boolean | StylisticConfig;
|
|
16510
16903
|
};
|
|
16511
|
-
|
|
16904
|
+
/**
|
|
16905
|
+
* Deprecated options that are still supported
|
|
16906
|
+
*/
|
|
16907
|
+
type OptionsDeprecated = {
|
|
16908
|
+
/**
|
|
16909
|
+
* Enable `eslint-plugin-react-refresh` rules.
|
|
16910
|
+
* @default true
|
|
16911
|
+
* @deprecated use `react.refresh` instead
|
|
16912
|
+
*/
|
|
16913
|
+
reactRefresh?: boolean;
|
|
16914
|
+
/**
|
|
16915
|
+
* Enable Tailwind CSS support.
|
|
16916
|
+
*
|
|
16917
|
+
* Passing an object to configure the options.
|
|
16918
|
+
* Tailwind support is currently disabled; passing this option only logs a warning.
|
|
16919
|
+
* @deprecated deprecated tw support
|
|
16920
|
+
* @default false
|
|
16921
|
+
*/
|
|
16922
|
+
tailwind?: boolean | {
|
|
16923
|
+
overrides?: Record<string, unknown>;
|
|
16924
|
+
};
|
|
16925
|
+
};
|
|
16926
|
+
type OptionsConfig = OptionsComponentExts & OptionsTypeScriptParserOptions & OptionsConfigs & OptionsDeprecated & {
|
|
16512
16927
|
/**
|
|
16513
16928
|
* Enable debug mode.
|
|
16514
16929
|
*/
|
|
@@ -16578,6 +16993,10 @@ type OptionsConfig = OptionsComponentExts & OptionsTypeScriptParserOptions & Opt
|
|
|
16578
16993
|
* @default false
|
|
16579
16994
|
*/
|
|
16580
16995
|
sortImports?: boolean;
|
|
16996
|
+
/**
|
|
16997
|
+
* The prefix for the name of the config item
|
|
16998
|
+
* @default "@typescript-eslint"
|
|
16999
|
+
*/
|
|
16581
17000
|
tsPrefix?: string;
|
|
16582
17001
|
/**
|
|
16583
17002
|
* Glob patterns for ADDITIONAL tsconfig files to lint (aka sort)
|
|
@@ -16603,12 +17022,8 @@ type OptionsConfig = OptionsComponentExts & OptionsTypeScriptParserOptions & Opt
|
|
|
16603
17022
|
*/
|
|
16604
17023
|
isInEditor?: boolean;
|
|
16605
17024
|
};
|
|
16606
|
-
type NormalizedOptionsConfig = Omit<OptionsConfig, "off"> & {
|
|
16607
|
-
off: RuleName[];
|
|
16608
|
-
};
|
|
16609
|
-
type RenamePrefix<T extends Record<string, unknown>, FromPref extends string, ToPref extends string> = { [K in keyof T as K extends `${FromPref}${infer Rest}` ? `${ToPref}${Rest}` : K]: T[K] };
|
|
16610
17025
|
//#endregion
|
|
16611
17026
|
//#region src/_generated/fixable-rules-map.d.ts
|
|
16612
17027
|
declare const FIXABLE_RULES_MAP: Record<string, RuleName[]>;
|
|
16613
17028
|
//#endregion
|
|
16614
|
-
export {
|
|
17029
|
+
export { OptionsConfig as a, RuleName as c, TypescriptPreset as d, EslintConfigFn as i, RulesRecord as l, Awaitable as n, ReactHooksPreset as o, Config as r, ReactPreset as s, FIXABLE_RULES_MAP as t, TypedFlatConfigItemWithId as u };
|