@coderwyd/eslint-config 4.4.1 → 4.6.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/cli.d.ts +1 -1
- package/dist/cli.js +17 -16
- package/dist/index.d.ts +217 -145
- package/dist/index.js +9 -6
- package/package.json +29 -29
package/dist/index.d.ts
CHANGED
|
@@ -1158,7 +1158,7 @@ interface RuleOptions {
|
|
|
1158
1158
|
*/
|
|
1159
1159
|
'no-console'?: Linter.RuleEntry<NoConsole>;
|
|
1160
1160
|
/**
|
|
1161
|
-
* Disallow reassigning `const` variables
|
|
1161
|
+
* Disallow reassigning `const`, `using`, and `await using` variables
|
|
1162
1162
|
* @see https://eslint.org/docs/latest/rules/no-const-assign
|
|
1163
1163
|
*/
|
|
1164
1164
|
'no-const-assign'?: Linter.RuleEntry<[]>;
|
|
@@ -3676,6 +3676,11 @@ interface RuleOptions {
|
|
|
3676
3676
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-style-directive/
|
|
3677
3677
|
*/
|
|
3678
3678
|
'svelte/prefer-style-directive'?: Linter.RuleEntry<[]>;
|
|
3679
|
+
/**
|
|
3680
|
+
* disallow using mutable instances of built-in classes where a reactive alternative is provided by svelte/reactivity
|
|
3681
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-svelte-reactivity/
|
|
3682
|
+
*/
|
|
3683
|
+
'svelte/prefer-svelte-reactivity'?: Linter.RuleEntry<[]>;
|
|
3679
3684
|
/**
|
|
3680
3685
|
* Prefer using writable $derived instead of $state and $effect
|
|
3681
3686
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-writable-derived/
|
|
@@ -4005,6 +4010,16 @@ interface RuleOptions {
|
|
|
4005
4010
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
|
|
4006
4011
|
*/
|
|
4007
4012
|
'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
4013
|
+
/**
|
|
4014
|
+
* enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
|
|
4015
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
|
|
4016
|
+
*/
|
|
4017
|
+
'test/prefer-called-once'?: Linter.RuleEntry<[]>;
|
|
4018
|
+
/**
|
|
4019
|
+
* enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`
|
|
4020
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-times.md
|
|
4021
|
+
*/
|
|
4022
|
+
'test/prefer-called-times'?: Linter.RuleEntry<[]>;
|
|
4008
4023
|
/**
|
|
4009
4024
|
* enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
|
|
4010
4025
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
|
|
@@ -4170,6 +4185,11 @@ interface RuleOptions {
|
|
|
4170
4185
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
|
|
4171
4186
|
*/
|
|
4172
4187
|
'test/valid-title'?: Linter.RuleEntry<TestValidTitle>;
|
|
4188
|
+
/**
|
|
4189
|
+
* disallow `.todo` usage
|
|
4190
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/warn-todo.md
|
|
4191
|
+
*/
|
|
4192
|
+
'test/warn-todo'?: Linter.RuleEntry<[]>;
|
|
4173
4193
|
/**
|
|
4174
4194
|
* Require that function overload signatures be consecutive
|
|
4175
4195
|
* @see https://typescript-eslint.io/rules/adjacent-overload-signatures
|
|
@@ -4839,670 +4859,690 @@ interface RuleOptions {
|
|
|
4839
4859
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
4840
4860
|
/**
|
|
4841
4861
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
4842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
|
|
4843
4863
|
*/
|
|
4844
4864
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
4845
4865
|
/**
|
|
4846
4866
|
* Enforce a specific parameter name in catch clauses.
|
|
4847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
|
|
4848
4868
|
*/
|
|
4849
4869
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
4850
4870
|
/**
|
|
4851
4871
|
* Enforce consistent assertion style with `node:assert`.
|
|
4852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
|
|
4853
4873
|
*/
|
|
4854
4874
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
4855
4875
|
/**
|
|
4856
4876
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
4857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
|
|
4858
4878
|
*/
|
|
4859
4879
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
4860
4880
|
/**
|
|
4861
4881
|
* Use destructured variables over properties.
|
|
4862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
|
|
4863
4883
|
*/
|
|
4864
4884
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
4865
4885
|
/**
|
|
4866
4886
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4868
4888
|
*/
|
|
4869
4889
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
4870
4890
|
/**
|
|
4871
4891
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
|
|
4873
4893
|
*/
|
|
4874
4894
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
4875
4895
|
/**
|
|
4876
4896
|
* Move function definitions to the highest possible scope.
|
|
4877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
|
|
4878
4898
|
*/
|
|
4879
4899
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
4880
4900
|
/**
|
|
4881
4901
|
* Enforce correct `Error` subclassing.
|
|
4882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
|
|
4883
4903
|
*/
|
|
4884
4904
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
4885
4905
|
/**
|
|
4886
4906
|
* Enforce no spaces between braces.
|
|
4887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
|
|
4888
4908
|
*/
|
|
4889
4909
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
4890
4910
|
/**
|
|
4891
4911
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
|
|
4893
4913
|
*/
|
|
4894
4914
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
4895
4915
|
/**
|
|
4896
4916
|
* Require escape sequences to use uppercase or lowercase values.
|
|
4897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
|
|
4898
4918
|
*/
|
|
4899
4919
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
4900
4920
|
/**
|
|
4901
4921
|
* Add expiration conditions to TODO comments.
|
|
4902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
|
|
4903
4923
|
*/
|
|
4904
4924
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
4905
4925
|
/**
|
|
4906
4926
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
|
|
4908
4928
|
*/
|
|
4909
4929
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
4910
4930
|
/**
|
|
4911
4931
|
* Enforce a case style for filenames.
|
|
4912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
|
|
4913
4933
|
*/
|
|
4914
4934
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
4915
4935
|
/**
|
|
4916
4936
|
* Enforce specific import styles per module.
|
|
4917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
|
|
4918
4938
|
*/
|
|
4919
4939
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
4920
4940
|
/**
|
|
4921
4941
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
4922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
|
|
4923
4943
|
*/
|
|
4924
4944
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
4925
4945
|
/**
|
|
4926
4946
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4928
4948
|
*/
|
|
4929
4949
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
4930
4950
|
/**
|
|
4931
4951
|
* Disallow recursive access to `this` within getters and setters.
|
|
4932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
|
|
4933
4953
|
*/
|
|
4934
4954
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
4935
4955
|
/**
|
|
4936
4956
|
* Disallow anonymous functions and classes as the default export.
|
|
4937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
|
|
4938
4958
|
*/
|
|
4939
4959
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
4940
4960
|
/**
|
|
4941
4961
|
* Prevent passing a function reference directly to iterator methods.
|
|
4942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
|
|
4943
4963
|
*/
|
|
4944
4964
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
4945
4965
|
/**
|
|
4946
4966
|
* Prefer `for…of` over the `forEach` method.
|
|
4947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
|
|
4948
4968
|
*/
|
|
4949
4969
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
4950
4970
|
/**
|
|
4951
4971
|
* Disallow using the `this` argument in array methods.
|
|
4952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
|
|
4953
4973
|
*/
|
|
4954
4974
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
4955
4975
|
/**
|
|
4956
4976
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
4957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
4958
4978
|
* @deprecated
|
|
4959
4979
|
*/
|
|
4960
4980
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
4961
4981
|
/**
|
|
4962
4982
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
4963
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4983
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
|
|
4964
4984
|
*/
|
|
4965
4985
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
4986
|
+
/**
|
|
4987
|
+
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
4988
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
|
|
4989
|
+
*/
|
|
4990
|
+
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
4966
4991
|
/**
|
|
4967
4992
|
* Disallow member access from await expression.
|
|
4968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
|
|
4969
4994
|
*/
|
|
4970
4995
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
4971
4996
|
/**
|
|
4972
4997
|
* Disallow using `await` in `Promise` method parameters.
|
|
4973
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4998
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
|
|
4974
4999
|
*/
|
|
4975
5000
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
4976
5001
|
/**
|
|
4977
5002
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
4978
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
|
|
4979
5004
|
*/
|
|
4980
5005
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
4981
5006
|
/**
|
|
4982
5007
|
* Do not use `document.cookie` directly.
|
|
4983
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
|
|
4984
5009
|
*/
|
|
4985
5010
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
4986
5011
|
/**
|
|
4987
5012
|
* Disallow empty files.
|
|
4988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
|
|
4989
5014
|
*/
|
|
4990
5015
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
4991
5016
|
/**
|
|
4992
5017
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
4993
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
|
|
4994
5019
|
*/
|
|
4995
5020
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
4996
5021
|
/**
|
|
4997
5022
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
4998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
|
|
4999
5024
|
*/
|
|
5000
5025
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5001
5026
|
/**
|
|
5002
5027
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5003
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5004
5029
|
* @deprecated
|
|
5005
5030
|
*/
|
|
5006
5031
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5007
5032
|
/**
|
|
5008
5033
|
* Disallow `instanceof` with built-in objects
|
|
5009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
|
|
5010
5035
|
*/
|
|
5011
5036
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5012
5037
|
/**
|
|
5013
5038
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5014
|
-
* @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-invalid-fetch-options.md
|
|
5015
5040
|
*/
|
|
5016
5041
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5017
5042
|
/**
|
|
5018
5043
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5019
|
-
* @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-invalid-remove-event-listener.md
|
|
5020
5045
|
*/
|
|
5021
5046
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5022
5047
|
/**
|
|
5023
5048
|
* Disallow identifiers starting with `new` or `class`.
|
|
5024
|
-
* @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-keyword-prefix.md
|
|
5025
5050
|
*/
|
|
5026
5051
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5027
5052
|
/**
|
|
5028
5053
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5030
5055
|
* @deprecated
|
|
5031
5056
|
*/
|
|
5032
5057
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5033
5058
|
/**
|
|
5034
5059
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
|
|
5036
5061
|
*/
|
|
5037
5062
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5038
5063
|
/**
|
|
5039
5064
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5041
5066
|
*/
|
|
5042
5067
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5043
5068
|
/**
|
|
5044
5069
|
* Disallow named usage of default import and export.
|
|
5045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
|
|
5046
5071
|
*/
|
|
5047
5072
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5048
5073
|
/**
|
|
5049
5074
|
* Disallow negated conditions.
|
|
5050
|
-
* @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-negated-condition.md
|
|
5051
5076
|
*/
|
|
5052
5077
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5053
5078
|
/**
|
|
5054
5079
|
* Disallow negated expression in equality check.
|
|
5055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5056
5081
|
*/
|
|
5057
5082
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5058
5083
|
/**
|
|
5059
5084
|
* Disallow nested ternary expressions.
|
|
5060
|
-
* @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-nested-ternary.md
|
|
5061
5086
|
*/
|
|
5062
5087
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5063
5088
|
/**
|
|
5064
5089
|
* Disallow `new Array()`.
|
|
5065
|
-
* @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-new-array.md
|
|
5066
5091
|
*/
|
|
5067
5092
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5068
5093
|
/**
|
|
5069
5094
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5070
|
-
* @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-new-buffer.md
|
|
5071
5096
|
*/
|
|
5072
5097
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5073
5098
|
/**
|
|
5074
5099
|
* Disallow the use of the `null` literal.
|
|
5075
|
-
* @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-null.md
|
|
5076
5101
|
*/
|
|
5077
5102
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5078
5103
|
/**
|
|
5079
5104
|
* Disallow the use of objects as default parameters.
|
|
5080
|
-
* @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-object-as-default-parameter.md
|
|
5081
5106
|
*/
|
|
5082
5107
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5083
5108
|
/**
|
|
5084
5109
|
* Disallow `process.exit()`.
|
|
5085
|
-
* @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-process-exit.md
|
|
5086
5111
|
*/
|
|
5087
5112
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5088
5113
|
/**
|
|
5089
5114
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5090
|
-
* @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-single-promise-in-promise-methods.md
|
|
5091
5116
|
*/
|
|
5092
5117
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5093
5118
|
/**
|
|
5094
5119
|
* Disallow classes that only have static members.
|
|
5095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
|
|
5096
5121
|
*/
|
|
5097
5122
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5098
5123
|
/**
|
|
5099
5124
|
* Disallow `then` property.
|
|
5100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
|
|
5101
5126
|
*/
|
|
5102
5127
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5103
5128
|
/**
|
|
5104
5129
|
* Disallow assigning `this` to a variable.
|
|
5105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
|
|
5106
5131
|
*/
|
|
5107
5132
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5108
5133
|
/**
|
|
5109
5134
|
* Disallow comparing `undefined` using `typeof`.
|
|
5110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
|
|
5111
5136
|
*/
|
|
5112
5137
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5113
5138
|
/**
|
|
5114
5139
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5116
5141
|
*/
|
|
5117
5142
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5118
5143
|
/**
|
|
5119
5144
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5121
5146
|
*/
|
|
5122
5147
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5123
5148
|
/**
|
|
5124
5149
|
* Disallow awaiting non-promise values.
|
|
5125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
|
|
5126
5151
|
*/
|
|
5127
5152
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5128
5153
|
/**
|
|
5129
5154
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5131
5156
|
*/
|
|
5132
5157
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5133
5158
|
/**
|
|
5134
5159
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5136
5161
|
*/
|
|
5137
5162
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5138
5163
|
/**
|
|
5139
5164
|
* Disallow unreadable array destructuring.
|
|
5140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5141
5166
|
*/
|
|
5142
5167
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5143
5168
|
/**
|
|
5144
5169
|
* Disallow unreadable IIFEs.
|
|
5145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
|
|
5146
5171
|
*/
|
|
5147
5172
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5148
5173
|
/**
|
|
5149
5174
|
* Disallow unused object properties.
|
|
5150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
|
|
5151
5176
|
*/
|
|
5152
5177
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5178
|
+
/**
|
|
5179
|
+
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5181
|
+
*/
|
|
5182
|
+
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5153
5183
|
/**
|
|
5154
5184
|
* Disallow useless fallback when spreading in object literals.
|
|
5155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5156
5186
|
*/
|
|
5157
5187
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5158
5188
|
/**
|
|
5159
5189
|
* Disallow useless array length check.
|
|
5160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
|
|
5161
5191
|
*/
|
|
5162
5192
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5163
5193
|
/**
|
|
5164
5194
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5166
5196
|
*/
|
|
5167
5197
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5168
5198
|
/**
|
|
5169
5199
|
* Disallow unnecessary spread.
|
|
5170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
|
|
5171
5201
|
*/
|
|
5172
5202
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5173
5203
|
/**
|
|
5174
5204
|
* Disallow useless case in switch statements.
|
|
5175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
|
|
5176
5206
|
*/
|
|
5177
5207
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5178
5208
|
/**
|
|
5179
5209
|
* Disallow useless `undefined`.
|
|
5180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
|
|
5181
5211
|
*/
|
|
5182
5212
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5183
5213
|
/**
|
|
5184
5214
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
|
|
5186
5216
|
*/
|
|
5187
5217
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5188
5218
|
/**
|
|
5189
5219
|
* Enforce proper case for numeric literals.
|
|
5190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
|
|
5191
5221
|
*/
|
|
5192
5222
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5193
5223
|
/**
|
|
5194
5224
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
|
|
5196
5226
|
*/
|
|
5197
5227
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5198
5228
|
/**
|
|
5199
5229
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
|
|
5201
5231
|
*/
|
|
5202
5232
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5203
5233
|
/**
|
|
5204
5234
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
|
|
5206
5236
|
*/
|
|
5207
5237
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5208
5238
|
/**
|
|
5209
5239
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
|
|
5211
5241
|
*/
|
|
5212
5242
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5213
5243
|
/**
|
|
5214
5244
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
|
|
5216
5246
|
*/
|
|
5217
5247
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5218
5248
|
/**
|
|
5219
5249
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
|
|
5221
5251
|
*/
|
|
5222
5252
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5223
5253
|
/**
|
|
5224
5254
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
|
|
5226
5256
|
*/
|
|
5227
5257
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5228
5258
|
/**
|
|
5229
5259
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
|
|
5231
5261
|
*/
|
|
5232
5262
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5233
5263
|
/**
|
|
5234
5264
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5236
5266
|
*/
|
|
5237
5267
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5268
|
+
/**
|
|
5269
|
+
* Prefer class field declarations over `this` assignments in constructors.
|
|
5270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
|
|
5271
|
+
*/
|
|
5272
|
+
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5238
5273
|
/**
|
|
5239
5274
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
|
|
5241
5276
|
*/
|
|
5242
5277
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5243
5278
|
/**
|
|
5244
5279
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
|
|
5246
5281
|
*/
|
|
5247
5282
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5248
5283
|
/**
|
|
5249
5284
|
* Prefer default parameters over reassignment.
|
|
5250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
|
|
5251
5286
|
*/
|
|
5252
5287
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5253
5288
|
/**
|
|
5254
5289
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
|
|
5256
5291
|
*/
|
|
5257
5292
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5258
5293
|
/**
|
|
5259
5294
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5261
5296
|
*/
|
|
5262
5297
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5263
5298
|
/**
|
|
5264
5299
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5266
5301
|
*/
|
|
5267
5302
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5268
5303
|
/**
|
|
5269
5304
|
* Prefer `.textContent` over `.innerText`.
|
|
5270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5271
5306
|
*/
|
|
5272
5307
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5273
5308
|
/**
|
|
5274
5309
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
|
|
5276
5311
|
*/
|
|
5277
5312
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5278
5313
|
/**
|
|
5279
5314
|
* Prefer `export…from` when re-exporting.
|
|
5280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
|
|
5281
5316
|
*/
|
|
5282
5317
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5283
5318
|
/**
|
|
5284
5319
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
|
|
5286
5321
|
*/
|
|
5287
5322
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5288
5323
|
/**
|
|
5289
5324
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5291
5326
|
*/
|
|
5292
5327
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5293
5328
|
/**
|
|
5294
5329
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
|
|
5296
5331
|
*/
|
|
5297
5332
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5298
5333
|
/**
|
|
5299
5334
|
* Prefer reading a JSON file as a buffer.
|
|
5300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5301
5336
|
*/
|
|
5302
5337
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5303
5338
|
/**
|
|
5304
5339
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5306
5341
|
*/
|
|
5307
5342
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5308
5343
|
/**
|
|
5309
5344
|
* Prefer using a logical operator over a ternary.
|
|
5310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5311
5346
|
*/
|
|
5312
5347
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5313
5348
|
/**
|
|
5314
5349
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
|
|
5316
5351
|
*/
|
|
5317
5352
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5318
5353
|
/**
|
|
5319
5354
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
|
|
5321
5356
|
*/
|
|
5322
5357
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5323
5358
|
/**
|
|
5324
5359
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5326
5361
|
*/
|
|
5327
5362
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5328
5363
|
/**
|
|
5329
5364
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5331
5366
|
*/
|
|
5332
5367
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5333
5368
|
/**
|
|
5334
5369
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
|
|
5336
5371
|
*/
|
|
5337
5372
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5338
5373
|
/**
|
|
5339
5374
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5341
5376
|
*/
|
|
5342
5377
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5343
5378
|
/**
|
|
5344
5379
|
* Prefer negative index over `.length - index` when possible.
|
|
5345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
|
|
5346
5381
|
*/
|
|
5347
5382
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5348
5383
|
/**
|
|
5349
5384
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
|
|
5351
5386
|
*/
|
|
5352
5387
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5353
5388
|
/**
|
|
5354
5389
|
* Prefer `Number` static properties over global ones.
|
|
5355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
|
|
5356
5391
|
*/
|
|
5357
5392
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5358
5393
|
/**
|
|
5359
5394
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
|
|
5361
5396
|
*/
|
|
5362
5397
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5363
5398
|
/**
|
|
5364
5399
|
* Prefer omitting the `catch` binding parameter.
|
|
5365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5366
5401
|
*/
|
|
5367
5402
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5368
5403
|
/**
|
|
5369
5404
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
|
|
5371
5406
|
*/
|
|
5372
5407
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5373
5408
|
/**
|
|
5374
5409
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
|
|
5376
5411
|
*/
|
|
5377
5412
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5378
5413
|
/**
|
|
5379
5414
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
|
|
5381
5416
|
*/
|
|
5382
5417
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5383
5418
|
/**
|
|
5384
5419
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
|
|
5386
5421
|
*/
|
|
5387
5422
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5388
5423
|
/**
|
|
5389
5424
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
|
|
5391
5426
|
*/
|
|
5392
5427
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5393
5428
|
/**
|
|
5394
5429
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
|
|
5396
5431
|
*/
|
|
5397
5432
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5398
5433
|
/**
|
|
5399
5434
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
|
|
5401
5436
|
*/
|
|
5402
5437
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5403
5438
|
/**
|
|
5404
5439
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
|
|
5406
5441
|
*/
|
|
5407
5442
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5408
5443
|
/**
|
|
5409
5444
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
|
|
5411
5446
|
*/
|
|
5412
5447
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5413
5448
|
/**
|
|
5414
5449
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
|
|
5416
5451
|
*/
|
|
5417
5452
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5418
5453
|
/**
|
|
5419
5454
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
|
|
5421
5456
|
*/
|
|
5422
5457
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5423
5458
|
/**
|
|
5424
5459
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5426
5461
|
*/
|
|
5427
5462
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5428
5463
|
/**
|
|
5429
5464
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5431
5466
|
*/
|
|
5432
5467
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5433
5468
|
/**
|
|
5434
5469
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
|
|
5436
5471
|
*/
|
|
5437
5472
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5438
5473
|
/**
|
|
5439
5474
|
* Prefer `switch` over multiple `else-if`.
|
|
5440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
|
|
5441
5476
|
*/
|
|
5442
5477
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5443
5478
|
/**
|
|
5444
5479
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
|
|
5446
5481
|
*/
|
|
5447
5482
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5448
5483
|
/**
|
|
5449
5484
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
|
|
5451
5486
|
*/
|
|
5452
5487
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5453
5488
|
/**
|
|
5454
5489
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
|
|
5456
5491
|
*/
|
|
5457
5492
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5458
5493
|
/**
|
|
5459
5494
|
* Prevent abbreviations.
|
|
5460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
|
|
5461
5496
|
*/
|
|
5462
5497
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5463
5498
|
/**
|
|
5464
5499
|
* Enforce consistent relative URL style.
|
|
5465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
|
|
5466
5501
|
*/
|
|
5467
5502
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5468
5503
|
/**
|
|
5469
5504
|
* Enforce using the separator argument with `Array#join()`.
|
|
5470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
|
|
5471
5506
|
*/
|
|
5472
5507
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5508
|
+
/**
|
|
5509
|
+
* Require non-empty specifier list in import and export statements.
|
|
5510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
|
|
5511
|
+
*/
|
|
5512
|
+
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5473
5513
|
/**
|
|
5474
5514
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5476
5516
|
*/
|
|
5477
5517
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5478
5518
|
/**
|
|
5479
5519
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
|
|
5481
5521
|
*/
|
|
5482
5522
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5483
5523
|
/**
|
|
5484
5524
|
* Enforce better string content.
|
|
5485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
|
|
5486
5526
|
*/
|
|
5487
5527
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5488
5528
|
/**
|
|
5489
5529
|
* Enforce consistent brace style for `case` clauses.
|
|
5490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
|
|
5491
5531
|
*/
|
|
5492
5532
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5493
5533
|
/**
|
|
5494
5534
|
* Fix whitespace-insensitive template indentation.
|
|
5495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
|
|
5496
5536
|
*/
|
|
5497
5537
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5498
5538
|
/**
|
|
5499
5539
|
* Enforce consistent case for text encoding identifiers.
|
|
5500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5501
5541
|
*/
|
|
5502
5542
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
|
|
5503
5543
|
/**
|
|
5504
5544
|
* Require `new` when creating an error.
|
|
5505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
|
|
5506
5546
|
*/
|
|
5507
5547
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5508
5548
|
/**
|
|
@@ -5519,7 +5559,7 @@ interface RuleOptions {
|
|
|
5519
5559
|
* Order of UnoCSS utilities in class attribute
|
|
5520
5560
|
* @see https://unocss.dev/integrations/eslint#rules
|
|
5521
5561
|
*/
|
|
5522
|
-
'unocss/order'?: Linter.RuleEntry<
|
|
5562
|
+
'unocss/order'?: Linter.RuleEntry<UnocssOrder>;
|
|
5523
5563
|
/**
|
|
5524
5564
|
* Order of UnoCSS attributes
|
|
5525
5565
|
* @see https://unocss.dev/integrations/eslint#rules
|
|
@@ -6085,6 +6125,16 @@ interface RuleOptions {
|
|
|
6085
6125
|
* @see https://eslint.vuejs.org/rules/no-mutating-props.html
|
|
6086
6126
|
*/
|
|
6087
6127
|
'vue/no-mutating-props'?: Linter.RuleEntry<VueNoMutatingProps>;
|
|
6128
|
+
/**
|
|
6129
|
+
* Disallow negated conditions in `<template>`
|
|
6130
|
+
* @see https://eslint.vuejs.org/rules/no-negated-condition.html
|
|
6131
|
+
*/
|
|
6132
|
+
'vue/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6133
|
+
/**
|
|
6134
|
+
* disallow negated conditions in v-if/v-else
|
|
6135
|
+
* @see https://eslint.vuejs.org/rules/no-negated-v-if-condition.html
|
|
6136
|
+
*/
|
|
6137
|
+
'vue/no-negated-v-if-condition'?: Linter.RuleEntry<[]>;
|
|
6088
6138
|
/**
|
|
6089
6139
|
* disallow parsing errors in `<template>`
|
|
6090
6140
|
* @see https://eslint.vuejs.org/rules/no-parsing-error.html
|
|
@@ -6156,7 +6206,7 @@ interface RuleOptions {
|
|
|
6156
6206
|
*/
|
|
6157
6207
|
'vue/no-restricted-custom-event'?: Linter.RuleEntry<VueNoRestrictedCustomEvent>;
|
|
6158
6208
|
/**
|
|
6159
|
-
* disallow specific
|
|
6209
|
+
* disallow specific elements
|
|
6160
6210
|
* @see https://eslint.vuejs.org/rules/no-restricted-html-elements.html
|
|
6161
6211
|
*/
|
|
6162
6212
|
'vue/no-restricted-html-elements'?: Linter.RuleEntry<VueNoRestrictedHtmlElements>;
|
|
@@ -6810,6 +6860,7 @@ type AccessorPairs = [] | [{
|
|
|
6810
6860
|
getWithoutSet?: boolean;
|
|
6811
6861
|
setWithoutGet?: boolean;
|
|
6812
6862
|
enforceForClassMembers?: boolean;
|
|
6863
|
+
enforceForTSTypes?: boolean;
|
|
6813
6864
|
}];
|
|
6814
6865
|
// ----- antfu/consistent-chaining -----
|
|
6815
6866
|
type AntfuConsistentChaining = [] | [{
|
|
@@ -7045,7 +7096,9 @@ type GetterReturn = [] | [{
|
|
|
7045
7096
|
allowImplicit?: boolean;
|
|
7046
7097
|
}];
|
|
7047
7098
|
// ----- grouped-accessor-pairs -----
|
|
7048
|
-
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")]
|
|
7099
|
+
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")] | [("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
|
|
7100
|
+
enforceForTSTypes?: boolean;
|
|
7101
|
+
}];
|
|
7049
7102
|
// ----- handle-callback-err -----
|
|
7050
7103
|
type HandleCallbackErr = [] | [string];
|
|
7051
7104
|
// ----- id-blacklist -----
|
|
@@ -7299,8 +7352,8 @@ type JsdocMatchName = [] | [{
|
|
|
7299
7352
|
context?: string;
|
|
7300
7353
|
disallowName?: string;
|
|
7301
7354
|
message?: string;
|
|
7355
|
+
replacement?: string;
|
|
7302
7356
|
tags?: string[];
|
|
7303
|
-
[k: string]: unknown | undefined;
|
|
7304
7357
|
}[];
|
|
7305
7358
|
}];
|
|
7306
7359
|
// ----- jsdoc/multiline-blocks -----
|
|
@@ -7312,6 +7365,7 @@ type JsdocMultilineBlocks = [] | [{
|
|
|
7312
7365
|
noMultilineBlocks?: boolean;
|
|
7313
7366
|
noSingleLineBlocks?: boolean;
|
|
7314
7367
|
noZeroLineText?: boolean;
|
|
7368
|
+
requireSingleLineUnderCount?: number;
|
|
7315
7369
|
singleLineTags?: string[];
|
|
7316
7370
|
}];
|
|
7317
7371
|
// ----- jsdoc/no-bad-blocks -----
|
|
@@ -7373,7 +7427,6 @@ type JsdocRequireAsteriskPrefix = [] | [("always" | "never" | "any")] | [("alway
|
|
|
7373
7427
|
always?: string[];
|
|
7374
7428
|
any?: string[];
|
|
7375
7429
|
never?: string[];
|
|
7376
|
-
[k: string]: unknown | undefined;
|
|
7377
7430
|
};
|
|
7378
7431
|
}];
|
|
7379
7432
|
// ----- jsdoc/require-description -----
|
|
@@ -7583,7 +7636,6 @@ type JsdocSortTags = [] | [{
|
|
|
7583
7636
|
reportTagGroupSpacing?: boolean;
|
|
7584
7637
|
tagSequence?: {
|
|
7585
7638
|
tags?: string[];
|
|
7586
|
-
[k: string]: unknown | undefined;
|
|
7587
7639
|
}[];
|
|
7588
7640
|
}];
|
|
7589
7641
|
// ----- jsdoc/tag-lines -----
|
|
@@ -8423,6 +8475,7 @@ type NoConstantCondition = [] | [{
|
|
|
8423
8475
|
// ----- no-duplicate-imports -----
|
|
8424
8476
|
type NoDuplicateImports = [] | [{
|
|
8425
8477
|
includeExports?: boolean;
|
|
8478
|
+
allowSeparateTypeImports?: boolean;
|
|
8426
8479
|
}];
|
|
8427
8480
|
// ----- no-else-return -----
|
|
8428
8481
|
type NoElseReturn = [] | [{
|
|
@@ -8604,10 +8657,17 @@ type NoRestrictedExports = [] | [({
|
|
|
8604
8657
|
};
|
|
8605
8658
|
})];
|
|
8606
8659
|
// ----- no-restricted-globals -----
|
|
8607
|
-
type NoRestrictedGlobals = (string | {
|
|
8660
|
+
type NoRestrictedGlobals = ((string | {
|
|
8608
8661
|
name: string;
|
|
8609
8662
|
message?: string;
|
|
8610
|
-
})[]
|
|
8663
|
+
})[] | [] | [{
|
|
8664
|
+
globals: (string | {
|
|
8665
|
+
name: string;
|
|
8666
|
+
message?: string;
|
|
8667
|
+
})[];
|
|
8668
|
+
checkGlobalObject?: boolean;
|
|
8669
|
+
globalObjects?: string[];
|
|
8670
|
+
}]);
|
|
8611
8671
|
// ----- no-restricted-imports -----
|
|
8612
8672
|
type NoRestrictedImports = ((string | {
|
|
8613
8673
|
name: string;
|
|
@@ -8736,6 +8796,7 @@ type NoUnusedVars = [] | [(("all" | "local") | {
|
|
|
8736
8796
|
caughtErrorsIgnorePattern?: string;
|
|
8737
8797
|
destructuredArrayIgnorePattern?: string;
|
|
8738
8798
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
8799
|
+
ignoreUsingDeclarations?: boolean;
|
|
8739
8800
|
reportUsedIgnorePattern?: boolean;
|
|
8740
8801
|
})];
|
|
8741
8802
|
// ----- no-use-before-define -----
|
|
@@ -9101,6 +9162,8 @@ type OneVar = [] | [(("always" | "never" | "consecutive") | {
|
|
|
9101
9162
|
var?: ("always" | "never" | "consecutive");
|
|
9102
9163
|
let?: ("always" | "never" | "consecutive");
|
|
9103
9164
|
const?: ("always" | "never" | "consecutive");
|
|
9165
|
+
using?: ("always" | "never" | "consecutive");
|
|
9166
|
+
awaitUsing?: ("always" | "never" | "consecutive");
|
|
9104
9167
|
} | {
|
|
9105
9168
|
initialized?: ("always" | "never" | "consecutive");
|
|
9106
9169
|
uninitialized?: ("always" | "never" | "consecutive");
|
|
@@ -12013,6 +12076,7 @@ interface _TsNamingConvention_MatchRegexConfig {
|
|
|
12013
12076
|
}
|
|
12014
12077
|
// ----- ts/no-base-to-string -----
|
|
12015
12078
|
type TsNoBaseToString = [] | [{
|
|
12079
|
+
checkUnknown?: boolean;
|
|
12016
12080
|
ignoredTypeNames?: string[];
|
|
12017
12081
|
}];
|
|
12018
12082
|
// ----- ts/no-confusing-void-expression -----
|
|
@@ -12336,7 +12400,6 @@ type TsPreferDestructuring = [] | [({
|
|
|
12336
12400
|
}), {
|
|
12337
12401
|
enforceForDeclarationWithTypeAnnotation?: boolean;
|
|
12338
12402
|
enforceForRenamedProperties?: boolean;
|
|
12339
|
-
[k: string]: unknown | undefined;
|
|
12340
12403
|
}];
|
|
12341
12404
|
// ----- ts/prefer-literal-enum-member -----
|
|
12342
12405
|
type TsPreferLiteralEnumMember = [] | [{
|
|
@@ -12354,7 +12417,6 @@ type TsPreferNullishCoalescing = [] | [{
|
|
|
12354
12417
|
boolean?: boolean;
|
|
12355
12418
|
number?: boolean;
|
|
12356
12419
|
string?: boolean;
|
|
12357
|
-
[k: string]: unknown | undefined;
|
|
12358
12420
|
} | true);
|
|
12359
12421
|
ignoreTernaryTests?: boolean;
|
|
12360
12422
|
}];
|
|
@@ -12563,6 +12625,10 @@ interface _UnicornImportStyle_BooleanObject {
|
|
|
12563
12625
|
type UnicornNoArrayReduce = [] | [{
|
|
12564
12626
|
allowSimpleOperations?: boolean;
|
|
12565
12627
|
}];
|
|
12628
|
+
// ----- unicorn/no-array-reverse -----
|
|
12629
|
+
type UnicornNoArrayReverse = [] | [{
|
|
12630
|
+
allowExpressionStatement?: boolean;
|
|
12631
|
+
}];
|
|
12566
12632
|
// ----- unicorn/no-instanceof-builtins -----
|
|
12567
12633
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
12568
12634
|
useErrorIsError?: boolean;
|
|
@@ -12716,6 +12782,12 @@ type UnocssEnforceClassCompile = [] | [{
|
|
|
12716
12782
|
prefix?: string;
|
|
12717
12783
|
enableFix?: boolean;
|
|
12718
12784
|
}];
|
|
12785
|
+
// ----- unocss/order -----
|
|
12786
|
+
type UnocssOrder = [] | [{
|
|
12787
|
+
unoFunctions?: string[];
|
|
12788
|
+
unoVariables?: string[];
|
|
12789
|
+
[k: string]: unknown | undefined;
|
|
12790
|
+
}];
|
|
12719
12791
|
// ----- unused-imports/no-unused-imports -----
|
|
12720
12792
|
type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
12721
12793
|
args?: ("all" | "after-used" | "none");
|
|
@@ -13468,6 +13540,7 @@ type VueNoDeprecatedRouterLinkTagProp = [] | [{
|
|
|
13468
13540
|
// ----- vue/no-deprecated-slot-attribute -----
|
|
13469
13541
|
type VueNoDeprecatedSlotAttribute = [] | [{
|
|
13470
13542
|
ignore?: string[];
|
|
13543
|
+
ignoreParents?: string[];
|
|
13471
13544
|
}];
|
|
13472
13545
|
// ----- vue/no-dupe-keys -----
|
|
13473
13546
|
type VueNoDupeKeys = [] | [{
|
|
@@ -13945,7 +14018,6 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
13945
14018
|
//#endregion
|
|
13946
14019
|
//#region src/types/rule.d.ts
|
|
13947
14020
|
type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, "plugins"> & {
|
|
13948
|
-
// Relax plugins type limitation, as most of the plugins did not have correct type info yet.
|
|
13949
14021
|
/**
|
|
13950
14022
|
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
|
|
13951
14023
|
*
|