@ncontiero/eslint-config 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +183 -142
- package/dist/index.js +1 -1
- package/package.json +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -2126,7 +2126,7 @@ interface RuleOptions {
|
|
|
2126
2126
|
* Disallow empty definitions
|
|
2127
2127
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md
|
|
2128
2128
|
*/
|
|
2129
|
-
'markdown/no-empty-definitions'?: Linter.RuleEntry<
|
|
2129
|
+
'markdown/no-empty-definitions'?: Linter.RuleEntry<MarkdownNoEmptyDefinitions>
|
|
2130
2130
|
/**
|
|
2131
2131
|
* Disallow empty images
|
|
2132
2132
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md
|
|
@@ -2172,6 +2172,11 @@ interface RuleOptions {
|
|
|
2172
2172
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
|
|
2173
2173
|
*/
|
|
2174
2174
|
'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]>
|
|
2175
|
+
/**
|
|
2176
|
+
* Disallow unused definitions
|
|
2177
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
|
|
2178
|
+
*/
|
|
2179
|
+
'markdown/no-unused-definitions'?: Linter.RuleEntry<MarkdownNoUnusedDefinitions>
|
|
2175
2180
|
/**
|
|
2176
2181
|
* Require alternative text for images
|
|
2177
2182
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md
|
|
@@ -2181,7 +2186,7 @@ interface RuleOptions {
|
|
|
2181
2186
|
* Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row
|
|
2182
2187
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/table-column-count.md
|
|
2183
2188
|
*/
|
|
2184
|
-
'markdown/table-column-count'?: Linter.RuleEntry<
|
|
2189
|
+
'markdown/table-column-count'?: Linter.RuleEntry<MarkdownTableColumnCount>
|
|
2185
2190
|
/**
|
|
2186
2191
|
* Enforce a maximum number of classes per file
|
|
2187
2192
|
* @see https://eslint.org/docs/latest/rules/max-classes-per-file
|
|
@@ -2296,7 +2301,7 @@ interface RuleOptions {
|
|
|
2296
2301
|
*/
|
|
2297
2302
|
'nextjs/no-assign-module-variable'?: Linter.RuleEntry<[]>
|
|
2298
2303
|
/**
|
|
2299
|
-
* Prevent
|
|
2304
|
+
* Prevent Client Components from being async functions.
|
|
2300
2305
|
* @see https://nextjs.org/docs/messages/no-async-client-component
|
|
2301
2306
|
*/
|
|
2302
2307
|
'nextjs/no-async-client-component'?: Linter.RuleEntry<[]>
|
|
@@ -2448,7 +2453,7 @@ interface RuleOptions {
|
|
|
2448
2453
|
*/
|
|
2449
2454
|
'no-console'?: Linter.RuleEntry<NoConsole>
|
|
2450
2455
|
/**
|
|
2451
|
-
* Disallow reassigning `const` variables
|
|
2456
|
+
* Disallow reassigning `const`, `using`, and `await using` variables
|
|
2452
2457
|
* @see https://eslint.org/docs/latest/rules/no-const-assign
|
|
2453
2458
|
*/
|
|
2454
2459
|
'no-const-assign'?: Linter.RuleEntry<[]>
|
|
@@ -4946,670 +4951,690 @@ interface RuleOptions {
|
|
|
4946
4951
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
4947
4952
|
/**
|
|
4948
4953
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
4949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
|
|
4950
4955
|
*/
|
|
4951
4956
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
4952
4957
|
/**
|
|
4953
4958
|
* Enforce a specific parameter name in catch clauses.
|
|
4954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
|
|
4955
4960
|
*/
|
|
4956
4961
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
4957
4962
|
/**
|
|
4958
4963
|
* Enforce consistent assertion style with `node:assert`.
|
|
4959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
|
|
4960
4965
|
*/
|
|
4961
4966
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
4962
4967
|
/**
|
|
4963
4968
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
4964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
|
|
4965
4970
|
*/
|
|
4966
4971
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
4967
4972
|
/**
|
|
4968
4973
|
* Use destructured variables over properties.
|
|
4969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
|
|
4970
4975
|
*/
|
|
4971
4976
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
4972
4977
|
/**
|
|
4973
4978
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4975
4980
|
*/
|
|
4976
4981
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
4977
4982
|
/**
|
|
4978
4983
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
|
|
4980
4985
|
*/
|
|
4981
4986
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
4982
4987
|
/**
|
|
4983
4988
|
* Move function definitions to the highest possible scope.
|
|
4984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
|
|
4985
4990
|
*/
|
|
4986
4991
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
4987
4992
|
/**
|
|
4988
4993
|
* Enforce correct `Error` subclassing.
|
|
4989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
|
|
4990
4995
|
*/
|
|
4991
4996
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
4992
4997
|
/**
|
|
4993
4998
|
* Enforce no spaces between braces.
|
|
4994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
|
|
4995
5000
|
*/
|
|
4996
5001
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
4997
5002
|
/**
|
|
4998
5003
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
|
|
5000
5005
|
*/
|
|
5001
5006
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
5002
5007
|
/**
|
|
5003
5008
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
|
|
5005
5010
|
*/
|
|
5006
5011
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
5007
5012
|
/**
|
|
5008
5013
|
* Add expiration conditions to TODO comments.
|
|
5009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
|
|
5010
5015
|
*/
|
|
5011
5016
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
5012
5017
|
/**
|
|
5013
5018
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
|
|
5015
5020
|
*/
|
|
5016
5021
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
5017
5022
|
/**
|
|
5018
5023
|
* Enforce a case style for filenames.
|
|
5019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
|
|
5020
5025
|
*/
|
|
5021
5026
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
5022
5027
|
/**
|
|
5023
5028
|
* Enforce specific import styles per module.
|
|
5024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
|
|
5025
5030
|
*/
|
|
5026
5031
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
5027
5032
|
/**
|
|
5028
5033
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
|
|
5030
5035
|
*/
|
|
5031
5036
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
5032
5037
|
/**
|
|
5033
5038
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5035
5040
|
*/
|
|
5036
5041
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
5037
5042
|
/**
|
|
5038
5043
|
* Disallow recursive access to `this` within getters and setters.
|
|
5039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
|
|
5040
5045
|
*/
|
|
5041
5046
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
5042
5047
|
/**
|
|
5043
5048
|
* Disallow anonymous functions and classes as the default export.
|
|
5044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
|
|
5045
5050
|
*/
|
|
5046
5051
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
5047
5052
|
/**
|
|
5048
5053
|
* Prevent passing a function reference directly to iterator methods.
|
|
5049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
|
|
5050
5055
|
*/
|
|
5051
5056
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
5052
5057
|
/**
|
|
5053
5058
|
* Prefer `for…of` over the `forEach` method.
|
|
5054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
|
|
5055
5060
|
*/
|
|
5056
5061
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
5057
5062
|
/**
|
|
5058
5063
|
* Disallow using the `this` argument in array methods.
|
|
5059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
|
|
5060
5065
|
*/
|
|
5061
5066
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
5062
5067
|
/**
|
|
5063
5068
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
5065
5070
|
* @deprecated
|
|
5066
5071
|
*/
|
|
5067
5072
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
5068
5073
|
/**
|
|
5069
5074
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
|
|
5071
5076
|
*/
|
|
5072
5077
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
5078
|
+
/**
|
|
5079
|
+
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
|
|
5081
|
+
*/
|
|
5082
|
+
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
5073
5083
|
/**
|
|
5074
5084
|
* Disallow member access from await expression.
|
|
5075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
|
|
5076
5086
|
*/
|
|
5077
5087
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
5078
5088
|
/**
|
|
5079
5089
|
* Disallow using `await` in `Promise` method parameters.
|
|
5080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5081
5091
|
*/
|
|
5082
5092
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
5083
5093
|
/**
|
|
5084
5094
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
|
|
5086
5096
|
*/
|
|
5087
5097
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
5088
5098
|
/**
|
|
5089
5099
|
* Do not use `document.cookie` directly.
|
|
5090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
|
|
5091
5101
|
*/
|
|
5092
5102
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
5093
5103
|
/**
|
|
5094
5104
|
* Disallow empty files.
|
|
5095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
|
|
5096
5106
|
*/
|
|
5097
5107
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
5098
5108
|
/**
|
|
5099
5109
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
|
|
5101
5111
|
*/
|
|
5102
5112
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
5103
5113
|
/**
|
|
5104
5114
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
|
|
5106
5116
|
*/
|
|
5107
5117
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
5108
5118
|
/**
|
|
5109
5119
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5111
5121
|
* @deprecated
|
|
5112
5122
|
*/
|
|
5113
5123
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
5114
5124
|
/**
|
|
5115
5125
|
* Disallow `instanceof` with built-in objects
|
|
5116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
|
|
5117
5127
|
*/
|
|
5118
5128
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
5119
5129
|
/**
|
|
5120
5130
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5122
5132
|
*/
|
|
5123
5133
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
5124
5134
|
/**
|
|
5125
5135
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5127
5137
|
*/
|
|
5128
5138
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
5129
5139
|
/**
|
|
5130
5140
|
* Disallow identifiers starting with `new` or `class`.
|
|
5131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
|
|
5132
5142
|
*/
|
|
5133
5143
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
5134
5144
|
/**
|
|
5135
5145
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5137
5147
|
* @deprecated
|
|
5138
5148
|
*/
|
|
5139
5149
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
5140
5150
|
/**
|
|
5141
5151
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
|
|
5143
5153
|
*/
|
|
5144
5154
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
5145
5155
|
/**
|
|
5146
5156
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5148
5158
|
*/
|
|
5149
5159
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
5150
5160
|
/**
|
|
5151
5161
|
* Disallow named usage of default import and export.
|
|
5152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
|
|
5153
5163
|
*/
|
|
5154
5164
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
5155
5165
|
/**
|
|
5156
5166
|
* Disallow negated conditions.
|
|
5157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
|
|
5158
5168
|
*/
|
|
5159
5169
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
5160
5170
|
/**
|
|
5161
5171
|
* Disallow negated expression in equality check.
|
|
5162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5163
5173
|
*/
|
|
5164
5174
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
5165
5175
|
/**
|
|
5166
5176
|
* Disallow nested ternary expressions.
|
|
5167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
|
|
5168
5178
|
*/
|
|
5169
5179
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
5170
5180
|
/**
|
|
5171
5181
|
* Disallow `new Array()`.
|
|
5172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
|
|
5173
5183
|
*/
|
|
5174
5184
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
5175
5185
|
/**
|
|
5176
5186
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
|
|
5178
5188
|
*/
|
|
5179
5189
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
5180
5190
|
/**
|
|
5181
5191
|
* Disallow the use of the `null` literal.
|
|
5182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
|
|
5183
5193
|
*/
|
|
5184
5194
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
5185
5195
|
/**
|
|
5186
5196
|
* Disallow the use of objects as default parameters.
|
|
5187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5188
5198
|
*/
|
|
5189
5199
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
5190
5200
|
/**
|
|
5191
5201
|
* Disallow `process.exit()`.
|
|
5192
|
-
* @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-process-exit.md
|
|
5193
5203
|
*/
|
|
5194
5204
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
5195
5205
|
/**
|
|
5196
5206
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5198
5208
|
*/
|
|
5199
5209
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
5200
5210
|
/**
|
|
5201
5211
|
* Disallow classes that only have static members.
|
|
5202
|
-
* @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-static-only-class.md
|
|
5203
5213
|
*/
|
|
5204
5214
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
5205
5215
|
/**
|
|
5206
5216
|
* Disallow `then` property.
|
|
5207
|
-
* @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-thenable.md
|
|
5208
5218
|
*/
|
|
5209
5219
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
5210
5220
|
/**
|
|
5211
5221
|
* Disallow assigning `this` to a variable.
|
|
5212
|
-
* @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-this-assignment.md
|
|
5213
5223
|
*/
|
|
5214
5224
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
5215
5225
|
/**
|
|
5216
5226
|
* Disallow comparing `undefined` using `typeof`.
|
|
5217
|
-
* @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-typeof-undefined.md
|
|
5218
5228
|
*/
|
|
5219
5229
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
5220
5230
|
/**
|
|
5221
5231
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5222
|
-
* @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-unnecessary-array-flat-depth.md
|
|
5223
5233
|
*/
|
|
5224
5234
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
5225
5235
|
/**
|
|
5226
5236
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5227
|
-
* @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-unnecessary-array-splice-count.md
|
|
5228
5238
|
*/
|
|
5229
5239
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
5230
5240
|
/**
|
|
5231
5241
|
* Disallow awaiting non-promise values.
|
|
5232
|
-
* @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-unnecessary-await.md
|
|
5233
5243
|
*/
|
|
5234
5244
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
5235
5245
|
/**
|
|
5236
5246
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5238
5248
|
*/
|
|
5239
5249
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
5240
5250
|
/**
|
|
5241
5251
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5243
5253
|
*/
|
|
5244
5254
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
5245
5255
|
/**
|
|
5246
5256
|
* Disallow unreadable array destructuring.
|
|
5247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5248
5258
|
*/
|
|
5249
5259
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
5250
5260
|
/**
|
|
5251
5261
|
* Disallow unreadable IIFEs.
|
|
5252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
|
|
5253
5263
|
*/
|
|
5254
5264
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
5255
5265
|
/**
|
|
5256
5266
|
* Disallow unused object properties.
|
|
5257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
|
|
5258
5268
|
*/
|
|
5259
5269
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
5270
|
+
/**
|
|
5271
|
+
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5273
|
+
*/
|
|
5274
|
+
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
5260
5275
|
/**
|
|
5261
5276
|
* Disallow useless fallback when spreading in object literals.
|
|
5262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5263
5278
|
*/
|
|
5264
5279
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
5265
5280
|
/**
|
|
5266
5281
|
* Disallow useless array length check.
|
|
5267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
|
|
5268
5283
|
*/
|
|
5269
5284
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
5270
5285
|
/**
|
|
5271
5286
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5273
5288
|
*/
|
|
5274
5289
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
5275
5290
|
/**
|
|
5276
5291
|
* Disallow unnecessary spread.
|
|
5277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
|
|
5278
5293
|
*/
|
|
5279
5294
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
5280
5295
|
/**
|
|
5281
5296
|
* Disallow useless case in switch statements.
|
|
5282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
|
|
5283
5298
|
*/
|
|
5284
5299
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
5285
5300
|
/**
|
|
5286
5301
|
* Disallow useless `undefined`.
|
|
5287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
|
|
5288
5303
|
*/
|
|
5289
5304
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
5290
5305
|
/**
|
|
5291
5306
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
|
|
5293
5308
|
*/
|
|
5294
5309
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
5295
5310
|
/**
|
|
5296
5311
|
* Enforce proper case for numeric literals.
|
|
5297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
|
|
5298
5313
|
*/
|
|
5299
5314
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
5300
5315
|
/**
|
|
5301
5316
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
|
|
5303
5318
|
*/
|
|
5304
5319
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
5305
5320
|
/**
|
|
5306
5321
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
|
|
5308
5323
|
*/
|
|
5309
5324
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
5310
5325
|
/**
|
|
5311
5326
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
|
|
5313
5328
|
*/
|
|
5314
5329
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
5315
5330
|
/**
|
|
5316
5331
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
|
|
5318
5333
|
*/
|
|
5319
5334
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
5320
5335
|
/**
|
|
5321
5336
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
|
|
5323
5338
|
*/
|
|
5324
5339
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
5325
5340
|
/**
|
|
5326
5341
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
|
|
5328
5343
|
*/
|
|
5329
5344
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
5330
5345
|
/**
|
|
5331
5346
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
|
|
5333
5348
|
*/
|
|
5334
5349
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
5335
5350
|
/**
|
|
5336
5351
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
|
|
5338
5353
|
*/
|
|
5339
5354
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
5340
5355
|
/**
|
|
5341
5356
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5343
5358
|
*/
|
|
5344
5359
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
5360
|
+
/**
|
|
5361
|
+
* Prefer class field declarations over `this` assignments in constructors.
|
|
5362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
|
|
5363
|
+
*/
|
|
5364
|
+
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
5345
5365
|
/**
|
|
5346
5366
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
|
|
5348
5368
|
*/
|
|
5349
5369
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
5350
5370
|
/**
|
|
5351
5371
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
|
|
5353
5373
|
*/
|
|
5354
5374
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
5355
5375
|
/**
|
|
5356
5376
|
* Prefer default parameters over reassignment.
|
|
5357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
|
|
5358
5378
|
*/
|
|
5359
5379
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
5360
5380
|
/**
|
|
5361
5381
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
|
|
5363
5383
|
*/
|
|
5364
5384
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
5365
5385
|
/**
|
|
5366
5386
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5368
5388
|
*/
|
|
5369
5389
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
5370
5390
|
/**
|
|
5371
5391
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5373
5393
|
*/
|
|
5374
5394
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
5375
5395
|
/**
|
|
5376
5396
|
* Prefer `.textContent` over `.innerText`.
|
|
5377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5378
5398
|
*/
|
|
5379
5399
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
5380
5400
|
/**
|
|
5381
5401
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
|
|
5383
5403
|
*/
|
|
5384
5404
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
5385
5405
|
/**
|
|
5386
5406
|
* Prefer `export…from` when re-exporting.
|
|
5387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
|
|
5388
5408
|
*/
|
|
5389
5409
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
5390
5410
|
/**
|
|
5391
5411
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
|
|
5393
5413
|
*/
|
|
5394
5414
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
5395
5415
|
/**
|
|
5396
5416
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5398
5418
|
*/
|
|
5399
5419
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
5400
5420
|
/**
|
|
5401
5421
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
|
|
5403
5423
|
*/
|
|
5404
5424
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
5405
5425
|
/**
|
|
5406
5426
|
* Prefer reading a JSON file as a buffer.
|
|
5407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5408
5428
|
*/
|
|
5409
5429
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
5410
5430
|
/**
|
|
5411
5431
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5413
5433
|
*/
|
|
5414
5434
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
5415
5435
|
/**
|
|
5416
5436
|
* Prefer using a logical operator over a ternary.
|
|
5417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5418
5438
|
*/
|
|
5419
5439
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
5420
5440
|
/**
|
|
5421
5441
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
|
|
5423
5443
|
*/
|
|
5424
5444
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
5425
5445
|
/**
|
|
5426
5446
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
|
|
5428
5448
|
*/
|
|
5429
5449
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
5430
5450
|
/**
|
|
5431
5451
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5433
5453
|
*/
|
|
5434
5454
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
5435
5455
|
/**
|
|
5436
5456
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5438
5458
|
*/
|
|
5439
5459
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
5440
5460
|
/**
|
|
5441
5461
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
|
|
5443
5463
|
*/
|
|
5444
5464
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
5445
5465
|
/**
|
|
5446
5466
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5448
5468
|
*/
|
|
5449
5469
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
5450
5470
|
/**
|
|
5451
5471
|
* Prefer negative index over `.length - index` when possible.
|
|
5452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
|
|
5453
5473
|
*/
|
|
5454
5474
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
5455
5475
|
/**
|
|
5456
5476
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
|
|
5458
5478
|
*/
|
|
5459
5479
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
5460
5480
|
/**
|
|
5461
5481
|
* Prefer `Number` static properties over global ones.
|
|
5462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
|
|
5463
5483
|
*/
|
|
5464
5484
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
5465
5485
|
/**
|
|
5466
5486
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
|
|
5468
5488
|
*/
|
|
5469
5489
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
5470
5490
|
/**
|
|
5471
5491
|
* Prefer omitting the `catch` binding parameter.
|
|
5472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5473
5493
|
*/
|
|
5474
5494
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
5475
5495
|
/**
|
|
5476
5496
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
|
|
5478
5498
|
*/
|
|
5479
5499
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
5480
5500
|
/**
|
|
5481
5501
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
|
|
5483
5503
|
*/
|
|
5484
5504
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
5485
5505
|
/**
|
|
5486
5506
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
|
|
5488
5508
|
*/
|
|
5489
5509
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
5490
5510
|
/**
|
|
5491
5511
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
|
|
5493
5513
|
*/
|
|
5494
5514
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
5495
5515
|
/**
|
|
5496
5516
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
|
|
5498
5518
|
*/
|
|
5499
5519
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
5500
5520
|
/**
|
|
5501
5521
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
|
|
5503
5523
|
*/
|
|
5504
5524
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
5505
5525
|
/**
|
|
5506
5526
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
|
|
5508
5528
|
*/
|
|
5509
5529
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
5510
5530
|
/**
|
|
5511
5531
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
|
|
5513
5533
|
*/
|
|
5514
5534
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
5515
5535
|
/**
|
|
5516
5536
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
|
|
5518
5538
|
*/
|
|
5519
5539
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
5520
5540
|
/**
|
|
5521
5541
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
|
|
5523
5543
|
*/
|
|
5524
5544
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
5525
5545
|
/**
|
|
5526
5546
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
|
|
5528
5548
|
*/
|
|
5529
5549
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
5530
5550
|
/**
|
|
5531
5551
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5533
5553
|
*/
|
|
5534
5554
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
5535
5555
|
/**
|
|
5536
5556
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5538
5558
|
*/
|
|
5539
5559
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
5540
5560
|
/**
|
|
5541
5561
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
|
|
5543
5563
|
*/
|
|
5544
5564
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
5545
5565
|
/**
|
|
5546
5566
|
* Prefer `switch` over multiple `else-if`.
|
|
5547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
|
|
5548
5568
|
*/
|
|
5549
5569
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
5550
5570
|
/**
|
|
5551
5571
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
|
|
5553
5573
|
*/
|
|
5554
5574
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
5555
5575
|
/**
|
|
5556
5576
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
|
|
5558
5578
|
*/
|
|
5559
5579
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
5560
5580
|
/**
|
|
5561
5581
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
|
|
5563
5583
|
*/
|
|
5564
5584
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
5565
5585
|
/**
|
|
5566
5586
|
* Prevent abbreviations.
|
|
5567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
|
|
5568
5588
|
*/
|
|
5569
5589
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
5570
5590
|
/**
|
|
5571
5591
|
* Enforce consistent relative URL style.
|
|
5572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
|
|
5573
5593
|
*/
|
|
5574
5594
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
5575
5595
|
/**
|
|
5576
5596
|
* Enforce using the separator argument with `Array#join()`.
|
|
5577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
|
|
5578
5598
|
*/
|
|
5579
5599
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
5600
|
+
/**
|
|
5601
|
+
* Require non-empty specifier list in import and export statements.
|
|
5602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
|
|
5603
|
+
*/
|
|
5604
|
+
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
5580
5605
|
/**
|
|
5581
5606
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5583
5608
|
*/
|
|
5584
5609
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
5585
5610
|
/**
|
|
5586
5611
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
|
|
5588
5613
|
*/
|
|
5589
5614
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
5590
5615
|
/**
|
|
5591
5616
|
* Enforce better string content.
|
|
5592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
|
|
5593
5618
|
*/
|
|
5594
5619
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
5595
5620
|
/**
|
|
5596
5621
|
* Enforce consistent brace style for `case` clauses.
|
|
5597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
|
|
5598
5623
|
*/
|
|
5599
5624
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
5600
5625
|
/**
|
|
5601
5626
|
* Fix whitespace-insensitive template indentation.
|
|
5602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
|
|
5603
5628
|
*/
|
|
5604
5629
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
5605
5630
|
/**
|
|
5606
5631
|
* Enforce consistent case for text encoding identifiers.
|
|
5607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5608
5633
|
*/
|
|
5609
5634
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
5610
5635
|
/**
|
|
5611
5636
|
* Require `new` when creating an error.
|
|
5612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
|
|
5613
5638
|
*/
|
|
5614
5639
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
5615
5640
|
/**
|
|
@@ -6735,7 +6760,6 @@ type TypescriptEslintPreferDestructuring = []|[({
|
|
|
6735
6760
|
enforceForDeclarationWithTypeAnnotation?: boolean
|
|
6736
6761
|
|
|
6737
6762
|
enforceForRenamedProperties?: boolean
|
|
6738
|
-
[k: string]: unknown | undefined
|
|
6739
6763
|
}]
|
|
6740
6764
|
// ----- @typescript-eslint/prefer-literal-enum-member -----
|
|
6741
6765
|
type TypescriptEslintPreferLiteralEnumMember = []|[{
|
|
@@ -6764,7 +6788,6 @@ type TypescriptEslintPreferNullishCoalescing = []|[{
|
|
|
6764
6788
|
number?: boolean
|
|
6765
6789
|
|
|
6766
6790
|
string?: boolean
|
|
6767
|
-
[k: string]: unknown | undefined
|
|
6768
6791
|
} | true)
|
|
6769
6792
|
|
|
6770
6793
|
ignoreTernaryTests?: boolean
|
|
@@ -7724,8 +7747,8 @@ type JsdocMatchName = []|[{
|
|
|
7724
7747
|
context?: string
|
|
7725
7748
|
disallowName?: string
|
|
7726
7749
|
message?: string
|
|
7750
|
+
replacement?: string
|
|
7727
7751
|
tags?: string[]
|
|
7728
|
-
[k: string]: unknown | undefined
|
|
7729
7752
|
}[]
|
|
7730
7753
|
}]
|
|
7731
7754
|
// ----- jsdoc/multiline-blocks -----
|
|
@@ -7737,6 +7760,7 @@ type JsdocMultilineBlocks = []|[{
|
|
|
7737
7760
|
noMultilineBlocks?: boolean
|
|
7738
7761
|
noSingleLineBlocks?: boolean
|
|
7739
7762
|
noZeroLineText?: boolean
|
|
7763
|
+
requireSingleLineUnderCount?: number
|
|
7740
7764
|
singleLineTags?: string[]
|
|
7741
7765
|
}]
|
|
7742
7766
|
// ----- jsdoc/no-bad-blocks -----
|
|
@@ -7798,7 +7822,6 @@ type JsdocRequireAsteriskPrefix = []|[("always" | "never" | "any")]|[("always" |
|
|
|
7798
7822
|
always?: string[]
|
|
7799
7823
|
any?: string[]
|
|
7800
7824
|
never?: string[]
|
|
7801
|
-
[k: string]: unknown | undefined
|
|
7802
7825
|
}
|
|
7803
7826
|
}]
|
|
7804
7827
|
// ----- jsdoc/require-description -----
|
|
@@ -8008,7 +8031,6 @@ type JsdocSortTags = []|[{
|
|
|
8008
8031
|
reportTagGroupSpacing?: boolean
|
|
8009
8032
|
tagSequence?: {
|
|
8010
8033
|
tags?: string[]
|
|
8011
|
-
[k: string]: unknown | undefined
|
|
8012
8034
|
}[]
|
|
8013
8035
|
}]
|
|
8014
8036
|
// ----- jsdoc/tag-lines -----
|
|
@@ -8915,6 +8937,12 @@ type MarkdownNoDuplicateDefinitions = []|[{
|
|
|
8915
8937
|
type MarkdownNoDuplicateHeadings = []|[{
|
|
8916
8938
|
checkSiblingsOnly?: boolean
|
|
8917
8939
|
}]
|
|
8940
|
+
// ----- markdown/no-empty-definitions -----
|
|
8941
|
+
type MarkdownNoEmptyDefinitions = []|[{
|
|
8942
|
+
allowDefinitions?: string[]
|
|
8943
|
+
allowFootnoteDefinitions?: string[]
|
|
8944
|
+
checkFootnoteDefinitions?: boolean
|
|
8945
|
+
}]
|
|
8918
8946
|
// ----- markdown/no-html -----
|
|
8919
8947
|
type MarkdownNoHtml = []|[{
|
|
8920
8948
|
allowed?: string[]
|
|
@@ -8928,6 +8956,15 @@ type MarkdownNoMissingLinkFragments = []|[{
|
|
|
8928
8956
|
type MarkdownNoMultipleH1 = []|[{
|
|
8929
8957
|
frontmatterTitle?: string
|
|
8930
8958
|
}]
|
|
8959
|
+
// ----- markdown/no-unused-definitions -----
|
|
8960
|
+
type MarkdownNoUnusedDefinitions = []|[{
|
|
8961
|
+
allowDefinitions?: string[]
|
|
8962
|
+
allowFootnoteDefinitions?: string[]
|
|
8963
|
+
}]
|
|
8964
|
+
// ----- markdown/table-column-count -----
|
|
8965
|
+
type MarkdownTableColumnCount = []|[{
|
|
8966
|
+
checkMissingCells?: boolean
|
|
8967
|
+
}]
|
|
8931
8968
|
// ----- max-classes-per-file -----
|
|
8932
8969
|
type MaxClassesPerFile = []|[(number | {
|
|
8933
8970
|
ignoreExpressions?: boolean
|
|
@@ -13782,6 +13819,10 @@ interface _UnicornImportStyle_BooleanObject {
|
|
|
13782
13819
|
type UnicornNoArrayReduce = []|[{
|
|
13783
13820
|
allowSimpleOperations?: boolean
|
|
13784
13821
|
}]
|
|
13822
|
+
// ----- unicorn/no-array-reverse -----
|
|
13823
|
+
type UnicornNoArrayReverse = []|[{
|
|
13824
|
+
allowExpressionStatement?: boolean
|
|
13825
|
+
}]
|
|
13785
13826
|
// ----- unicorn/no-instanceof-builtins -----
|
|
13786
13827
|
type UnicornNoInstanceofBuiltins = []|[{
|
|
13787
13828
|
useErrorIsError?: boolean
|