@zayne-labs/eslint-config 0.9.7 → 0.9.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/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +177 -141
- package/package.json +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -4231,7 +4231,7 @@ interface Rules {
|
|
|
4231
4231
|
*/
|
|
4232
4232
|
'tailwindcss-better/no-restricted-classes'?: Linter.RuleEntry<TailwindcssBetterNoRestrictedClasses>;
|
|
4233
4233
|
/**
|
|
4234
|
-
* Disallow unnecessary whitespace
|
|
4234
|
+
* Disallow unnecessary whitespace between Tailwind CSS classes.
|
|
4235
4235
|
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/no-unnecessary-whitespace.md
|
|
4236
4236
|
*/
|
|
4237
4237
|
'tailwindcss-better/no-unnecessary-whitespace'?: Linter.RuleEntry<TailwindcssBetterNoUnnecessaryWhitespace>;
|
|
@@ -5078,670 +5078,690 @@ interface Rules {
|
|
|
5078
5078
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5079
5079
|
/**
|
|
5080
5080
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
|
|
5082
5082
|
*/
|
|
5083
5083
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5084
5084
|
/**
|
|
5085
5085
|
* Enforce a specific parameter name in catch clauses.
|
|
5086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
|
|
5087
5087
|
*/
|
|
5088
5088
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5089
5089
|
/**
|
|
5090
5090
|
* Enforce consistent assertion style with `node:assert`.
|
|
5091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
|
|
5092
5092
|
*/
|
|
5093
5093
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5094
5094
|
/**
|
|
5095
5095
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
|
|
5097
5097
|
*/
|
|
5098
5098
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5099
5099
|
/**
|
|
5100
5100
|
* Use destructured variables over properties.
|
|
5101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
|
|
5102
5102
|
*/
|
|
5103
5103
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5104
5104
|
/**
|
|
5105
5105
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5107
5107
|
*/
|
|
5108
5108
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5109
5109
|
/**
|
|
5110
5110
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
|
|
5112
5112
|
*/
|
|
5113
5113
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5114
5114
|
/**
|
|
5115
5115
|
* Move function definitions to the highest possible scope.
|
|
5116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
|
|
5117
5117
|
*/
|
|
5118
5118
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5119
5119
|
/**
|
|
5120
5120
|
* Enforce correct `Error` subclassing.
|
|
5121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
|
|
5122
5122
|
*/
|
|
5123
5123
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5124
5124
|
/**
|
|
5125
5125
|
* Enforce no spaces between braces.
|
|
5126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
|
|
5127
5127
|
*/
|
|
5128
5128
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5129
5129
|
/**
|
|
5130
5130
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
|
|
5132
5132
|
*/
|
|
5133
5133
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5134
5134
|
/**
|
|
5135
5135
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
|
|
5137
5137
|
*/
|
|
5138
5138
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5139
5139
|
/**
|
|
5140
5140
|
* Add expiration conditions to TODO comments.
|
|
5141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
|
|
5142
5142
|
*/
|
|
5143
5143
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5144
5144
|
/**
|
|
5145
5145
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
|
|
5147
5147
|
*/
|
|
5148
5148
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5149
5149
|
/**
|
|
5150
5150
|
* Enforce a case style for filenames.
|
|
5151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
|
|
5152
5152
|
*/
|
|
5153
5153
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5154
5154
|
/**
|
|
5155
5155
|
* Enforce specific import styles per module.
|
|
5156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
|
|
5157
5157
|
*/
|
|
5158
5158
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5159
5159
|
/**
|
|
5160
5160
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
|
|
5162
5162
|
*/
|
|
5163
5163
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5164
5164
|
/**
|
|
5165
5165
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5167
5167
|
*/
|
|
5168
5168
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5169
5169
|
/**
|
|
5170
5170
|
* Disallow recursive access to `this` within getters and setters.
|
|
5171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
|
|
5172
5172
|
*/
|
|
5173
5173
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5174
5174
|
/**
|
|
5175
5175
|
* Disallow anonymous functions and classes as the default export.
|
|
5176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
|
|
5177
5177
|
*/
|
|
5178
5178
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5179
5179
|
/**
|
|
5180
5180
|
* Prevent passing a function reference directly to iterator methods.
|
|
5181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
|
|
5182
5182
|
*/
|
|
5183
5183
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5184
5184
|
/**
|
|
5185
5185
|
* Prefer `for…of` over the `forEach` method.
|
|
5186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
|
|
5187
5187
|
*/
|
|
5188
5188
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5189
5189
|
/**
|
|
5190
5190
|
* Disallow using the `this` argument in array methods.
|
|
5191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
|
|
5192
5192
|
*/
|
|
5193
5193
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5194
5194
|
/**
|
|
5195
5195
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
5197
5197
|
* @deprecated
|
|
5198
5198
|
*/
|
|
5199
5199
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5200
5200
|
/**
|
|
5201
5201
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
|
|
5203
5203
|
*/
|
|
5204
5204
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5205
|
+
/**
|
|
5206
|
+
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
|
|
5208
|
+
*/
|
|
5209
|
+
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5205
5210
|
/**
|
|
5206
5211
|
* Disallow member access from await expression.
|
|
5207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
|
|
5208
5213
|
*/
|
|
5209
5214
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5210
5215
|
/**
|
|
5211
5216
|
* Disallow using `await` in `Promise` method parameters.
|
|
5212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5213
5218
|
*/
|
|
5214
5219
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5215
5220
|
/**
|
|
5216
5221
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
|
|
5218
5223
|
*/
|
|
5219
5224
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5220
5225
|
/**
|
|
5221
5226
|
* Do not use `document.cookie` directly.
|
|
5222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
|
|
5223
5228
|
*/
|
|
5224
5229
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5225
5230
|
/**
|
|
5226
5231
|
* Disallow empty files.
|
|
5227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
|
|
5228
5233
|
*/
|
|
5229
5234
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5230
5235
|
/**
|
|
5231
5236
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
|
|
5233
5238
|
*/
|
|
5234
5239
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5235
5240
|
/**
|
|
5236
5241
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
|
|
5238
5243
|
*/
|
|
5239
5244
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5240
5245
|
/**
|
|
5241
5246
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5243
5248
|
* @deprecated
|
|
5244
5249
|
*/
|
|
5245
5250
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5246
5251
|
/**
|
|
5247
5252
|
* Disallow `instanceof` with built-in objects
|
|
5248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
|
|
5249
5254
|
*/
|
|
5250
5255
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5251
5256
|
/**
|
|
5252
5257
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5254
5259
|
*/
|
|
5255
5260
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5256
5261
|
/**
|
|
5257
5262
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5259
5264
|
*/
|
|
5260
5265
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5261
5266
|
/**
|
|
5262
5267
|
* Disallow identifiers starting with `new` or `class`.
|
|
5263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
|
|
5264
5269
|
*/
|
|
5265
5270
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5266
5271
|
/**
|
|
5267
5272
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5269
5274
|
* @deprecated
|
|
5270
5275
|
*/
|
|
5271
5276
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5272
5277
|
/**
|
|
5273
5278
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
|
|
5275
5280
|
*/
|
|
5276
5281
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5277
5282
|
/**
|
|
5278
5283
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5280
5285
|
*/
|
|
5281
5286
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5282
5287
|
/**
|
|
5283
5288
|
* Disallow named usage of default import and export.
|
|
5284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
|
|
5285
5290
|
*/
|
|
5286
5291
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5287
5292
|
/**
|
|
5288
5293
|
* Disallow negated conditions.
|
|
5289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
|
|
5290
5295
|
*/
|
|
5291
5296
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5292
5297
|
/**
|
|
5293
5298
|
* Disallow negated expression in equality check.
|
|
5294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5295
5300
|
*/
|
|
5296
5301
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5297
5302
|
/**
|
|
5298
5303
|
* Disallow nested ternary expressions.
|
|
5299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
|
|
5300
5305
|
*/
|
|
5301
5306
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5302
5307
|
/**
|
|
5303
5308
|
* Disallow `new Array()`.
|
|
5304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
|
|
5305
5310
|
*/
|
|
5306
5311
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5307
5312
|
/**
|
|
5308
5313
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
|
|
5310
5315
|
*/
|
|
5311
5316
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5312
5317
|
/**
|
|
5313
5318
|
* Disallow the use of the `null` literal.
|
|
5314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
|
|
5315
5320
|
*/
|
|
5316
5321
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5317
5322
|
/**
|
|
5318
5323
|
* Disallow the use of objects as default parameters.
|
|
5319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5320
5325
|
*/
|
|
5321
5326
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5322
5327
|
/**
|
|
5323
5328
|
* Disallow `process.exit()`.
|
|
5324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
|
|
5325
5330
|
*/
|
|
5326
5331
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5327
5332
|
/**
|
|
5328
5333
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5330
5335
|
*/
|
|
5331
5336
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5332
5337
|
/**
|
|
5333
5338
|
* Disallow classes that only have static members.
|
|
5334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
|
|
5335
5340
|
*/
|
|
5336
5341
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5337
5342
|
/**
|
|
5338
5343
|
* Disallow `then` property.
|
|
5339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
|
|
5340
5345
|
*/
|
|
5341
5346
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5342
5347
|
/**
|
|
5343
5348
|
* Disallow assigning `this` to a variable.
|
|
5344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
|
|
5345
5350
|
*/
|
|
5346
5351
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5347
5352
|
/**
|
|
5348
5353
|
* Disallow comparing `undefined` using `typeof`.
|
|
5349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
|
|
5350
5355
|
*/
|
|
5351
5356
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5352
5357
|
/**
|
|
5353
5358
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5355
5360
|
*/
|
|
5356
5361
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5357
5362
|
/**
|
|
5358
5363
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5360
5365
|
*/
|
|
5361
5366
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5362
5367
|
/**
|
|
5363
5368
|
* Disallow awaiting non-promise values.
|
|
5364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
|
|
5365
5370
|
*/
|
|
5366
5371
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5367
5372
|
/**
|
|
5368
5373
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5370
5375
|
*/
|
|
5371
5376
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5372
5377
|
/**
|
|
5373
5378
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5375
5380
|
*/
|
|
5376
5381
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5377
5382
|
/**
|
|
5378
5383
|
* Disallow unreadable array destructuring.
|
|
5379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5380
5385
|
*/
|
|
5381
5386
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5382
5387
|
/**
|
|
5383
5388
|
* Disallow unreadable IIFEs.
|
|
5384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
|
|
5385
5390
|
*/
|
|
5386
5391
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5387
5392
|
/**
|
|
5388
5393
|
* Disallow unused object properties.
|
|
5389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
|
|
5390
5395
|
*/
|
|
5391
5396
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5397
|
+
/**
|
|
5398
|
+
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5400
|
+
*/
|
|
5401
|
+
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5392
5402
|
/**
|
|
5393
5403
|
* Disallow useless fallback when spreading in object literals.
|
|
5394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5395
5405
|
*/
|
|
5396
5406
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5397
5407
|
/**
|
|
5398
5408
|
* Disallow useless array length check.
|
|
5399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
|
|
5400
5410
|
*/
|
|
5401
5411
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5402
5412
|
/**
|
|
5403
5413
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5405
5415
|
*/
|
|
5406
5416
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5407
5417
|
/**
|
|
5408
5418
|
* Disallow unnecessary spread.
|
|
5409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
|
|
5410
5420
|
*/
|
|
5411
5421
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5412
5422
|
/**
|
|
5413
5423
|
* Disallow useless case in switch statements.
|
|
5414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
|
|
5415
5425
|
*/
|
|
5416
5426
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5417
5427
|
/**
|
|
5418
5428
|
* Disallow useless `undefined`.
|
|
5419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
|
|
5420
5430
|
*/
|
|
5421
5431
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5422
5432
|
/**
|
|
5423
5433
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
|
|
5425
5435
|
*/
|
|
5426
5436
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5427
5437
|
/**
|
|
5428
5438
|
* Enforce proper case for numeric literals.
|
|
5429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
|
|
5430
5440
|
*/
|
|
5431
5441
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5432
5442
|
/**
|
|
5433
5443
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
|
|
5435
5445
|
*/
|
|
5436
5446
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5437
5447
|
/**
|
|
5438
5448
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
|
|
5440
5450
|
*/
|
|
5441
5451
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5442
5452
|
/**
|
|
5443
5453
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
|
|
5445
5455
|
*/
|
|
5446
5456
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5447
5457
|
/**
|
|
5448
5458
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
|
|
5450
5460
|
*/
|
|
5451
5461
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5452
5462
|
/**
|
|
5453
5463
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
|
|
5455
5465
|
*/
|
|
5456
5466
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5457
5467
|
/**
|
|
5458
5468
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
|
|
5460
5470
|
*/
|
|
5461
5471
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5462
5472
|
/**
|
|
5463
5473
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
|
|
5465
5475
|
*/
|
|
5466
5476
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5467
5477
|
/**
|
|
5468
5478
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
|
|
5470
5480
|
*/
|
|
5471
5481
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5472
5482
|
/**
|
|
5473
5483
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5475
5485
|
*/
|
|
5476
5486
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5487
|
+
/**
|
|
5488
|
+
* Prefer class field declarations over `this` assignments in constructors.
|
|
5489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
|
|
5490
|
+
*/
|
|
5491
|
+
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5477
5492
|
/**
|
|
5478
5493
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
|
|
5480
5495
|
*/
|
|
5481
5496
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5482
5497
|
/**
|
|
5483
5498
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
|
|
5485
5500
|
*/
|
|
5486
5501
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5487
5502
|
/**
|
|
5488
5503
|
* Prefer default parameters over reassignment.
|
|
5489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
|
|
5490
5505
|
*/
|
|
5491
5506
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5492
5507
|
/**
|
|
5493
5508
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
|
|
5495
5510
|
*/
|
|
5496
5511
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5497
5512
|
/**
|
|
5498
5513
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5500
5515
|
*/
|
|
5501
5516
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5502
5517
|
/**
|
|
5503
5518
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5505
5520
|
*/
|
|
5506
5521
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5507
5522
|
/**
|
|
5508
5523
|
* Prefer `.textContent` over `.innerText`.
|
|
5509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5510
5525
|
*/
|
|
5511
5526
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5512
5527
|
/**
|
|
5513
5528
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
|
|
5515
5530
|
*/
|
|
5516
5531
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5517
5532
|
/**
|
|
5518
5533
|
* Prefer `export…from` when re-exporting.
|
|
5519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
|
|
5520
5535
|
*/
|
|
5521
5536
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5522
5537
|
/**
|
|
5523
5538
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
|
|
5525
5540
|
*/
|
|
5526
5541
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5527
5542
|
/**
|
|
5528
5543
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5530
5545
|
*/
|
|
5531
5546
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5532
5547
|
/**
|
|
5533
5548
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
|
|
5535
5550
|
*/
|
|
5536
5551
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5537
5552
|
/**
|
|
5538
5553
|
* Prefer reading a JSON file as a buffer.
|
|
5539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5540
5555
|
*/
|
|
5541
5556
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5542
5557
|
/**
|
|
5543
5558
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5545
5560
|
*/
|
|
5546
5561
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5547
5562
|
/**
|
|
5548
5563
|
* Prefer using a logical operator over a ternary.
|
|
5549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5550
5565
|
*/
|
|
5551
5566
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5552
5567
|
/**
|
|
5553
5568
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
|
|
5555
5570
|
*/
|
|
5556
5571
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5557
5572
|
/**
|
|
5558
5573
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
|
|
5560
5575
|
*/
|
|
5561
5576
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5562
5577
|
/**
|
|
5563
5578
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5565
5580
|
*/
|
|
5566
5581
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5567
5582
|
/**
|
|
5568
5583
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5570
5585
|
*/
|
|
5571
5586
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5572
5587
|
/**
|
|
5573
5588
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
|
|
5575
5590
|
*/
|
|
5576
5591
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5577
5592
|
/**
|
|
5578
5593
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5580
5595
|
*/
|
|
5581
5596
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5582
5597
|
/**
|
|
5583
5598
|
* Prefer negative index over `.length - index` when possible.
|
|
5584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
|
|
5585
5600
|
*/
|
|
5586
5601
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5587
5602
|
/**
|
|
5588
5603
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
|
|
5590
5605
|
*/
|
|
5591
5606
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5592
5607
|
/**
|
|
5593
5608
|
* Prefer `Number` static properties over global ones.
|
|
5594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
|
|
5595
5610
|
*/
|
|
5596
5611
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5597
5612
|
/**
|
|
5598
5613
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
|
|
5600
5615
|
*/
|
|
5601
5616
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5602
5617
|
/**
|
|
5603
5618
|
* Prefer omitting the `catch` binding parameter.
|
|
5604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5605
5620
|
*/
|
|
5606
5621
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5607
5622
|
/**
|
|
5608
5623
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
|
|
5610
5625
|
*/
|
|
5611
5626
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5612
5627
|
/**
|
|
5613
5628
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
|
|
5615
5630
|
*/
|
|
5616
5631
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5617
5632
|
/**
|
|
5618
5633
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
|
|
5620
5635
|
*/
|
|
5621
5636
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5622
5637
|
/**
|
|
5623
5638
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
|
|
5625
5640
|
*/
|
|
5626
5641
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5627
5642
|
/**
|
|
5628
5643
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
|
|
5630
5645
|
*/
|
|
5631
5646
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5632
5647
|
/**
|
|
5633
5648
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
|
|
5635
5650
|
*/
|
|
5636
5651
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5637
5652
|
/**
|
|
5638
5653
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
|
|
5640
5655
|
*/
|
|
5641
5656
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5642
5657
|
/**
|
|
5643
5658
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
|
|
5645
5660
|
*/
|
|
5646
5661
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5647
5662
|
/**
|
|
5648
5663
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
|
|
5650
5665
|
*/
|
|
5651
5666
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5652
5667
|
/**
|
|
5653
5668
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
|
|
5655
5670
|
*/
|
|
5656
5671
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5657
5672
|
/**
|
|
5658
5673
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
|
|
5660
5675
|
*/
|
|
5661
5676
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5662
5677
|
/**
|
|
5663
5678
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5665
5680
|
*/
|
|
5666
5681
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5667
5682
|
/**
|
|
5668
5683
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5670
5685
|
*/
|
|
5671
5686
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5672
5687
|
/**
|
|
5673
5688
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
|
|
5675
5690
|
*/
|
|
5676
5691
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5677
5692
|
/**
|
|
5678
5693
|
* Prefer `switch` over multiple `else-if`.
|
|
5679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
|
|
5680
5695
|
*/
|
|
5681
5696
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5682
5697
|
/**
|
|
5683
5698
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
|
|
5685
5700
|
*/
|
|
5686
5701
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5687
5702
|
/**
|
|
5688
5703
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
|
|
5690
5705
|
*/
|
|
5691
5706
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5692
5707
|
/**
|
|
5693
5708
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
|
|
5695
5710
|
*/
|
|
5696
5711
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5697
5712
|
/**
|
|
5698
5713
|
* Prevent abbreviations.
|
|
5699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
|
|
5700
5715
|
*/
|
|
5701
5716
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5702
5717
|
/**
|
|
5703
5718
|
* Enforce consistent relative URL style.
|
|
5704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
|
|
5705
5720
|
*/
|
|
5706
5721
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5707
5722
|
/**
|
|
5708
5723
|
* Enforce using the separator argument with `Array#join()`.
|
|
5709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
|
|
5710
5725
|
*/
|
|
5711
5726
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5727
|
+
/**
|
|
5728
|
+
* Require non-empty specifier list in import and export statements.
|
|
5729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
|
|
5730
|
+
*/
|
|
5731
|
+
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5712
5732
|
/**
|
|
5713
5733
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5715
5735
|
*/
|
|
5716
5736
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5717
5737
|
/**
|
|
5718
5738
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
|
|
5720
5740
|
*/
|
|
5721
5741
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5722
5742
|
/**
|
|
5723
5743
|
* Enforce better string content.
|
|
5724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
|
|
5725
5745
|
*/
|
|
5726
5746
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5727
5747
|
/**
|
|
5728
5748
|
* Enforce consistent brace style for `case` clauses.
|
|
5729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
|
|
5730
5750
|
*/
|
|
5731
5751
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5732
5752
|
/**
|
|
5733
5753
|
* Fix whitespace-insensitive template indentation.
|
|
5734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
|
|
5735
5755
|
*/
|
|
5736
5756
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5737
5757
|
/**
|
|
5738
5758
|
* Enforce consistent case for text encoding identifiers.
|
|
5739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5740
5760
|
*/
|
|
5741
5761
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
|
|
5742
5762
|
/**
|
|
5743
5763
|
* Require `new` when creating an error.
|
|
5744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
|
|
5745
5765
|
*/
|
|
5746
5766
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5747
5767
|
/**
|
|
@@ -7159,6 +7179,7 @@ type AccessorPairs = [] | [{
|
|
|
7159
7179
|
getWithoutSet?: boolean;
|
|
7160
7180
|
setWithoutGet?: boolean;
|
|
7161
7181
|
enforceForClassMembers?: boolean;
|
|
7182
|
+
enforceForTSTypes?: boolean;
|
|
7162
7183
|
}];
|
|
7163
7184
|
// ----- array-bracket-newline -----
|
|
7164
7185
|
type ArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
@@ -7385,7 +7406,9 @@ type GetterReturn = [] | [{
|
|
|
7385
7406
|
allowImplicit?: boolean;
|
|
7386
7407
|
}];
|
|
7387
7408
|
// ----- grouped-accessor-pairs -----
|
|
7388
|
-
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")]
|
|
7409
|
+
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")] | [("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
|
|
7410
|
+
enforceForTSTypes?: boolean;
|
|
7411
|
+
}];
|
|
7389
7412
|
// ----- handle-callback-err -----
|
|
7390
7413
|
type HandleCallbackErr = [] | [string];
|
|
7391
7414
|
// ----- id-blacklist -----
|
|
@@ -9309,6 +9332,7 @@ type NoUnusedVars = [] | [(("all" | "local") | {
|
|
|
9309
9332
|
caughtErrorsIgnorePattern?: string;
|
|
9310
9333
|
destructuredArrayIgnorePattern?: string;
|
|
9311
9334
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
9335
|
+
ignoreUsingDeclarations?: boolean;
|
|
9312
9336
|
reportUsedIgnorePattern?: boolean;
|
|
9313
9337
|
})];
|
|
9314
9338
|
// ----- no-use-before-define -----
|
|
@@ -12732,11 +12756,12 @@ type StylisticPaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
|
|
|
12732
12756
|
}];
|
|
12733
12757
|
// ----- stylistic/padding-line-between-statements -----
|
|
12734
12758
|
type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
|
|
12735
|
-
type
|
|
12759
|
+
type _StylisticPaddingLineBetweenStatementsStatementOption = (_StylisticPaddingLineBetweenStatementsStatementType | [_StylisticPaddingLineBetweenStatementsStatementType, ...(_StylisticPaddingLineBetweenStatementsStatementType)[]]);
|
|
12760
|
+
type _StylisticPaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "return" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using");
|
|
12736
12761
|
type StylisticPaddingLineBetweenStatements = {
|
|
12737
12762
|
blankLine: _StylisticPaddingLineBetweenStatementsPaddingType;
|
|
12738
|
-
prev:
|
|
12739
|
-
next:
|
|
12763
|
+
prev: _StylisticPaddingLineBetweenStatementsStatementOption;
|
|
12764
|
+
next: _StylisticPaddingLineBetweenStatementsStatementOption;
|
|
12740
12765
|
}[];
|
|
12741
12766
|
// ----- stylistic/quote-props -----
|
|
12742
12767
|
type StylisticQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
@@ -12891,6 +12916,7 @@ type TailwindcssBetterEnforceConsistentClassOrder = [] | [{
|
|
|
12891
12916
|
})[]] | string)[];
|
|
12892
12917
|
entryPoint?: string;
|
|
12893
12918
|
tailwindConfig?: string;
|
|
12919
|
+
tsconfig?: string;
|
|
12894
12920
|
order?: ("asc" | "desc" | "official" | "improved");
|
|
12895
12921
|
}];
|
|
12896
12922
|
// ----- tailwindcss-better/enforce-consistent-important-position -----
|
|
@@ -12933,6 +12959,7 @@ type TailwindcssBetterEnforceConsistentImportantPosition = [] | [{
|
|
|
12933
12959
|
})[]] | string)[];
|
|
12934
12960
|
entryPoint?: string;
|
|
12935
12961
|
tailwindConfig?: string;
|
|
12962
|
+
tsconfig?: string;
|
|
12936
12963
|
position?: ("legacy" | "recommended");
|
|
12937
12964
|
}];
|
|
12938
12965
|
// ----- tailwindcss-better/enforce-consistent-line-wrapping -----
|
|
@@ -12975,6 +13002,7 @@ type TailwindcssBetterEnforceConsistentLineWrapping = [] | [{
|
|
|
12975
13002
|
})[]] | string)[];
|
|
12976
13003
|
entryPoint?: string;
|
|
12977
13004
|
tailwindConfig?: string;
|
|
13005
|
+
tsconfig?: string;
|
|
12978
13006
|
classesPerLine?: number;
|
|
12979
13007
|
group?: ("emptyLine" | "never" | "newLine");
|
|
12980
13008
|
indent?: ("tab" | number);
|
|
@@ -13020,7 +13048,7 @@ type TailwindcssBetterEnforceConsistentVariableSyntax = [] | [{
|
|
|
13020
13048
|
match?: "objectValues";
|
|
13021
13049
|
pathPattern?: string;
|
|
13022
13050
|
})[]] | string)[];
|
|
13023
|
-
syntax?: ("arbitrary" | "parentheses");
|
|
13051
|
+
syntax?: ("arbitrary" | "parentheses" | "shorthand" | "variable");
|
|
13024
13052
|
}];
|
|
13025
13053
|
// ----- tailwindcss-better/enforce-shorthand-classes -----
|
|
13026
13054
|
type TailwindcssBetterEnforceShorthandClasses = [] | [{
|
|
@@ -13062,6 +13090,7 @@ type TailwindcssBetterEnforceShorthandClasses = [] | [{
|
|
|
13062
13090
|
})[]] | string)[];
|
|
13063
13091
|
entryPoint?: string;
|
|
13064
13092
|
tailwindConfig?: string;
|
|
13093
|
+
tsconfig?: string;
|
|
13065
13094
|
}];
|
|
13066
13095
|
// ----- tailwindcss-better/multiline -----
|
|
13067
13096
|
type TailwindcssBetterMultiline = [] | [{
|
|
@@ -13103,6 +13132,7 @@ type TailwindcssBetterMultiline = [] | [{
|
|
|
13103
13132
|
})[]] | string)[];
|
|
13104
13133
|
entryPoint?: string;
|
|
13105
13134
|
tailwindConfig?: string;
|
|
13135
|
+
tsconfig?: string;
|
|
13106
13136
|
classesPerLine?: number;
|
|
13107
13137
|
group?: ("emptyLine" | "never" | "newLine");
|
|
13108
13138
|
indent?: ("tab" | number);
|
|
@@ -13150,6 +13180,7 @@ type TailwindcssBetterNoConflictingClasses = [] | [{
|
|
|
13150
13180
|
})[]] | string)[];
|
|
13151
13181
|
entryPoint?: string;
|
|
13152
13182
|
tailwindConfig?: string;
|
|
13183
|
+
tsconfig?: string;
|
|
13153
13184
|
}];
|
|
13154
13185
|
// ----- tailwindcss-better/no-deprecated-classes -----
|
|
13155
13186
|
type TailwindcssBetterNoDeprecatedClasses = [] | [{
|
|
@@ -13191,6 +13222,7 @@ type TailwindcssBetterNoDeprecatedClasses = [] | [{
|
|
|
13191
13222
|
})[]] | string)[];
|
|
13192
13223
|
entryPoint?: string;
|
|
13193
13224
|
tailwindConfig?: string;
|
|
13225
|
+
tsconfig?: string;
|
|
13194
13226
|
}];
|
|
13195
13227
|
// ----- tailwindcss-better/no-duplicate-classes -----
|
|
13196
13228
|
type TailwindcssBetterNoDuplicateClasses = [] | [{
|
|
@@ -13355,6 +13387,7 @@ type TailwindcssBetterNoUnregisteredClasses = [] | [{
|
|
|
13355
13387
|
})[]] | string)[];
|
|
13356
13388
|
entryPoint?: string;
|
|
13357
13389
|
tailwindConfig?: string;
|
|
13390
|
+
tsconfig?: string;
|
|
13358
13391
|
detectComponentClasses?: boolean;
|
|
13359
13392
|
ignore?: string[];
|
|
13360
13393
|
}];
|
|
@@ -13398,6 +13431,7 @@ type TailwindcssBetterSortClasses = [] | [{
|
|
|
13398
13431
|
})[]] | string)[];
|
|
13399
13432
|
entryPoint?: string;
|
|
13400
13433
|
tailwindConfig?: string;
|
|
13434
|
+
tsconfig?: string;
|
|
13401
13435
|
order?: ("asc" | "desc" | "official" | "improved");
|
|
13402
13436
|
}];
|
|
13403
13437
|
// ----- template-curly-spacing -----
|
|
@@ -14311,7 +14345,6 @@ type TsEslintPreferDestructuring = [] | [({
|
|
|
14311
14345
|
}), {
|
|
14312
14346
|
enforceForDeclarationWithTypeAnnotation?: boolean;
|
|
14313
14347
|
enforceForRenamedProperties?: boolean;
|
|
14314
|
-
[k: string]: unknown | undefined;
|
|
14315
14348
|
}];
|
|
14316
14349
|
// ----- ts-eslint/prefer-literal-enum-member -----
|
|
14317
14350
|
type TsEslintPreferLiteralEnumMember = [] | [{
|
|
@@ -14329,7 +14362,6 @@ type TsEslintPreferNullishCoalescing = [] | [{
|
|
|
14329
14362
|
boolean?: boolean;
|
|
14330
14363
|
number?: boolean;
|
|
14331
14364
|
string?: boolean;
|
|
14332
|
-
[k: string]: unknown | undefined;
|
|
14333
14365
|
} | true);
|
|
14334
14366
|
ignoreTernaryTests?: boolean;
|
|
14335
14367
|
}];
|
|
@@ -14538,6 +14570,10 @@ interface _UnicornImportStyle_BooleanObject {
|
|
|
14538
14570
|
type UnicornNoArrayReduce = [] | [{
|
|
14539
14571
|
allowSimpleOperations?: boolean;
|
|
14540
14572
|
}];
|
|
14573
|
+
// ----- unicorn/no-array-reverse -----
|
|
14574
|
+
type UnicornNoArrayReverse = [] | [{
|
|
14575
|
+
allowExpressionStatement?: boolean;
|
|
14576
|
+
}];
|
|
14541
14577
|
// ----- unicorn/no-instanceof-builtins -----
|
|
14542
14578
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
14543
14579
|
useErrorIsError?: boolean;
|