@sxzz/eslint-config 7.2.7 → 7.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +213 -143
- package/package.json +17 -18
package/dist/index.d.ts
CHANGED
|
@@ -494,7 +494,7 @@ interface Rules {
|
|
|
494
494
|
* Disallow member access on a value with type `any`
|
|
495
495
|
* @see https://typescript-eslint.io/rules/no-unsafe-member-access
|
|
496
496
|
*/
|
|
497
|
-
"@typescript-eslint/no-unsafe-member-access"?: Linter.RuleEntry<
|
|
497
|
+
"@typescript-eslint/no-unsafe-member-access"?: Linter.RuleEntry<TypescriptEslintNoUnsafeMemberAccess>;
|
|
498
498
|
/**
|
|
499
499
|
* Disallow returning a value with type `any` from a function
|
|
500
500
|
* @see https://typescript-eslint.io/rules/no-unsafe-return
|
|
@@ -1665,6 +1665,26 @@ interface Rules {
|
|
|
1665
1665
|
*/
|
|
1666
1666
|
"jsdoc/text-escaping"?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
1667
1667
|
/**
|
|
1668
|
+
* Prefers either function properties or method signatures
|
|
1669
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
|
|
1670
|
+
*/
|
|
1671
|
+
"jsdoc/ts-method-signature-style"?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>;
|
|
1672
|
+
/**
|
|
1673
|
+
* Warns against use of the empty object type
|
|
1674
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
|
|
1675
|
+
*/
|
|
1676
|
+
"jsdoc/ts-no-empty-object-type"?: Linter.RuleEntry<[]>;
|
|
1677
|
+
/**
|
|
1678
|
+
* Catches unnecessary template expressions such as string expressions within a template literal.
|
|
1679
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
|
|
1680
|
+
*/
|
|
1681
|
+
"jsdoc/ts-no-unnecessary-template-expression"?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>;
|
|
1682
|
+
/**
|
|
1683
|
+
* Prefers function types over call signatures when there are no other properties.
|
|
1684
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
|
|
1685
|
+
*/
|
|
1686
|
+
"jsdoc/ts-prefer-function-type"?: Linter.RuleEntry<JsdocTsPreferFunctionType>;
|
|
1687
|
+
/**
|
|
1668
1688
|
* Formats JSDoc type values.
|
|
1669
1689
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
1670
1690
|
*/
|
|
@@ -3978,710 +3998,725 @@ interface Rules {
|
|
|
3978
3998
|
"unicode-bom"?: Linter.RuleEntry<UnicodeBom>;
|
|
3979
3999
|
/**
|
|
3980
4000
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
3981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
3982
4002
|
*/
|
|
3983
4003
|
"unicorn/better-regex"?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
3984
4004
|
/**
|
|
3985
4005
|
* Enforce a specific parameter name in catch clauses.
|
|
3986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
3987
4007
|
*/
|
|
3988
4008
|
"unicorn/catch-error-name"?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
3989
4009
|
/**
|
|
3990
4010
|
* Enforce consistent assertion style with `node:assert`.
|
|
3991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
3992
4012
|
*/
|
|
3993
4013
|
"unicorn/consistent-assert"?: Linter.RuleEntry<[]>;
|
|
3994
4014
|
/**
|
|
3995
4015
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
3996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
3997
4017
|
*/
|
|
3998
4018
|
"unicorn/consistent-date-clone"?: Linter.RuleEntry<[]>;
|
|
3999
4019
|
/**
|
|
4000
4020
|
* Use destructured variables over properties.
|
|
4001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
4002
4022
|
*/
|
|
4003
4023
|
"unicorn/consistent-destructuring"?: Linter.RuleEntry<[]>;
|
|
4004
4024
|
/**
|
|
4005
4025
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4007
4027
|
*/
|
|
4008
4028
|
"unicorn/consistent-empty-array-spread"?: Linter.RuleEntry<[]>;
|
|
4009
4029
|
/**
|
|
4010
4030
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
4012
4032
|
*/
|
|
4013
4033
|
"unicorn/consistent-existence-index-check"?: Linter.RuleEntry<[]>;
|
|
4014
4034
|
/**
|
|
4015
4035
|
* Move function definitions to the highest possible scope.
|
|
4016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
4017
4037
|
*/
|
|
4018
4038
|
"unicorn/consistent-function-scoping"?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
4019
4039
|
/**
|
|
4020
4040
|
* Enforce correct `Error` subclassing.
|
|
4021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
4022
4042
|
*/
|
|
4023
4043
|
"unicorn/custom-error-definition"?: Linter.RuleEntry<[]>;
|
|
4024
4044
|
/**
|
|
4025
4045
|
* Enforce no spaces between braces.
|
|
4026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
4027
4047
|
*/
|
|
4028
4048
|
"unicorn/empty-brace-spaces"?: Linter.RuleEntry<[]>;
|
|
4029
4049
|
/**
|
|
4030
4050
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
4032
4052
|
*/
|
|
4033
4053
|
"unicorn/error-message"?: Linter.RuleEntry<[]>;
|
|
4034
4054
|
/**
|
|
4035
4055
|
* Require escape sequences to use uppercase or lowercase values.
|
|
4036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
4037
4057
|
*/
|
|
4038
4058
|
"unicorn/escape-case"?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
4039
4059
|
/**
|
|
4040
4060
|
* Add expiration conditions to TODO comments.
|
|
4041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
4042
4062
|
*/
|
|
4043
4063
|
"unicorn/expiring-todo-comments"?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
4044
4064
|
/**
|
|
4045
4065
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
4047
4067
|
*/
|
|
4048
4068
|
"unicorn/explicit-length-check"?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
4049
4069
|
/**
|
|
4050
4070
|
* Enforce a case style for filenames.
|
|
4051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4071
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
4052
4072
|
*/
|
|
4053
4073
|
"unicorn/filename-case"?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
4054
4074
|
/**
|
|
4055
4075
|
* Enforce specific import styles per module.
|
|
4056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
4057
4077
|
*/
|
|
4058
4078
|
"unicorn/import-style"?: Linter.RuleEntry<UnicornImportStyle>;
|
|
4059
4079
|
/**
|
|
4060
4080
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
4061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
4062
4082
|
*/
|
|
4063
4083
|
"unicorn/new-for-builtins"?: Linter.RuleEntry<[]>;
|
|
4064
4084
|
/**
|
|
4065
4085
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4067
4087
|
*/
|
|
4068
4088
|
"unicorn/no-abusive-eslint-disable"?: Linter.RuleEntry<[]>;
|
|
4069
4089
|
/**
|
|
4070
4090
|
* Disallow recursive access to `this` within getters and setters.
|
|
4071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
4072
4092
|
*/
|
|
4073
4093
|
"unicorn/no-accessor-recursion"?: Linter.RuleEntry<[]>;
|
|
4074
4094
|
/**
|
|
4075
4095
|
* Disallow anonymous functions and classes as the default export.
|
|
4076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
4077
4097
|
*/
|
|
4078
4098
|
"unicorn/no-anonymous-default-export"?: Linter.RuleEntry<[]>;
|
|
4079
4099
|
/**
|
|
4080
4100
|
* Prevent passing a function reference directly to iterator methods.
|
|
4081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
4082
4102
|
*/
|
|
4083
4103
|
"unicorn/no-array-callback-reference"?: Linter.RuleEntry<[]>;
|
|
4084
4104
|
/**
|
|
4085
4105
|
* Prefer `for…of` over the `forEach` method.
|
|
4086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
4087
4107
|
*/
|
|
4088
4108
|
"unicorn/no-array-for-each"?: Linter.RuleEntry<[]>;
|
|
4089
4109
|
/**
|
|
4090
4110
|
* Disallow using the `this` argument in array methods.
|
|
4091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
4092
4112
|
*/
|
|
4093
4113
|
"unicorn/no-array-method-this-argument"?: Linter.RuleEntry<[]>;
|
|
4094
4114
|
/**
|
|
4095
4115
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
4096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
4097
4117
|
* @deprecated
|
|
4098
4118
|
*/
|
|
4099
4119
|
"unicorn/no-array-push-push"?: Linter.RuleEntry<[]>;
|
|
4100
4120
|
/**
|
|
4101
4121
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
4102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
4103
4123
|
*/
|
|
4104
4124
|
"unicorn/no-array-reduce"?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
4105
4125
|
/**
|
|
4106
4126
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
4107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
4108
4128
|
*/
|
|
4109
4129
|
"unicorn/no-array-reverse"?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
4110
4130
|
/**
|
|
4111
4131
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
4112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
4113
4133
|
*/
|
|
4114
4134
|
"unicorn/no-array-sort"?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
4115
4135
|
/**
|
|
4116
4136
|
* Disallow member access from await expression.
|
|
4117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
4118
4138
|
*/
|
|
4119
4139
|
"unicorn/no-await-expression-member"?: Linter.RuleEntry<[]>;
|
|
4120
4140
|
/**
|
|
4121
4141
|
* Disallow using `await` in `Promise` method parameters.
|
|
4122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
4123
4143
|
*/
|
|
4124
4144
|
"unicorn/no-await-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
4125
4145
|
/**
|
|
4126
4146
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
4127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
4128
4148
|
*/
|
|
4129
4149
|
"unicorn/no-console-spaces"?: Linter.RuleEntry<[]>;
|
|
4130
4150
|
/**
|
|
4131
4151
|
* Do not use `document.cookie` directly.
|
|
4132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
4133
4153
|
*/
|
|
4134
4154
|
"unicorn/no-document-cookie"?: Linter.RuleEntry<[]>;
|
|
4135
4155
|
/**
|
|
4136
4156
|
* Disallow empty files.
|
|
4137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
4138
4158
|
*/
|
|
4139
4159
|
"unicorn/no-empty-file"?: Linter.RuleEntry<[]>;
|
|
4140
4160
|
/**
|
|
4141
4161
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
4142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
4143
4163
|
*/
|
|
4144
4164
|
"unicorn/no-for-loop"?: Linter.RuleEntry<[]>;
|
|
4145
4165
|
/**
|
|
4146
4166
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
4147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
4148
4168
|
*/
|
|
4149
4169
|
"unicorn/no-hex-escape"?: Linter.RuleEntry<[]>;
|
|
4150
4170
|
/**
|
|
4171
|
+
* Disallow immediate mutation after variable assignment.
|
|
4172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
4173
|
+
*/
|
|
4174
|
+
"unicorn/no-immediate-mutation"?: Linter.RuleEntry<[]>;
|
|
4175
|
+
/**
|
|
4151
4176
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
4152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
4153
4178
|
* @deprecated
|
|
4154
4179
|
*/
|
|
4155
4180
|
"unicorn/no-instanceof-array"?: Linter.RuleEntry<[]>;
|
|
4156
4181
|
/**
|
|
4157
4182
|
* Disallow `instanceof` with built-in objects
|
|
4158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
4159
4184
|
*/
|
|
4160
4185
|
"unicorn/no-instanceof-builtins"?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
4161
4186
|
/**
|
|
4162
4187
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
4163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
4164
4189
|
*/
|
|
4165
4190
|
"unicorn/no-invalid-fetch-options"?: Linter.RuleEntry<[]>;
|
|
4166
4191
|
/**
|
|
4167
4192
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
4168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
4169
4194
|
*/
|
|
4170
4195
|
"unicorn/no-invalid-remove-event-listener"?: Linter.RuleEntry<[]>;
|
|
4171
4196
|
/**
|
|
4172
4197
|
* Disallow identifiers starting with `new` or `class`.
|
|
4173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
4174
4199
|
*/
|
|
4175
4200
|
"unicorn/no-keyword-prefix"?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
4176
4201
|
/**
|
|
4177
4202
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
4178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
4179
4204
|
* @deprecated
|
|
4180
4205
|
*/
|
|
4181
4206
|
"unicorn/no-length-as-slice-end"?: Linter.RuleEntry<[]>;
|
|
4182
4207
|
/**
|
|
4183
4208
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
4184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
4185
4210
|
*/
|
|
4186
4211
|
"unicorn/no-lonely-if"?: Linter.RuleEntry<[]>;
|
|
4187
4212
|
/**
|
|
4188
4213
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
4189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
4190
4215
|
*/
|
|
4191
4216
|
"unicorn/no-magic-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
4192
4217
|
/**
|
|
4193
4218
|
* Disallow named usage of default import and export.
|
|
4194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
4195
4220
|
*/
|
|
4196
4221
|
"unicorn/no-named-default"?: Linter.RuleEntry<[]>;
|
|
4197
4222
|
/**
|
|
4198
4223
|
* Disallow negated conditions.
|
|
4199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
4200
4225
|
*/
|
|
4201
4226
|
"unicorn/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
4202
4227
|
/**
|
|
4203
4228
|
* Disallow negated expression in equality check.
|
|
4204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
4205
4230
|
*/
|
|
4206
4231
|
"unicorn/no-negation-in-equality-check"?: Linter.RuleEntry<[]>;
|
|
4207
4232
|
/**
|
|
4208
4233
|
* Disallow nested ternary expressions.
|
|
4209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
4210
4235
|
*/
|
|
4211
4236
|
"unicorn/no-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
4212
4237
|
/**
|
|
4213
4238
|
* Disallow `new Array()`.
|
|
4214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
4215
4240
|
*/
|
|
4216
4241
|
"unicorn/no-new-array"?: Linter.RuleEntry<[]>;
|
|
4217
4242
|
/**
|
|
4218
4243
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
4219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
4220
4245
|
*/
|
|
4221
4246
|
"unicorn/no-new-buffer"?: Linter.RuleEntry<[]>;
|
|
4222
4247
|
/**
|
|
4223
4248
|
* Disallow the use of the `null` literal.
|
|
4224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
4225
4250
|
*/
|
|
4226
4251
|
"unicorn/no-null"?: Linter.RuleEntry<UnicornNoNull>;
|
|
4227
4252
|
/**
|
|
4228
4253
|
* Disallow the use of objects as default parameters.
|
|
4229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
4230
4255
|
*/
|
|
4231
4256
|
"unicorn/no-object-as-default-parameter"?: Linter.RuleEntry<[]>;
|
|
4232
4257
|
/**
|
|
4233
4258
|
* Disallow `process.exit()`.
|
|
4234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
4235
4260
|
*/
|
|
4236
4261
|
"unicorn/no-process-exit"?: Linter.RuleEntry<[]>;
|
|
4237
4262
|
/**
|
|
4238
4263
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
4239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
4240
4265
|
*/
|
|
4241
4266
|
"unicorn/no-single-promise-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
4242
4267
|
/**
|
|
4243
4268
|
* Disallow classes that only have static members.
|
|
4244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
4245
4270
|
*/
|
|
4246
4271
|
"unicorn/no-static-only-class"?: Linter.RuleEntry<[]>;
|
|
4247
4272
|
/**
|
|
4248
4273
|
* Disallow `then` property.
|
|
4249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
4250
4275
|
*/
|
|
4251
4276
|
"unicorn/no-thenable"?: Linter.RuleEntry<[]>;
|
|
4252
4277
|
/**
|
|
4253
4278
|
* Disallow assigning `this` to a variable.
|
|
4254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
4255
4280
|
*/
|
|
4256
4281
|
"unicorn/no-this-assignment"?: Linter.RuleEntry<[]>;
|
|
4257
4282
|
/**
|
|
4258
4283
|
* Disallow comparing `undefined` using `typeof`.
|
|
4259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
4260
4285
|
*/
|
|
4261
4286
|
"unicorn/no-typeof-undefined"?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
4262
4287
|
/**
|
|
4263
4288
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
4264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
4265
4290
|
*/
|
|
4266
4291
|
"unicorn/no-unnecessary-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
4267
4292
|
/**
|
|
4268
4293
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
4269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
4270
4295
|
*/
|
|
4271
4296
|
"unicorn/no-unnecessary-array-splice-count"?: Linter.RuleEntry<[]>;
|
|
4272
4297
|
/**
|
|
4273
4298
|
* Disallow awaiting non-promise values.
|
|
4274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
4275
4300
|
*/
|
|
4276
4301
|
"unicorn/no-unnecessary-await"?: Linter.RuleEntry<[]>;
|
|
4277
4302
|
/**
|
|
4278
4303
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
4279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
4280
4305
|
*/
|
|
4281
4306
|
"unicorn/no-unnecessary-polyfills"?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
4282
4307
|
/**
|
|
4283
4308
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
4284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
4285
4310
|
*/
|
|
4286
4311
|
"unicorn/no-unnecessary-slice-end"?: Linter.RuleEntry<[]>;
|
|
4287
4312
|
/**
|
|
4288
4313
|
* Disallow unreadable array destructuring.
|
|
4289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
4290
4315
|
*/
|
|
4291
4316
|
"unicorn/no-unreadable-array-destructuring"?: Linter.RuleEntry<[]>;
|
|
4292
4317
|
/**
|
|
4293
4318
|
* Disallow unreadable IIFEs.
|
|
4294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
4295
4320
|
*/
|
|
4296
4321
|
"unicorn/no-unreadable-iife"?: Linter.RuleEntry<[]>;
|
|
4297
4322
|
/**
|
|
4298
4323
|
* Disallow unused object properties.
|
|
4299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
4300
4325
|
*/
|
|
4301
4326
|
"unicorn/no-unused-properties"?: Linter.RuleEntry<[]>;
|
|
4302
4327
|
/**
|
|
4328
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
4329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
4330
|
+
*/
|
|
4331
|
+
"unicorn/no-useless-collection-argument"?: Linter.RuleEntry<[]>;
|
|
4332
|
+
/**
|
|
4303
4333
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
4304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
4305
4335
|
*/
|
|
4306
4336
|
"unicorn/no-useless-error-capture-stack-trace"?: Linter.RuleEntry<[]>;
|
|
4307
4337
|
/**
|
|
4308
4338
|
* Disallow useless fallback when spreading in object literals.
|
|
4309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
4310
4340
|
*/
|
|
4311
4341
|
"unicorn/no-useless-fallback-in-spread"?: Linter.RuleEntry<[]>;
|
|
4312
4342
|
/**
|
|
4313
4343
|
* Disallow useless array length check.
|
|
4314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
4315
4345
|
*/
|
|
4316
4346
|
"unicorn/no-useless-length-check"?: Linter.RuleEntry<[]>;
|
|
4317
4347
|
/**
|
|
4318
4348
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
4319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
4320
4350
|
*/
|
|
4321
4351
|
"unicorn/no-useless-promise-resolve-reject"?: Linter.RuleEntry<[]>;
|
|
4322
4352
|
/**
|
|
4323
4353
|
* Disallow unnecessary spread.
|
|
4324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
4325
4355
|
*/
|
|
4326
4356
|
"unicorn/no-useless-spread"?: Linter.RuleEntry<[]>;
|
|
4327
4357
|
/**
|
|
4328
4358
|
* Disallow useless case in switch statements.
|
|
4329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
4330
4360
|
*/
|
|
4331
4361
|
"unicorn/no-useless-switch-case"?: Linter.RuleEntry<[]>;
|
|
4332
4362
|
/**
|
|
4333
4363
|
* Disallow useless `undefined`.
|
|
4334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
4335
4365
|
*/
|
|
4336
4366
|
"unicorn/no-useless-undefined"?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
4337
4367
|
/**
|
|
4338
4368
|
* Disallow number literals with zero fractions or dangling dots.
|
|
4339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
4340
4370
|
*/
|
|
4341
4371
|
"unicorn/no-zero-fractions"?: Linter.RuleEntry<[]>;
|
|
4342
4372
|
/**
|
|
4343
4373
|
* Enforce proper case for numeric literals.
|
|
4344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
4345
4375
|
*/
|
|
4346
4376
|
"unicorn/number-literal-case"?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
4347
4377
|
/**
|
|
4348
4378
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
4349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
4350
4380
|
*/
|
|
4351
4381
|
"unicorn/numeric-separators-style"?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
4352
4382
|
/**
|
|
4353
4383
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
4354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
4355
4385
|
*/
|
|
4356
4386
|
"unicorn/prefer-add-event-listener"?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
4357
4387
|
/**
|
|
4358
4388
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
4359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
4360
4390
|
*/
|
|
4361
4391
|
"unicorn/prefer-array-find"?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
4362
4392
|
/**
|
|
4363
4393
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
4364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
4365
4395
|
*/
|
|
4366
4396
|
"unicorn/prefer-array-flat"?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
4367
4397
|
/**
|
|
4368
4398
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
4369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
4370
4400
|
*/
|
|
4371
4401
|
"unicorn/prefer-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
4372
4402
|
/**
|
|
4373
4403
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
4374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
4375
4405
|
*/
|
|
4376
4406
|
"unicorn/prefer-array-index-of"?: Linter.RuleEntry<[]>;
|
|
4377
4407
|
/**
|
|
4378
4408
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
4379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
4380
4410
|
*/
|
|
4381
4411
|
"unicorn/prefer-array-some"?: Linter.RuleEntry<[]>;
|
|
4382
4412
|
/**
|
|
4383
4413
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
4384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
4385
4415
|
*/
|
|
4386
4416
|
"unicorn/prefer-at"?: Linter.RuleEntry<UnicornPreferAt>;
|
|
4387
4417
|
/**
|
|
4388
4418
|
* Prefer `BigInt` literals over the constructor.
|
|
4389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
4390
4420
|
*/
|
|
4391
4421
|
"unicorn/prefer-bigint-literals"?: Linter.RuleEntry<[]>;
|
|
4392
4422
|
/**
|
|
4393
4423
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
4394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
4395
4425
|
*/
|
|
4396
4426
|
"unicorn/prefer-blob-reading-methods"?: Linter.RuleEntry<[]>;
|
|
4397
4427
|
/**
|
|
4398
4428
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
4399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
4400
4430
|
*/
|
|
4401
4431
|
"unicorn/prefer-class-fields"?: Linter.RuleEntry<[]>;
|
|
4402
4432
|
/**
|
|
4403
4433
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
4404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
4405
4435
|
*/
|
|
4406
4436
|
"unicorn/prefer-classlist-toggle"?: Linter.RuleEntry<[]>;
|
|
4407
4437
|
/**
|
|
4408
4438
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
4409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
4410
4440
|
*/
|
|
4411
4441
|
"unicorn/prefer-code-point"?: Linter.RuleEntry<[]>;
|
|
4412
4442
|
/**
|
|
4413
4443
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
4414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
4415
4445
|
*/
|
|
4416
4446
|
"unicorn/prefer-date-now"?: Linter.RuleEntry<[]>;
|
|
4417
4447
|
/**
|
|
4418
4448
|
* Prefer default parameters over reassignment.
|
|
4419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
4420
4450
|
*/
|
|
4421
4451
|
"unicorn/prefer-default-parameters"?: Linter.RuleEntry<[]>;
|
|
4422
4452
|
/**
|
|
4423
4453
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
4424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
4425
4455
|
*/
|
|
4426
4456
|
"unicorn/prefer-dom-node-append"?: Linter.RuleEntry<[]>;
|
|
4427
4457
|
/**
|
|
4428
4458
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
4429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
4430
4460
|
*/
|
|
4431
4461
|
"unicorn/prefer-dom-node-dataset"?: Linter.RuleEntry<[]>;
|
|
4432
4462
|
/**
|
|
4433
4463
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
4434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
4435
4465
|
*/
|
|
4436
4466
|
"unicorn/prefer-dom-node-remove"?: Linter.RuleEntry<[]>;
|
|
4437
4467
|
/**
|
|
4438
4468
|
* Prefer `.textContent` over `.innerText`.
|
|
4439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
4440
4470
|
*/
|
|
4441
4471
|
"unicorn/prefer-dom-node-text-content"?: Linter.RuleEntry<[]>;
|
|
4442
4472
|
/**
|
|
4443
4473
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
4444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
4445
4475
|
*/
|
|
4446
4476
|
"unicorn/prefer-event-target"?: Linter.RuleEntry<[]>;
|
|
4447
4477
|
/**
|
|
4448
4478
|
* Prefer `export…from` when re-exporting.
|
|
4449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
4450
4480
|
*/
|
|
4451
4481
|
"unicorn/prefer-export-from"?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
4452
4482
|
/**
|
|
4453
4483
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
4454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
4455
4485
|
*/
|
|
4456
4486
|
"unicorn/prefer-global-this"?: Linter.RuleEntry<[]>;
|
|
4457
4487
|
/**
|
|
4458
4488
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
4459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
4460
4490
|
*/
|
|
4461
4491
|
"unicorn/prefer-import-meta-properties"?: Linter.RuleEntry<[]>;
|
|
4462
4492
|
/**
|
|
4463
4493
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
4464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
4465
4495
|
*/
|
|
4466
4496
|
"unicorn/prefer-includes"?: Linter.RuleEntry<[]>;
|
|
4467
4497
|
/**
|
|
4468
4498
|
* Prefer reading a JSON file as a buffer.
|
|
4469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
4470
4500
|
*/
|
|
4471
4501
|
"unicorn/prefer-json-parse-buffer"?: Linter.RuleEntry<[]>;
|
|
4472
4502
|
/**
|
|
4473
4503
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
4474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
4475
4505
|
*/
|
|
4476
4506
|
"unicorn/prefer-keyboard-event-key"?: Linter.RuleEntry<[]>;
|
|
4477
4507
|
/**
|
|
4478
4508
|
* Prefer using a logical operator over a ternary.
|
|
4479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
4480
4510
|
*/
|
|
4481
4511
|
"unicorn/prefer-logical-operator-over-ternary"?: Linter.RuleEntry<[]>;
|
|
4482
4512
|
/**
|
|
4483
4513
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
4484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
4485
4515
|
*/
|
|
4486
4516
|
"unicorn/prefer-math-min-max"?: Linter.RuleEntry<[]>;
|
|
4487
4517
|
/**
|
|
4488
4518
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
4489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
4490
4520
|
*/
|
|
4491
4521
|
"unicorn/prefer-math-trunc"?: Linter.RuleEntry<[]>;
|
|
4492
4522
|
/**
|
|
4493
4523
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
4494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
4495
4525
|
*/
|
|
4496
4526
|
"unicorn/prefer-modern-dom-apis"?: Linter.RuleEntry<[]>;
|
|
4497
4527
|
/**
|
|
4498
4528
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
4499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
4500
4530
|
*/
|
|
4501
4531
|
"unicorn/prefer-modern-math-apis"?: Linter.RuleEntry<[]>;
|
|
4502
4532
|
/**
|
|
4503
4533
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
4504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
4505
4535
|
*/
|
|
4506
4536
|
"unicorn/prefer-module"?: Linter.RuleEntry<[]>;
|
|
4507
4537
|
/**
|
|
4508
4538
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
4509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
4510
4540
|
*/
|
|
4511
4541
|
"unicorn/prefer-native-coercion-functions"?: Linter.RuleEntry<[]>;
|
|
4512
4542
|
/**
|
|
4513
4543
|
* Prefer negative index over `.length - index` when possible.
|
|
4514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
4515
4545
|
*/
|
|
4516
4546
|
"unicorn/prefer-negative-index"?: Linter.RuleEntry<[]>;
|
|
4517
4547
|
/**
|
|
4518
4548
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
4519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
4520
4550
|
*/
|
|
4521
4551
|
"unicorn/prefer-node-protocol"?: Linter.RuleEntry<[]>;
|
|
4522
4552
|
/**
|
|
4523
4553
|
* Prefer `Number` static properties over global ones.
|
|
4524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
4525
4555
|
*/
|
|
4526
4556
|
"unicorn/prefer-number-properties"?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
4527
4557
|
/**
|
|
4528
4558
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
4529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
4530
4560
|
*/
|
|
4531
4561
|
"unicorn/prefer-object-from-entries"?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
4532
4562
|
/**
|
|
4533
4563
|
* Prefer omitting the `catch` binding parameter.
|
|
4534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
4535
4565
|
*/
|
|
4536
4566
|
"unicorn/prefer-optional-catch-binding"?: Linter.RuleEntry<[]>;
|
|
4537
4567
|
/**
|
|
4538
4568
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
4539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
4540
4570
|
*/
|
|
4541
4571
|
"unicorn/prefer-prototype-methods"?: Linter.RuleEntry<[]>;
|
|
4542
4572
|
/**
|
|
4543
4573
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
4544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
4545
4575
|
*/
|
|
4546
4576
|
"unicorn/prefer-query-selector"?: Linter.RuleEntry<[]>;
|
|
4547
4577
|
/**
|
|
4548
4578
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
4549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
4550
4580
|
*/
|
|
4551
4581
|
"unicorn/prefer-reflect-apply"?: Linter.RuleEntry<[]>;
|
|
4552
4582
|
/**
|
|
4553
4583
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
4554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
4555
4585
|
*/
|
|
4556
4586
|
"unicorn/prefer-regexp-test"?: Linter.RuleEntry<[]>;
|
|
4557
4587
|
/**
|
|
4588
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
4589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
4590
|
+
*/
|
|
4591
|
+
"unicorn/prefer-response-static-json"?: Linter.RuleEntry<[]>;
|
|
4592
|
+
/**
|
|
4558
4593
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
4559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
4560
4595
|
*/
|
|
4561
4596
|
"unicorn/prefer-set-has"?: Linter.RuleEntry<[]>;
|
|
4562
4597
|
/**
|
|
4563
4598
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
4564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
4565
4600
|
*/
|
|
4566
4601
|
"unicorn/prefer-set-size"?: Linter.RuleEntry<[]>;
|
|
4567
4602
|
/**
|
|
4568
4603
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
4569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
4570
4605
|
*/
|
|
4571
4606
|
"unicorn/prefer-single-call"?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
4572
4607
|
/**
|
|
4573
4608
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
4574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
4575
4610
|
*/
|
|
4576
4611
|
"unicorn/prefer-spread"?: Linter.RuleEntry<[]>;
|
|
4577
4612
|
/**
|
|
4578
4613
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
4580
4615
|
*/
|
|
4581
4616
|
"unicorn/prefer-string-raw"?: Linter.RuleEntry<[]>;
|
|
4582
4617
|
/**
|
|
4583
4618
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
4584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
4585
4620
|
*/
|
|
4586
4621
|
"unicorn/prefer-string-replace-all"?: Linter.RuleEntry<[]>;
|
|
4587
4622
|
/**
|
|
4588
4623
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
4589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
4590
4625
|
*/
|
|
4591
4626
|
"unicorn/prefer-string-slice"?: Linter.RuleEntry<[]>;
|
|
4592
4627
|
/**
|
|
4593
4628
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
4594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
4595
4630
|
*/
|
|
4596
4631
|
"unicorn/prefer-string-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
4597
4632
|
/**
|
|
4598
4633
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
4599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
4600
4635
|
*/
|
|
4601
4636
|
"unicorn/prefer-string-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
4602
4637
|
/**
|
|
4603
4638
|
* Prefer using `structuredClone` to create a deep clone.
|
|
4604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
4605
4640
|
*/
|
|
4606
4641
|
"unicorn/prefer-structured-clone"?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
4607
4642
|
/**
|
|
4608
4643
|
* Prefer `switch` over multiple `else-if`.
|
|
4609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
4610
4645
|
*/
|
|
4611
4646
|
"unicorn/prefer-switch"?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
4612
4647
|
/**
|
|
4613
4648
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
4614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
4615
4650
|
*/
|
|
4616
4651
|
"unicorn/prefer-ternary"?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
4617
4652
|
/**
|
|
4618
4653
|
* Prefer top-level await over top-level promises and async function calls.
|
|
4619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
4620
4655
|
*/
|
|
4621
4656
|
"unicorn/prefer-top-level-await"?: Linter.RuleEntry<[]>;
|
|
4622
4657
|
/**
|
|
4623
4658
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
4624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
4625
4660
|
*/
|
|
4626
4661
|
"unicorn/prefer-type-error"?: Linter.RuleEntry<[]>;
|
|
4627
4662
|
/**
|
|
4628
4663
|
* Prevent abbreviations.
|
|
4629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
4630
4665
|
*/
|
|
4631
4666
|
"unicorn/prevent-abbreviations"?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
4632
4667
|
/**
|
|
4633
4668
|
* Enforce consistent relative URL style.
|
|
4634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
4635
4670
|
*/
|
|
4636
4671
|
"unicorn/relative-url-style"?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
4637
4672
|
/**
|
|
4638
4673
|
* Enforce using the separator argument with `Array#join()`.
|
|
4639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
4640
4675
|
*/
|
|
4641
4676
|
"unicorn/require-array-join-separator"?: Linter.RuleEntry<[]>;
|
|
4642
4677
|
/**
|
|
4643
4678
|
* Require non-empty module attributes for imports and exports
|
|
4644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
4645
4680
|
*/
|
|
4646
4681
|
"unicorn/require-module-attributes"?: Linter.RuleEntry<[]>;
|
|
4647
4682
|
/**
|
|
4648
4683
|
* Require non-empty specifier list in import and export statements.
|
|
4649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
4650
4685
|
*/
|
|
4651
4686
|
"unicorn/require-module-specifiers"?: Linter.RuleEntry<[]>;
|
|
4652
4687
|
/**
|
|
4653
4688
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
4654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
4655
4690
|
*/
|
|
4656
4691
|
"unicorn/require-number-to-fixed-digits-argument"?: Linter.RuleEntry<[]>;
|
|
4657
4692
|
/**
|
|
4658
4693
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
4659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
4660
4695
|
*/
|
|
4661
4696
|
"unicorn/require-post-message-target-origin"?: Linter.RuleEntry<[]>;
|
|
4662
4697
|
/**
|
|
4663
4698
|
* Enforce better string content.
|
|
4664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
4665
4700
|
*/
|
|
4666
4701
|
"unicorn/string-content"?: Linter.RuleEntry<UnicornStringContent>;
|
|
4667
4702
|
/**
|
|
4668
4703
|
* Enforce consistent brace style for `case` clauses.
|
|
4669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
4670
4705
|
*/
|
|
4671
4706
|
"unicorn/switch-case-braces"?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
4672
4707
|
/**
|
|
4673
4708
|
* Fix whitespace-insensitive template indentation.
|
|
4674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
4675
4710
|
*/
|
|
4676
4711
|
"unicorn/template-indent"?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
4677
4712
|
/**
|
|
4678
4713
|
* Enforce consistent case for text encoding identifiers.
|
|
4679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
4680
4715
|
*/
|
|
4681
|
-
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<
|
|
4716
|
+
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
4682
4717
|
/**
|
|
4683
4718
|
* Require `new` when creating an error.
|
|
4684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
4685
4720
|
*/
|
|
4686
4721
|
"unicorn/throw-new-error"?: Linter.RuleEntry<[]>;
|
|
4687
4722
|
/**
|
|
@@ -6791,6 +6826,9 @@ type TypescriptEslintNoUnnecessaryTypeAssertion = [] | [{
|
|
|
6791
6826
|
checkLiteralConstAssertions?: boolean;
|
|
6792
6827
|
typesToIgnore?: string[];
|
|
6793
6828
|
}];
|
|
6829
|
+
type TypescriptEslintNoUnsafeMemberAccess = [] | [{
|
|
6830
|
+
allowOptionalChaining?: boolean;
|
|
6831
|
+
}];
|
|
6794
6832
|
type TypescriptEslintNoUnusedExpressions = [] | [{
|
|
6795
6833
|
allowShortCircuit?: boolean;
|
|
6796
6834
|
allowTernary?: boolean;
|
|
@@ -6806,6 +6844,7 @@ type TypescriptEslintNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
6806
6844
|
destructuredArrayIgnorePattern?: string;
|
|
6807
6845
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
6808
6846
|
ignoreRestSiblings?: boolean;
|
|
6847
|
+
ignoreUsingDeclarations?: boolean;
|
|
6809
6848
|
reportUsedIgnorePattern?: boolean;
|
|
6810
6849
|
vars?: ("all" | "local");
|
|
6811
6850
|
varsIgnorePattern?: string;
|
|
@@ -7932,15 +7971,40 @@ type JsdocTextEscaping = [] | [{
|
|
|
7932
7971
|
escapeHTML?: boolean;
|
|
7933
7972
|
escapeMarkdown?: boolean;
|
|
7934
7973
|
}];
|
|
7974
|
+
type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
|
|
7975
|
+
enableFixer?: boolean;
|
|
7976
|
+
}];
|
|
7977
|
+
type JsdocTsNoUnnecessaryTemplateExpression = [] | [{
|
|
7978
|
+
enableFixer?: boolean;
|
|
7979
|
+
}];
|
|
7980
|
+
type JsdocTsPreferFunctionType = [] | [{
|
|
7981
|
+
enableFixer?: boolean;
|
|
7982
|
+
}];
|
|
7935
7983
|
type JsdocTypeFormatting = [] | [{
|
|
7936
7984
|
arrayBrackets?: ("angle" | "square");
|
|
7985
|
+
arrowFunctionPostReturnMarkerSpacing?: string;
|
|
7986
|
+
arrowFunctionPreReturnMarkerSpacing?: string;
|
|
7937
7987
|
enableFixer?: boolean;
|
|
7988
|
+
functionOrClassParameterSpacing?: string;
|
|
7989
|
+
functionOrClassPostGenericSpacing?: string;
|
|
7990
|
+
functionOrClassPostReturnMarkerSpacing?: string;
|
|
7991
|
+
functionOrClassPreReturnMarkerSpacing?: string;
|
|
7992
|
+
functionOrClassTypeParameterSpacing?: string;
|
|
7993
|
+
genericAndTupleElementSpacing?: string;
|
|
7938
7994
|
genericDot?: boolean;
|
|
7995
|
+
keyValuePostColonSpacing?: string;
|
|
7996
|
+
keyValuePostKeySpacing?: string;
|
|
7997
|
+
keyValuePostOptionalSpacing?: string;
|
|
7998
|
+
keyValuePostVariadicSpacing?: string;
|
|
7999
|
+
methodQuotes?: ("double" | "single");
|
|
7939
8000
|
objectFieldIndent?: string;
|
|
7940
8001
|
objectFieldQuote?: ("double" | "single" | null);
|
|
7941
8002
|
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
7942
8003
|
objectFieldSeparatorOptionalLinebreak?: boolean;
|
|
7943
8004
|
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
8005
|
+
parameterDefaultValueSpacing?: string;
|
|
8006
|
+
postMethodNameSpacing?: string;
|
|
8007
|
+
postNewSpacing?: string;
|
|
7944
8008
|
separatorForSingleObjectField?: boolean;
|
|
7945
8009
|
stringQuotes?: ("double" | "single");
|
|
7946
8010
|
typeBracketSpacing?: string;
|
|
@@ -11098,6 +11162,7 @@ type PnpmJsonValidCatalog = [] | [{
|
|
|
11098
11162
|
}];
|
|
11099
11163
|
type PnpmYamlNoDuplicateCatalogItem = [] | [{
|
|
11100
11164
|
allow?: string[];
|
|
11165
|
+
checkDuplicates?: ("name-only" | "exact-version");
|
|
11101
11166
|
}];
|
|
11102
11167
|
type PreferArrowCallback = [] | [{
|
|
11103
11168
|
allowNamedFunctions?: boolean;
|
|
@@ -11522,6 +11587,9 @@ type UnicornTemplateIndent = [] | [{
|
|
|
11522
11587
|
selectors?: string[];
|
|
11523
11588
|
comments?: string[];
|
|
11524
11589
|
}];
|
|
11590
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
11591
|
+
withDash?: boolean;
|
|
11592
|
+
}];
|
|
11525
11593
|
type UnocssEnforceClassCompile = [] | [{
|
|
11526
11594
|
prefix?: string;
|
|
11527
11595
|
enableFix?: boolean;
|
|
@@ -11538,6 +11606,7 @@ type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
|
11538
11606
|
destructuredArrayIgnorePattern?: string;
|
|
11539
11607
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
11540
11608
|
ignoreRestSiblings?: boolean;
|
|
11609
|
+
ignoreUsingDeclarations?: boolean;
|
|
11541
11610
|
reportUsedIgnorePattern?: boolean;
|
|
11542
11611
|
vars?: ("all" | "local");
|
|
11543
11612
|
varsIgnorePattern?: string;
|
|
@@ -11550,6 +11619,7 @@ type UnusedImportsNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
11550
11619
|
destructuredArrayIgnorePattern?: string;
|
|
11551
11620
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
11552
11621
|
ignoreRestSiblings?: boolean;
|
|
11622
|
+
ignoreUsingDeclarations?: boolean;
|
|
11553
11623
|
reportUsedIgnorePattern?: boolean;
|
|
11554
11624
|
vars?: ("all" | "local");
|
|
11555
11625
|
varsIgnorePattern?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sxzz/eslint-config",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.8",
|
|
4
4
|
"description": "ESLint config for @sxzz.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
41
|
-
"@eslint/js": "^9.
|
|
42
|
-
"@eslint/markdown": "^7.
|
|
41
|
+
"@eslint/js": "^9.38.0",
|
|
42
|
+
"@eslint/markdown": "^7.5.0",
|
|
43
43
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
44
44
|
"eslint-config-prettier": "^10.1.8",
|
|
45
45
|
"eslint-flat-config-utils": "^2.1.4",
|
|
@@ -47,39 +47,38 @@
|
|
|
47
47
|
"eslint-plugin-command": "^3.3.1",
|
|
48
48
|
"eslint-plugin-de-morgan": "^2.0.0",
|
|
49
49
|
"eslint-plugin-import-x": "^4.16.1",
|
|
50
|
-
"eslint-plugin-jsdoc": "^
|
|
50
|
+
"eslint-plugin-jsdoc": "^61.1.11",
|
|
51
51
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
52
52
|
"eslint-plugin-n": "^17.23.1",
|
|
53
53
|
"eslint-plugin-perfectionist": "^4.15.1",
|
|
54
|
-
"eslint-plugin-pnpm": "^1.
|
|
54
|
+
"eslint-plugin-pnpm": "^1.3.0",
|
|
55
55
|
"eslint-plugin-prettier": "^5.5.4",
|
|
56
56
|
"eslint-plugin-regexp": "^2.10.0",
|
|
57
57
|
"eslint-plugin-sxzz": "^0.4.1",
|
|
58
|
-
"eslint-plugin-unicorn": "^
|
|
59
|
-
"eslint-plugin-unused-imports": "^4.
|
|
60
|
-
"eslint-plugin-vue": "^10.5.
|
|
58
|
+
"eslint-plugin-unicorn": "^62.0.0",
|
|
59
|
+
"eslint-plugin-unused-imports": "^4.3.0",
|
|
60
|
+
"eslint-plugin-vue": "^10.5.1",
|
|
61
61
|
"eslint-plugin-yml": "^1.19.0",
|
|
62
62
|
"globals": "^16.4.0",
|
|
63
63
|
"jsonc-eslint-parser": "^2.4.1",
|
|
64
64
|
"local-pkg": "^1.1.2",
|
|
65
65
|
"prettier": "^3.6.2",
|
|
66
|
-
"typescript-eslint": "^8.
|
|
66
|
+
"typescript-eslint": "^8.46.2",
|
|
67
67
|
"vue-eslint-parser": "^10.2.0",
|
|
68
68
|
"yaml-eslint-parser": "^1.3.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@eslint/config-inspector": "^1.3.0",
|
|
72
72
|
"@sxzz/prettier-config": "^2.2.4",
|
|
73
|
-
"@types/node": "^24.
|
|
74
|
-
"@unocss/eslint-plugin": "^66.5.
|
|
75
|
-
"ansis": "^4.2.0",
|
|
73
|
+
"@types/node": "^24.9.2",
|
|
74
|
+
"@unocss/eslint-plugin": "^66.5.4",
|
|
76
75
|
"bumpp": "^10.3.1",
|
|
77
|
-
"eslint": "^9.
|
|
76
|
+
"eslint": "^9.38.0",
|
|
78
77
|
"eslint-typegen": "^2.3.0",
|
|
79
|
-
"rolldown-plugin-require-cjs": "^0.3.
|
|
80
|
-
"tsdown": "^0.15.
|
|
81
|
-
"
|
|
82
|
-
"
|
|
78
|
+
"rolldown-plugin-require-cjs": "^0.3.1",
|
|
79
|
+
"tsdown": "^0.15.12",
|
|
80
|
+
"typescript": "^5.9.3",
|
|
81
|
+
"unrun": "^0.2.1"
|
|
83
82
|
},
|
|
84
83
|
"engines": {
|
|
85
84
|
"node": ">=20.0.0"
|
|
@@ -91,7 +90,7 @@
|
|
|
91
90
|
"scripts": {
|
|
92
91
|
"dev": "eslint-config-inspector --config eslint-inspector.config.ts",
|
|
93
92
|
"build": "pnpm run build:typegen && tsdown",
|
|
94
|
-
"build:typegen": "
|
|
93
|
+
"build:typegen": "unrun scripts/typegen.ts",
|
|
95
94
|
"build:inspector": "eslint-config-inspector build --config eslint-inspector.config.ts",
|
|
96
95
|
"test": "echo Skip",
|
|
97
96
|
"lint": "eslint --max-warnings=0",
|