@sxzz/eslint-config 7.0.6 → 7.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 +166 -140
- package/dist/index.js +4 -0
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -1971,7 +1971,7 @@ interface Rules {
|
|
|
1971
1971
|
* Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row
|
|
1972
1972
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/table-column-count.md
|
|
1973
1973
|
*/
|
|
1974
|
-
"markdown/table-column-count"?: Linter.RuleEntry<
|
|
1974
|
+
"markdown/table-column-count"?: Linter.RuleEntry<MarkdownTableColumnCount>;
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Enforce a maximum number of classes per file
|
|
1977
1977
|
* @see https://eslint.org/docs/latest/rules/max-classes-per-file
|
|
@@ -3893,670 +3893,690 @@ interface Rules {
|
|
|
3893
3893
|
"unicode-bom"?: Linter.RuleEntry<UnicodeBom>;
|
|
3894
3894
|
/**
|
|
3895
3895
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
3896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
|
|
3897
3897
|
*/
|
|
3898
3898
|
"unicorn/better-regex"?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
3899
3899
|
/**
|
|
3900
3900
|
* Enforce a specific parameter name in catch clauses.
|
|
3901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
|
|
3902
3902
|
*/
|
|
3903
3903
|
"unicorn/catch-error-name"?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
3904
3904
|
/**
|
|
3905
3905
|
* Enforce consistent assertion style with `node:assert`.
|
|
3906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
|
|
3907
3907
|
*/
|
|
3908
3908
|
"unicorn/consistent-assert"?: Linter.RuleEntry<[]>;
|
|
3909
3909
|
/**
|
|
3910
3910
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
3911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
|
|
3912
3912
|
*/
|
|
3913
3913
|
"unicorn/consistent-date-clone"?: Linter.RuleEntry<[]>;
|
|
3914
3914
|
/**
|
|
3915
3915
|
* Use destructured variables over properties.
|
|
3916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
|
|
3917
3917
|
*/
|
|
3918
3918
|
"unicorn/consistent-destructuring"?: Linter.RuleEntry<[]>;
|
|
3919
3919
|
/**
|
|
3920
3920
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
3921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
|
|
3922
3922
|
*/
|
|
3923
3923
|
"unicorn/consistent-empty-array-spread"?: Linter.RuleEntry<[]>;
|
|
3924
3924
|
/**
|
|
3925
3925
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
3926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
|
|
3927
3927
|
*/
|
|
3928
3928
|
"unicorn/consistent-existence-index-check"?: Linter.RuleEntry<[]>;
|
|
3929
3929
|
/**
|
|
3930
3930
|
* Move function definitions to the highest possible scope.
|
|
3931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
|
|
3932
3932
|
*/
|
|
3933
3933
|
"unicorn/consistent-function-scoping"?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
3934
3934
|
/**
|
|
3935
3935
|
* Enforce correct `Error` subclassing.
|
|
3936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
|
|
3937
3937
|
*/
|
|
3938
3938
|
"unicorn/custom-error-definition"?: Linter.RuleEntry<[]>;
|
|
3939
3939
|
/**
|
|
3940
3940
|
* Enforce no spaces between braces.
|
|
3941
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
|
|
3942
3942
|
*/
|
|
3943
3943
|
"unicorn/empty-brace-spaces"?: Linter.RuleEntry<[]>;
|
|
3944
3944
|
/**
|
|
3945
3945
|
* Enforce passing a `message` value when creating a built-in error.
|
|
3946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
|
|
3947
3947
|
*/
|
|
3948
3948
|
"unicorn/error-message"?: Linter.RuleEntry<[]>;
|
|
3949
3949
|
/**
|
|
3950
3950
|
* Require escape sequences to use uppercase or lowercase values.
|
|
3951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
|
|
3952
3952
|
*/
|
|
3953
3953
|
"unicorn/escape-case"?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
3954
3954
|
/**
|
|
3955
3955
|
* Add expiration conditions to TODO comments.
|
|
3956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
|
|
3957
3957
|
*/
|
|
3958
3958
|
"unicorn/expiring-todo-comments"?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
3959
3959
|
/**
|
|
3960
3960
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
3961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
|
|
3962
3962
|
*/
|
|
3963
3963
|
"unicorn/explicit-length-check"?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
3964
3964
|
/**
|
|
3965
3965
|
* Enforce a case style for filenames.
|
|
3966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
|
|
3967
3967
|
*/
|
|
3968
3968
|
"unicorn/filename-case"?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
3969
3969
|
/**
|
|
3970
3970
|
* Enforce specific import styles per module.
|
|
3971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
|
|
3972
3972
|
*/
|
|
3973
3973
|
"unicorn/import-style"?: Linter.RuleEntry<UnicornImportStyle>;
|
|
3974
3974
|
/**
|
|
3975
3975
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
3976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
|
|
3977
3977
|
*/
|
|
3978
3978
|
"unicorn/new-for-builtins"?: Linter.RuleEntry<[]>;
|
|
3979
3979
|
/**
|
|
3980
3980
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
3981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
3982
3982
|
*/
|
|
3983
3983
|
"unicorn/no-abusive-eslint-disable"?: Linter.RuleEntry<[]>;
|
|
3984
3984
|
/**
|
|
3985
3985
|
* Disallow recursive access to `this` within getters and setters.
|
|
3986
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
|
|
3987
3987
|
*/
|
|
3988
3988
|
"unicorn/no-accessor-recursion"?: Linter.RuleEntry<[]>;
|
|
3989
3989
|
/**
|
|
3990
3990
|
* Disallow anonymous functions and classes as the default export.
|
|
3991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
|
|
3992
3992
|
*/
|
|
3993
3993
|
"unicorn/no-anonymous-default-export"?: Linter.RuleEntry<[]>;
|
|
3994
3994
|
/**
|
|
3995
3995
|
* Prevent passing a function reference directly to iterator methods.
|
|
3996
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
3996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
|
|
3997
3997
|
*/
|
|
3998
3998
|
"unicorn/no-array-callback-reference"?: Linter.RuleEntry<[]>;
|
|
3999
3999
|
/**
|
|
4000
4000
|
* Prefer `for…of` over the `forEach` method.
|
|
4001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
|
|
4002
4002
|
*/
|
|
4003
4003
|
"unicorn/no-array-for-each"?: Linter.RuleEntry<[]>;
|
|
4004
4004
|
/**
|
|
4005
4005
|
* Disallow using the `this` argument in array methods.
|
|
4006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
|
|
4007
4007
|
*/
|
|
4008
4008
|
"unicorn/no-array-method-this-argument"?: Linter.RuleEntry<[]>;
|
|
4009
4009
|
/**
|
|
4010
4010
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
4011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
4012
4012
|
* @deprecated
|
|
4013
4013
|
*/
|
|
4014
4014
|
"unicorn/no-array-push-push"?: Linter.RuleEntry<[]>;
|
|
4015
4015
|
/**
|
|
4016
4016
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
4017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
|
|
4018
4018
|
*/
|
|
4019
4019
|
"unicorn/no-array-reduce"?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
4020
4020
|
/**
|
|
4021
|
+
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
4022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
|
|
4023
|
+
*/
|
|
4024
|
+
"unicorn/no-array-reverse"?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
4025
|
+
/**
|
|
4021
4026
|
* Disallow member access from await expression.
|
|
4022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
|
|
4023
4028
|
*/
|
|
4024
4029
|
"unicorn/no-await-expression-member"?: Linter.RuleEntry<[]>;
|
|
4025
4030
|
/**
|
|
4026
4031
|
* Disallow using `await` in `Promise` method parameters.
|
|
4027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
|
|
4028
4033
|
*/
|
|
4029
4034
|
"unicorn/no-await-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
4030
4035
|
/**
|
|
4031
4036
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
4032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
|
|
4033
4038
|
*/
|
|
4034
4039
|
"unicorn/no-console-spaces"?: Linter.RuleEntry<[]>;
|
|
4035
4040
|
/**
|
|
4036
4041
|
* Do not use `document.cookie` directly.
|
|
4037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
|
|
4038
4043
|
*/
|
|
4039
4044
|
"unicorn/no-document-cookie"?: Linter.RuleEntry<[]>;
|
|
4040
4045
|
/**
|
|
4041
4046
|
* Disallow empty files.
|
|
4042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
|
|
4043
4048
|
*/
|
|
4044
4049
|
"unicorn/no-empty-file"?: Linter.RuleEntry<[]>;
|
|
4045
4050
|
/**
|
|
4046
4051
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
4047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
|
|
4048
4053
|
*/
|
|
4049
4054
|
"unicorn/no-for-loop"?: Linter.RuleEntry<[]>;
|
|
4050
4055
|
/**
|
|
4051
4056
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
4052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
|
|
4053
4058
|
*/
|
|
4054
4059
|
"unicorn/no-hex-escape"?: Linter.RuleEntry<[]>;
|
|
4055
4060
|
/**
|
|
4056
4061
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
4057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
4058
4063
|
* @deprecated
|
|
4059
4064
|
*/
|
|
4060
4065
|
"unicorn/no-instanceof-array"?: Linter.RuleEntry<[]>;
|
|
4061
4066
|
/**
|
|
4062
4067
|
* Disallow `instanceof` with built-in objects
|
|
4063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
|
|
4064
4069
|
*/
|
|
4065
4070
|
"unicorn/no-instanceof-builtins"?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
4066
4071
|
/**
|
|
4067
4072
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
4068
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
|
|
4069
4074
|
*/
|
|
4070
4075
|
"unicorn/no-invalid-fetch-options"?: Linter.RuleEntry<[]>;
|
|
4071
4076
|
/**
|
|
4072
4077
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
4073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
4074
4079
|
*/
|
|
4075
4080
|
"unicorn/no-invalid-remove-event-listener"?: Linter.RuleEntry<[]>;
|
|
4076
4081
|
/**
|
|
4077
4082
|
* Disallow identifiers starting with `new` or `class`.
|
|
4078
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
|
|
4079
4084
|
*/
|
|
4080
4085
|
"unicorn/no-keyword-prefix"?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
4081
4086
|
/**
|
|
4082
4087
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
4083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
4084
4089
|
* @deprecated
|
|
4085
4090
|
*/
|
|
4086
4091
|
"unicorn/no-length-as-slice-end"?: Linter.RuleEntry<[]>;
|
|
4087
4092
|
/**
|
|
4088
4093
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
4089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
|
|
4090
4095
|
*/
|
|
4091
4096
|
"unicorn/no-lonely-if"?: Linter.RuleEntry<[]>;
|
|
4092
4097
|
/**
|
|
4093
4098
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
4094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
4095
4100
|
*/
|
|
4096
4101
|
"unicorn/no-magic-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
4097
4102
|
/**
|
|
4098
4103
|
* Disallow named usage of default import and export.
|
|
4099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
|
|
4100
4105
|
*/
|
|
4101
4106
|
"unicorn/no-named-default"?: Linter.RuleEntry<[]>;
|
|
4102
4107
|
/**
|
|
4103
4108
|
* Disallow negated conditions.
|
|
4104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
|
|
4105
4110
|
*/
|
|
4106
4111
|
"unicorn/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
4107
4112
|
/**
|
|
4108
4113
|
* Disallow negated expression in equality check.
|
|
4109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
|
|
4110
4115
|
*/
|
|
4111
4116
|
"unicorn/no-negation-in-equality-check"?: Linter.RuleEntry<[]>;
|
|
4112
4117
|
/**
|
|
4113
4118
|
* Disallow nested ternary expressions.
|
|
4114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
|
|
4115
4120
|
*/
|
|
4116
4121
|
"unicorn/no-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
4117
4122
|
/**
|
|
4118
4123
|
* Disallow `new Array()`.
|
|
4119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
|
|
4120
4125
|
*/
|
|
4121
4126
|
"unicorn/no-new-array"?: Linter.RuleEntry<[]>;
|
|
4122
4127
|
/**
|
|
4123
4128
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
4124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
|
|
4125
4130
|
*/
|
|
4126
4131
|
"unicorn/no-new-buffer"?: Linter.RuleEntry<[]>;
|
|
4127
4132
|
/**
|
|
4128
4133
|
* Disallow the use of the `null` literal.
|
|
4129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
|
|
4130
4135
|
*/
|
|
4131
4136
|
"unicorn/no-null"?: Linter.RuleEntry<UnicornNoNull>;
|
|
4132
4137
|
/**
|
|
4133
4138
|
* Disallow the use of objects as default parameters.
|
|
4134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
|
|
4135
4140
|
*/
|
|
4136
4141
|
"unicorn/no-object-as-default-parameter"?: Linter.RuleEntry<[]>;
|
|
4137
4142
|
/**
|
|
4138
4143
|
* Disallow `process.exit()`.
|
|
4139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
|
|
4140
4145
|
*/
|
|
4141
4146
|
"unicorn/no-process-exit"?: Linter.RuleEntry<[]>;
|
|
4142
4147
|
/**
|
|
4143
4148
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
4144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
4145
4150
|
*/
|
|
4146
4151
|
"unicorn/no-single-promise-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
4147
4152
|
/**
|
|
4148
4153
|
* Disallow classes that only have static members.
|
|
4149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
|
|
4150
4155
|
*/
|
|
4151
4156
|
"unicorn/no-static-only-class"?: Linter.RuleEntry<[]>;
|
|
4152
4157
|
/**
|
|
4153
4158
|
* Disallow `then` property.
|
|
4154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
|
|
4155
4160
|
*/
|
|
4156
4161
|
"unicorn/no-thenable"?: Linter.RuleEntry<[]>;
|
|
4157
4162
|
/**
|
|
4158
4163
|
* Disallow assigning `this` to a variable.
|
|
4159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
|
|
4160
4165
|
*/
|
|
4161
4166
|
"unicorn/no-this-assignment"?: Linter.RuleEntry<[]>;
|
|
4162
4167
|
/**
|
|
4163
4168
|
* Disallow comparing `undefined` using `typeof`.
|
|
4164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
|
|
4165
4170
|
*/
|
|
4166
4171
|
"unicorn/no-typeof-undefined"?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
4167
4172
|
/**
|
|
4168
4173
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
4169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
4170
4175
|
*/
|
|
4171
4176
|
"unicorn/no-unnecessary-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
4172
4177
|
/**
|
|
4173
4178
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
4174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
4175
4180
|
*/
|
|
4176
4181
|
"unicorn/no-unnecessary-array-splice-count"?: Linter.RuleEntry<[]>;
|
|
4177
4182
|
/**
|
|
4178
4183
|
* Disallow awaiting non-promise values.
|
|
4179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
|
|
4180
4185
|
*/
|
|
4181
4186
|
"unicorn/no-unnecessary-await"?: Linter.RuleEntry<[]>;
|
|
4182
4187
|
/**
|
|
4183
4188
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
4184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
4185
4190
|
*/
|
|
4186
4191
|
"unicorn/no-unnecessary-polyfills"?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
4187
4192
|
/**
|
|
4188
4193
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
4189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
4190
4195
|
*/
|
|
4191
4196
|
"unicorn/no-unnecessary-slice-end"?: Linter.RuleEntry<[]>;
|
|
4192
4197
|
/**
|
|
4193
4198
|
* Disallow unreadable array destructuring.
|
|
4194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
4195
4200
|
*/
|
|
4196
4201
|
"unicorn/no-unreadable-array-destructuring"?: Linter.RuleEntry<[]>;
|
|
4197
4202
|
/**
|
|
4198
4203
|
* Disallow unreadable IIFEs.
|
|
4199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
|
|
4200
4205
|
*/
|
|
4201
4206
|
"unicorn/no-unreadable-iife"?: Linter.RuleEntry<[]>;
|
|
4202
4207
|
/**
|
|
4203
4208
|
* Disallow unused object properties.
|
|
4204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
|
|
4205
4210
|
*/
|
|
4206
4211
|
"unicorn/no-unused-properties"?: Linter.RuleEntry<[]>;
|
|
4207
4212
|
/**
|
|
4213
|
+
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
4214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
4215
|
+
*/
|
|
4216
|
+
"unicorn/no-useless-error-capture-stack-trace"?: Linter.RuleEntry<[]>;
|
|
4217
|
+
/**
|
|
4208
4218
|
* Disallow useless fallback when spreading in object literals.
|
|
4209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
4210
4220
|
*/
|
|
4211
4221
|
"unicorn/no-useless-fallback-in-spread"?: Linter.RuleEntry<[]>;
|
|
4212
4222
|
/**
|
|
4213
4223
|
* Disallow useless array length check.
|
|
4214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
|
|
4215
4225
|
*/
|
|
4216
4226
|
"unicorn/no-useless-length-check"?: Linter.RuleEntry<[]>;
|
|
4217
4227
|
/**
|
|
4218
4228
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
4219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
4220
4230
|
*/
|
|
4221
4231
|
"unicorn/no-useless-promise-resolve-reject"?: Linter.RuleEntry<[]>;
|
|
4222
4232
|
/**
|
|
4223
4233
|
* Disallow unnecessary spread.
|
|
4224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
|
|
4225
4235
|
*/
|
|
4226
4236
|
"unicorn/no-useless-spread"?: Linter.RuleEntry<[]>;
|
|
4227
4237
|
/**
|
|
4228
4238
|
* Disallow useless case in switch statements.
|
|
4229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
|
|
4230
4240
|
*/
|
|
4231
4241
|
"unicorn/no-useless-switch-case"?: Linter.RuleEntry<[]>;
|
|
4232
4242
|
/**
|
|
4233
4243
|
* Disallow useless `undefined`.
|
|
4234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
|
|
4235
4245
|
*/
|
|
4236
4246
|
"unicorn/no-useless-undefined"?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
4237
4247
|
/**
|
|
4238
4248
|
* Disallow number literals with zero fractions or dangling dots.
|
|
4239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
|
|
4240
4250
|
*/
|
|
4241
4251
|
"unicorn/no-zero-fractions"?: Linter.RuleEntry<[]>;
|
|
4242
4252
|
/**
|
|
4243
4253
|
* Enforce proper case for numeric literals.
|
|
4244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
|
|
4245
4255
|
*/
|
|
4246
4256
|
"unicorn/number-literal-case"?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
4247
4257
|
/**
|
|
4248
4258
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
4249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
|
|
4250
4260
|
*/
|
|
4251
4261
|
"unicorn/numeric-separators-style"?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
4252
4262
|
/**
|
|
4253
4263
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
4254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
|
|
4255
4265
|
*/
|
|
4256
4266
|
"unicorn/prefer-add-event-listener"?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
4257
4267
|
/**
|
|
4258
4268
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
4259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
|
|
4260
4270
|
*/
|
|
4261
4271
|
"unicorn/prefer-array-find"?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
4262
4272
|
/**
|
|
4263
4273
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
4264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
|
|
4265
4275
|
*/
|
|
4266
4276
|
"unicorn/prefer-array-flat"?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
4267
4277
|
/**
|
|
4268
4278
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
4269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
|
|
4270
4280
|
*/
|
|
4271
4281
|
"unicorn/prefer-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
4272
4282
|
/**
|
|
4273
4283
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
4274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
|
|
4275
4285
|
*/
|
|
4276
4286
|
"unicorn/prefer-array-index-of"?: Linter.RuleEntry<[]>;
|
|
4277
4287
|
/**
|
|
4278
4288
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
4279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
|
|
4280
4290
|
*/
|
|
4281
4291
|
"unicorn/prefer-array-some"?: Linter.RuleEntry<[]>;
|
|
4282
4292
|
/**
|
|
4283
4293
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
4284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
|
|
4285
4295
|
*/
|
|
4286
4296
|
"unicorn/prefer-at"?: Linter.RuleEntry<UnicornPreferAt>;
|
|
4287
4297
|
/**
|
|
4288
4298
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
4289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
4290
4300
|
*/
|
|
4291
4301
|
"unicorn/prefer-blob-reading-methods"?: Linter.RuleEntry<[]>;
|
|
4292
4302
|
/**
|
|
4303
|
+
* Prefer class field declarations over `this` assignments in constructors.
|
|
4304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
|
|
4305
|
+
*/
|
|
4306
|
+
"unicorn/prefer-class-fields"?: Linter.RuleEntry<[]>;
|
|
4307
|
+
/**
|
|
4293
4308
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
4294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
|
|
4295
4310
|
*/
|
|
4296
4311
|
"unicorn/prefer-code-point"?: Linter.RuleEntry<[]>;
|
|
4297
4312
|
/**
|
|
4298
4313
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
4299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
|
|
4300
4315
|
*/
|
|
4301
4316
|
"unicorn/prefer-date-now"?: Linter.RuleEntry<[]>;
|
|
4302
4317
|
/**
|
|
4303
4318
|
* Prefer default parameters over reassignment.
|
|
4304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
|
|
4305
4320
|
*/
|
|
4306
4321
|
"unicorn/prefer-default-parameters"?: Linter.RuleEntry<[]>;
|
|
4307
4322
|
/**
|
|
4308
4323
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
4309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
|
|
4310
4325
|
*/
|
|
4311
4326
|
"unicorn/prefer-dom-node-append"?: Linter.RuleEntry<[]>;
|
|
4312
4327
|
/**
|
|
4313
4328
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
4314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
4315
4330
|
*/
|
|
4316
4331
|
"unicorn/prefer-dom-node-dataset"?: Linter.RuleEntry<[]>;
|
|
4317
4332
|
/**
|
|
4318
4333
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
4319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
|
|
4320
4335
|
*/
|
|
4321
4336
|
"unicorn/prefer-dom-node-remove"?: Linter.RuleEntry<[]>;
|
|
4322
4337
|
/**
|
|
4323
4338
|
* Prefer `.textContent` over `.innerText`.
|
|
4324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
4325
4340
|
*/
|
|
4326
4341
|
"unicorn/prefer-dom-node-text-content"?: Linter.RuleEntry<[]>;
|
|
4327
4342
|
/**
|
|
4328
4343
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
4329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
|
|
4330
4345
|
*/
|
|
4331
4346
|
"unicorn/prefer-event-target"?: Linter.RuleEntry<[]>;
|
|
4332
4347
|
/**
|
|
4333
4348
|
* Prefer `export…from` when re-exporting.
|
|
4334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
|
|
4335
4350
|
*/
|
|
4336
4351
|
"unicorn/prefer-export-from"?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
4337
4352
|
/**
|
|
4338
4353
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
4339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
|
|
4340
4355
|
*/
|
|
4341
4356
|
"unicorn/prefer-global-this"?: Linter.RuleEntry<[]>;
|
|
4342
4357
|
/**
|
|
4343
4358
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
4344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
|
|
4345
4360
|
*/
|
|
4346
4361
|
"unicorn/prefer-import-meta-properties"?: Linter.RuleEntry<[]>;
|
|
4347
4362
|
/**
|
|
4348
4363
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
4349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
|
|
4350
4365
|
*/
|
|
4351
4366
|
"unicorn/prefer-includes"?: Linter.RuleEntry<[]>;
|
|
4352
4367
|
/**
|
|
4353
4368
|
* Prefer reading a JSON file as a buffer.
|
|
4354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
4355
4370
|
*/
|
|
4356
4371
|
"unicorn/prefer-json-parse-buffer"?: Linter.RuleEntry<[]>;
|
|
4357
4372
|
/**
|
|
4358
4373
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
4359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
4360
4375
|
*/
|
|
4361
4376
|
"unicorn/prefer-keyboard-event-key"?: Linter.RuleEntry<[]>;
|
|
4362
4377
|
/**
|
|
4363
4378
|
* Prefer using a logical operator over a ternary.
|
|
4364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
4365
4380
|
*/
|
|
4366
4381
|
"unicorn/prefer-logical-operator-over-ternary"?: Linter.RuleEntry<[]>;
|
|
4367
4382
|
/**
|
|
4368
4383
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
4369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
|
|
4370
4385
|
*/
|
|
4371
4386
|
"unicorn/prefer-math-min-max"?: Linter.RuleEntry<[]>;
|
|
4372
4387
|
/**
|
|
4373
4388
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
4374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
|
|
4375
4390
|
*/
|
|
4376
4391
|
"unicorn/prefer-math-trunc"?: Linter.RuleEntry<[]>;
|
|
4377
4392
|
/**
|
|
4378
4393
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
4379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
4380
4395
|
*/
|
|
4381
4396
|
"unicorn/prefer-modern-dom-apis"?: Linter.RuleEntry<[]>;
|
|
4382
4397
|
/**
|
|
4383
4398
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
4384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
|
|
4385
4400
|
*/
|
|
4386
4401
|
"unicorn/prefer-modern-math-apis"?: Linter.RuleEntry<[]>;
|
|
4387
4402
|
/**
|
|
4388
4403
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
4389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
|
|
4390
4405
|
*/
|
|
4391
4406
|
"unicorn/prefer-module"?: Linter.RuleEntry<[]>;
|
|
4392
4407
|
/**
|
|
4393
4408
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
4394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
4395
4410
|
*/
|
|
4396
4411
|
"unicorn/prefer-native-coercion-functions"?: Linter.RuleEntry<[]>;
|
|
4397
4412
|
/**
|
|
4398
4413
|
* Prefer negative index over `.length - index` when possible.
|
|
4399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
|
|
4400
4415
|
*/
|
|
4401
4416
|
"unicorn/prefer-negative-index"?: Linter.RuleEntry<[]>;
|
|
4402
4417
|
/**
|
|
4403
4418
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
4404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
|
|
4405
4420
|
*/
|
|
4406
4421
|
"unicorn/prefer-node-protocol"?: Linter.RuleEntry<[]>;
|
|
4407
4422
|
/**
|
|
4408
4423
|
* Prefer `Number` static properties over global ones.
|
|
4409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
|
|
4410
4425
|
*/
|
|
4411
4426
|
"unicorn/prefer-number-properties"?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
4412
4427
|
/**
|
|
4413
4428
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
4414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
|
|
4415
4430
|
*/
|
|
4416
4431
|
"unicorn/prefer-object-from-entries"?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
4417
4432
|
/**
|
|
4418
4433
|
* Prefer omitting the `catch` binding parameter.
|
|
4419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
4420
4435
|
*/
|
|
4421
4436
|
"unicorn/prefer-optional-catch-binding"?: Linter.RuleEntry<[]>;
|
|
4422
4437
|
/**
|
|
4423
4438
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
4424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
|
|
4425
4440
|
*/
|
|
4426
4441
|
"unicorn/prefer-prototype-methods"?: Linter.RuleEntry<[]>;
|
|
4427
4442
|
/**
|
|
4428
4443
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
4429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
|
|
4430
4445
|
*/
|
|
4431
4446
|
"unicorn/prefer-query-selector"?: Linter.RuleEntry<[]>;
|
|
4432
4447
|
/**
|
|
4433
4448
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
4434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
|
|
4435
4450
|
*/
|
|
4436
4451
|
"unicorn/prefer-reflect-apply"?: Linter.RuleEntry<[]>;
|
|
4437
4452
|
/**
|
|
4438
4453
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
4439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
|
|
4440
4455
|
*/
|
|
4441
4456
|
"unicorn/prefer-regexp-test"?: Linter.RuleEntry<[]>;
|
|
4442
4457
|
/**
|
|
4443
4458
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
4444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
|
|
4445
4460
|
*/
|
|
4446
4461
|
"unicorn/prefer-set-has"?: Linter.RuleEntry<[]>;
|
|
4447
4462
|
/**
|
|
4448
4463
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
4449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
|
|
4450
4465
|
*/
|
|
4451
4466
|
"unicorn/prefer-set-size"?: Linter.RuleEntry<[]>;
|
|
4452
4467
|
/**
|
|
4453
4468
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
4454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
|
|
4455
4470
|
*/
|
|
4456
4471
|
"unicorn/prefer-single-call"?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
4457
4472
|
/**
|
|
4458
4473
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
4459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
|
|
4460
4475
|
*/
|
|
4461
4476
|
"unicorn/prefer-spread"?: Linter.RuleEntry<[]>;
|
|
4462
4477
|
/**
|
|
4463
4478
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
|
|
4465
4480
|
*/
|
|
4466
4481
|
"unicorn/prefer-string-raw"?: Linter.RuleEntry<[]>;
|
|
4467
4482
|
/**
|
|
4468
4483
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
4469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
|
|
4470
4485
|
*/
|
|
4471
4486
|
"unicorn/prefer-string-replace-all"?: Linter.RuleEntry<[]>;
|
|
4472
4487
|
/**
|
|
4473
4488
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
4474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
|
|
4475
4490
|
*/
|
|
4476
4491
|
"unicorn/prefer-string-slice"?: Linter.RuleEntry<[]>;
|
|
4477
4492
|
/**
|
|
4478
4493
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
4479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
4480
4495
|
*/
|
|
4481
4496
|
"unicorn/prefer-string-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
4482
4497
|
/**
|
|
4483
4498
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
4484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
4485
4500
|
*/
|
|
4486
4501
|
"unicorn/prefer-string-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
4487
4502
|
/**
|
|
4488
4503
|
* Prefer using `structuredClone` to create a deep clone.
|
|
4489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
|
|
4490
4505
|
*/
|
|
4491
4506
|
"unicorn/prefer-structured-clone"?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
4492
4507
|
/**
|
|
4493
4508
|
* Prefer `switch` over multiple `else-if`.
|
|
4494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
|
|
4495
4510
|
*/
|
|
4496
4511
|
"unicorn/prefer-switch"?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
4497
4512
|
/**
|
|
4498
4513
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
4499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
|
|
4500
4515
|
*/
|
|
4501
4516
|
"unicorn/prefer-ternary"?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
4502
4517
|
/**
|
|
4503
4518
|
* Prefer top-level await over top-level promises and async function calls.
|
|
4504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
|
|
4505
4520
|
*/
|
|
4506
4521
|
"unicorn/prefer-top-level-await"?: Linter.RuleEntry<[]>;
|
|
4507
4522
|
/**
|
|
4508
4523
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
4509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
|
|
4510
4525
|
*/
|
|
4511
4526
|
"unicorn/prefer-type-error"?: Linter.RuleEntry<[]>;
|
|
4512
4527
|
/**
|
|
4513
4528
|
* Prevent abbreviations.
|
|
4514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
|
|
4515
4530
|
*/
|
|
4516
4531
|
"unicorn/prevent-abbreviations"?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
4517
4532
|
/**
|
|
4518
4533
|
* Enforce consistent relative URL style.
|
|
4519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
|
|
4520
4535
|
*/
|
|
4521
4536
|
"unicorn/relative-url-style"?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
4522
4537
|
/**
|
|
4523
4538
|
* Enforce using the separator argument with `Array#join()`.
|
|
4524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
|
|
4525
4540
|
*/
|
|
4526
4541
|
"unicorn/require-array-join-separator"?: Linter.RuleEntry<[]>;
|
|
4527
4542
|
/**
|
|
4543
|
+
* Require non-empty specifier list in import and export statements.
|
|
4544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
|
|
4545
|
+
*/
|
|
4546
|
+
"unicorn/require-module-specifiers"?: Linter.RuleEntry<[]>;
|
|
4547
|
+
/**
|
|
4528
4548
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
4529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
4530
4550
|
*/
|
|
4531
4551
|
"unicorn/require-number-to-fixed-digits-argument"?: Linter.RuleEntry<[]>;
|
|
4532
4552
|
/**
|
|
4533
4553
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
4534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
|
|
4535
4555
|
*/
|
|
4536
4556
|
"unicorn/require-post-message-target-origin"?: Linter.RuleEntry<[]>;
|
|
4537
4557
|
/**
|
|
4538
4558
|
* Enforce better string content.
|
|
4539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
|
|
4540
4560
|
*/
|
|
4541
4561
|
"unicorn/string-content"?: Linter.RuleEntry<UnicornStringContent>;
|
|
4542
4562
|
/**
|
|
4543
4563
|
* Enforce consistent brace style for `case` clauses.
|
|
4544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
|
|
4545
4565
|
*/
|
|
4546
4566
|
"unicorn/switch-case-braces"?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
4547
4567
|
/**
|
|
4548
4568
|
* Fix whitespace-insensitive template indentation.
|
|
4549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
|
|
4550
4570
|
*/
|
|
4551
4571
|
"unicorn/template-indent"?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
4552
4572
|
/**
|
|
4553
4573
|
* Enforce consistent case for text encoding identifiers.
|
|
4554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
|
|
4555
4575
|
*/
|
|
4556
4576
|
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<[]>;
|
|
4557
4577
|
/**
|
|
4558
4578
|
* Require `new` when creating an error.
|
|
4559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
|
|
4560
4580
|
*/
|
|
4561
4581
|
"unicorn/throw-new-error"?: Linter.RuleEntry<[]>;
|
|
4562
4582
|
/**
|
|
@@ -5506,7 +5526,6 @@ type TypescriptEslintPreferDestructuring = [] | [({
|
|
|
5506
5526
|
}), {
|
|
5507
5527
|
enforceForDeclarationWithTypeAnnotation?: boolean;
|
|
5508
5528
|
enforceForRenamedProperties?: boolean;
|
|
5509
|
-
[k: string]: unknown | undefined;
|
|
5510
5529
|
}];
|
|
5511
5530
|
type TypescriptEslintPreferLiteralEnumMember = [] | [{
|
|
5512
5531
|
allowBitwiseExpressions?: boolean;
|
|
@@ -5522,7 +5541,6 @@ type TypescriptEslintPreferNullishCoalescing = [] | [{
|
|
|
5522
5541
|
boolean?: boolean;
|
|
5523
5542
|
number?: boolean;
|
|
5524
5543
|
string?: boolean;
|
|
5525
|
-
[k: string]: unknown | undefined;
|
|
5526
5544
|
} | true);
|
|
5527
5545
|
ignoreTernaryTests?: boolean;
|
|
5528
5546
|
}];
|
|
@@ -5654,6 +5672,7 @@ type AccessorPairs = [] | [{
|
|
|
5654
5672
|
getWithoutSet?: boolean;
|
|
5655
5673
|
setWithoutGet?: boolean;
|
|
5656
5674
|
enforceForClassMembers?: boolean;
|
|
5675
|
+
enforceForTSTypes?: boolean;
|
|
5657
5676
|
}];
|
|
5658
5677
|
type AntfuConsistentChaining = [] | [{
|
|
5659
5678
|
allowLeadingPropertyAccess?: boolean;
|
|
@@ -5837,7 +5856,9 @@ type GeneratorStarSpacing = [] | [(("before" | "after" | "both" | "neither") | {
|
|
|
5837
5856
|
type GetterReturn = [] | [{
|
|
5838
5857
|
allowImplicit?: boolean;
|
|
5839
5858
|
}];
|
|
5840
|
-
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")]
|
|
5859
|
+
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")] | [("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
|
|
5860
|
+
enforceForTSTypes?: boolean;
|
|
5861
|
+
}];
|
|
5841
5862
|
type HandleCallbackErr = [] | [string];
|
|
5842
5863
|
type IdBlacklist = string[];
|
|
5843
5864
|
type IdDenylist = string[];
|
|
@@ -6267,8 +6288,8 @@ type JsdocMatchName = [] | [{
|
|
|
6267
6288
|
context?: string;
|
|
6268
6289
|
disallowName?: string;
|
|
6269
6290
|
message?: string;
|
|
6291
|
+
replacement?: string;
|
|
6270
6292
|
tags?: string[];
|
|
6271
|
-
[k: string]: unknown | undefined;
|
|
6272
6293
|
}[];
|
|
6273
6294
|
}];
|
|
6274
6295
|
type JsdocMultilineBlocks = [] | [{
|
|
@@ -6332,7 +6353,6 @@ type JsdocRequireAsteriskPrefix = [] | [("always" | "never" | "any")] | [("alway
|
|
|
6332
6353
|
always?: string[];
|
|
6333
6354
|
any?: string[];
|
|
6334
6355
|
never?: string[];
|
|
6335
|
-
[k: string]: unknown | undefined;
|
|
6336
6356
|
};
|
|
6337
6357
|
}];
|
|
6338
6358
|
type JsdocRequireDescription = [] | [{
|
|
@@ -6523,7 +6543,6 @@ type JsdocSortTags = [] | [{
|
|
|
6523
6543
|
reportTagGroupSpacing?: boolean;
|
|
6524
6544
|
tagSequence?: {
|
|
6525
6545
|
tags?: string[];
|
|
6526
|
-
[k: string]: unknown | undefined;
|
|
6527
6546
|
}[];
|
|
6528
6547
|
}];
|
|
6529
6548
|
type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" | "never"), {
|
|
@@ -7199,6 +7218,9 @@ type MarkdownNoUnusedDefinitions = [] | [{
|
|
|
7199
7218
|
allowDefinitions?: string[];
|
|
7200
7219
|
allowFootnoteDefinitions?: string[];
|
|
7201
7220
|
}];
|
|
7221
|
+
type MarkdownTableColumnCount = [] | [{
|
|
7222
|
+
checkMissingCells?: boolean;
|
|
7223
|
+
}];
|
|
7202
7224
|
type MaxClassesPerFile = [] | [(number | {
|
|
7203
7225
|
ignoreExpressions?: boolean;
|
|
7204
7226
|
max?: number;
|
|
@@ -7602,6 +7624,7 @@ type NoUnusedVars = [] | [(("all" | "local") | {
|
|
|
7602
7624
|
caughtErrorsIgnorePattern?: string;
|
|
7603
7625
|
destructuredArrayIgnorePattern?: string;
|
|
7604
7626
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
7627
|
+
ignoreUsingDeclarations?: boolean;
|
|
7605
7628
|
reportUsedIgnorePattern?: boolean;
|
|
7606
7629
|
})];
|
|
7607
7630
|
type NoUseBeforeDefine = [] | [("nofunc" | {
|
|
@@ -9957,6 +9980,9 @@ interface _UnicornImportStyle_BooleanObject {
|
|
|
9957
9980
|
type UnicornNoArrayReduce = [] | [{
|
|
9958
9981
|
allowSimpleOperations?: boolean;
|
|
9959
9982
|
}];
|
|
9983
|
+
type UnicornNoArrayReverse = [] | [{
|
|
9984
|
+
allowExpressionStatement?: boolean;
|
|
9985
|
+
}];
|
|
9960
9986
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
9961
9987
|
useErrorIsError?: boolean;
|
|
9962
9988
|
strategy?: ("loose" | "strict");
|
package/dist/index.js
CHANGED
|
@@ -753,6 +753,7 @@ const unicorn = () => [{
|
|
|
753
753
|
}],
|
|
754
754
|
"unicorn/new-for-builtins": "error",
|
|
755
755
|
"unicorn/no-array-method-this-argument": "error",
|
|
756
|
+
"unicorn/no-array-reverse": "error",
|
|
756
757
|
"unicorn/no-await-in-promise-methods": "error",
|
|
757
758
|
"unicorn/no-console-spaces": "error",
|
|
758
759
|
"unicorn/no-for-loop": "error",
|
|
@@ -769,6 +770,7 @@ const unicorn = () => [{
|
|
|
769
770
|
"unicorn/no-unnecessary-array-splice-count": "error",
|
|
770
771
|
"unicorn/no-unnecessary-await": "error",
|
|
771
772
|
"unicorn/no-unnecessary-slice-end": "error",
|
|
773
|
+
"unicorn/no-useless-error-capture-stack-trace": "error",
|
|
772
774
|
"unicorn/no-zero-fractions": `error`,
|
|
773
775
|
"unicorn/prefer-add-event-listener": "error",
|
|
774
776
|
"unicorn/prefer-array-find": "error",
|
|
@@ -777,6 +779,7 @@ const unicorn = () => [{
|
|
|
777
779
|
"unicorn/prefer-array-some": "error",
|
|
778
780
|
"unicorn/prefer-at": "error",
|
|
779
781
|
"unicorn/prefer-blob-reading-methods": "error",
|
|
782
|
+
"unicorn/prefer-class-fields": "error",
|
|
780
783
|
"unicorn/prefer-date-now": "error",
|
|
781
784
|
"unicorn/prefer-dom-node-append": "error",
|
|
782
785
|
"unicorn/prefer-dom-node-dataset": "error",
|
|
@@ -803,6 +806,7 @@ const unicorn = () => [{
|
|
|
803
806
|
"unicorn/prefer-string-starts-ends-with": "error",
|
|
804
807
|
"unicorn/prefer-string-trim-start-end": "error",
|
|
805
808
|
"unicorn/prefer-type-error": "error",
|
|
809
|
+
"unicorn/require-module-specifiers": "error",
|
|
806
810
|
"unicorn/throw-new-error": "error"
|
|
807
811
|
}
|
|
808
812
|
}];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sxzz/eslint-config",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "ESLint config for @sxzz.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,24 +38,24 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
41
|
-
"@eslint/js": "^9.
|
|
42
|
-
"@eslint/markdown": "^7.
|
|
41
|
+
"@eslint/js": "^9.32.0",
|
|
42
|
+
"@eslint/markdown": "^7.1.0",
|
|
43
43
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
44
|
-
"eslint-config-prettier": "^10.1.
|
|
44
|
+
"eslint-config-prettier": "^10.1.8",
|
|
45
45
|
"eslint-flat-config-utils": "^2.1.0",
|
|
46
46
|
"eslint-plugin-antfu": "^3.1.1",
|
|
47
47
|
"eslint-plugin-command": "^3.3.1",
|
|
48
48
|
"eslint-plugin-de-morgan": "^1.3.0",
|
|
49
49
|
"eslint-plugin-import-x": "^4.16.1",
|
|
50
|
-
"eslint-plugin-jsdoc": "^
|
|
50
|
+
"eslint-plugin-jsdoc": "^52.0.0",
|
|
51
51
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
52
|
-
"eslint-plugin-n": "^17.21.
|
|
52
|
+
"eslint-plugin-n": "^17.21.2",
|
|
53
53
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
54
|
-
"eslint-plugin-pnpm": "^1.
|
|
55
|
-
"eslint-plugin-prettier": "^5.5.
|
|
54
|
+
"eslint-plugin-pnpm": "^1.1.0",
|
|
55
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
56
56
|
"eslint-plugin-regexp": "^2.9.0",
|
|
57
57
|
"eslint-plugin-sxzz": "^0.4.0",
|
|
58
|
-
"eslint-plugin-unicorn": "^
|
|
58
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
59
59
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
60
60
|
"eslint-plugin-vue": "^10.3.0",
|
|
61
61
|
"eslint-plugin-yml": "^1.18.0",
|
|
@@ -63,20 +63,20 @@
|
|
|
63
63
|
"jsonc-eslint-parser": "^2.4.0",
|
|
64
64
|
"local-pkg": "^1.1.1",
|
|
65
65
|
"prettier": "^3.6.2",
|
|
66
|
-
"typescript-eslint": "^8.
|
|
66
|
+
"typescript-eslint": "^8.38.0",
|
|
67
67
|
"vue-eslint-parser": "^10.2.0",
|
|
68
68
|
"yaml-eslint-parser": "^1.3.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@eslint/config-inspector": "^1.1.0",
|
|
72
72
|
"@sxzz/prettier-config": "^2.2.3",
|
|
73
|
-
"@types/node": "^24.0
|
|
73
|
+
"@types/node": "^24.1.0",
|
|
74
74
|
"@unocss/eslint-plugin": "^66.3.3",
|
|
75
75
|
"ansis": "^4.1.0",
|
|
76
76
|
"bumpp": "^10.2.0",
|
|
77
|
-
"eslint": "^9.
|
|
78
|
-
"eslint-typegen": "^2.
|
|
79
|
-
"tsdown": "^0.
|
|
77
|
+
"eslint": "^9.32.0",
|
|
78
|
+
"eslint-typegen": "^2.3.0",
|
|
79
|
+
"tsdown": "^0.13.0",
|
|
80
80
|
"tsx": "^4.20.3",
|
|
81
81
|
"typescript": "^5.8.3"
|
|
82
82
|
},
|