@ivanmaxlogiudice/eslint-config 4.0.2 → 4.0.3
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/bin/index.mjs +0 -0
- package/dist/cli.mjs +5 -5
- package/dist/index.d.mts +158 -145
- package/package.json +5 -5
package/bin/index.mjs
CHANGED
|
File without changes
|
package/dist/cli.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { execSync } from "node:child_process";
|
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@ivanmaxlogiudice/eslint-config",
|
|
14
14
|
type: "module",
|
|
15
|
-
version: "4.0.
|
|
15
|
+
version: "4.0.3",
|
|
16
16
|
packageManager: "bun@1.3.5",
|
|
17
17
|
description: "Personal ESLint config",
|
|
18
18
|
license: "MIT",
|
|
@@ -68,14 +68,14 @@ var package_default = {
|
|
|
68
68
|
"@vitest/eslint-plugin": "^1.6.7",
|
|
69
69
|
"ansis": "^4.2.0",
|
|
70
70
|
"cac": "^6.7.14",
|
|
71
|
-
"eslint-plugin-antfu": "^3.2.
|
|
71
|
+
"eslint-plugin-antfu": "^3.2.1",
|
|
72
72
|
"eslint-plugin-import-lite": "^0.5.0",
|
|
73
73
|
"eslint-plugin-jsdoc": "^62.5.4",
|
|
74
74
|
"eslint-plugin-jsonc": "^2.21.1",
|
|
75
75
|
"eslint-plugin-n": "^17.23.2",
|
|
76
76
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
77
77
|
"eslint-plugin-perfectionist": "^5.5.0",
|
|
78
|
-
"eslint-plugin-unicorn": "^
|
|
78
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
79
79
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
80
80
|
"eslint-plugin-vue": "^10.7.0",
|
|
81
81
|
"globals": "^17.3.0",
|
|
@@ -86,8 +86,8 @@ var package_default = {
|
|
|
86
86
|
},
|
|
87
87
|
devDependencies: {
|
|
88
88
|
"@eslint/config-inspector": "^1.4.2",
|
|
89
|
-
"@types/bun": "^1.3.
|
|
90
|
-
"@types/node": "^25.2.
|
|
89
|
+
"@types/bun": "^1.3.9",
|
|
90
|
+
"@types/node": "^25.2.3",
|
|
91
91
|
"@unocss/eslint-plugin": "^66.6.0",
|
|
92
92
|
"bumpp": "^10.4.1",
|
|
93
93
|
"eslint": "^10.0.0",
|
package/dist/index.d.mts
CHANGED
|
@@ -4663,725 +4663,730 @@ interface RuleOptions {
|
|
|
4663
4663
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
4664
4664
|
/**
|
|
4665
4665
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
4666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
|
|
4667
4667
|
*/
|
|
4668
4668
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
4669
4669
|
/**
|
|
4670
4670
|
* Enforce a specific parameter name in catch clauses.
|
|
4671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
|
|
4672
4672
|
*/
|
|
4673
4673
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
4674
4674
|
/**
|
|
4675
4675
|
* Enforce consistent assertion style with `node:assert`.
|
|
4676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
|
|
4677
4677
|
*/
|
|
4678
4678
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
4679
4679
|
/**
|
|
4680
4680
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
4681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
|
|
4682
4682
|
*/
|
|
4683
4683
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
4684
4684
|
/**
|
|
4685
4685
|
* Use destructured variables over properties.
|
|
4686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
|
|
4687
4687
|
*/
|
|
4688
4688
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
4689
4689
|
/**
|
|
4690
4690
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4692
4692
|
*/
|
|
4693
4693
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
4694
4694
|
/**
|
|
4695
4695
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
|
|
4697
4697
|
*/
|
|
4698
4698
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
4699
4699
|
/**
|
|
4700
4700
|
* Move function definitions to the highest possible scope.
|
|
4701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
|
|
4702
4702
|
*/
|
|
4703
4703
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
4704
4704
|
/**
|
|
4705
4705
|
* Enforce correct `Error` subclassing.
|
|
4706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
|
|
4707
4707
|
*/
|
|
4708
4708
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
4709
4709
|
/**
|
|
4710
4710
|
* Enforce no spaces between braces.
|
|
4711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
|
|
4712
4712
|
*/
|
|
4713
4713
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
4714
4714
|
/**
|
|
4715
4715
|
* Enforce passing a `message` value when creating a built-in error.
|
|
4716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
|
|
4717
4717
|
*/
|
|
4718
4718
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
4719
4719
|
/**
|
|
4720
4720
|
* Require escape sequences to use uppercase or lowercase values.
|
|
4721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
|
|
4722
4722
|
*/
|
|
4723
4723
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
4724
4724
|
/**
|
|
4725
4725
|
* Add expiration conditions to TODO comments.
|
|
4726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
|
|
4727
4727
|
*/
|
|
4728
4728
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
4729
4729
|
/**
|
|
4730
4730
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
4731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
|
|
4732
4732
|
*/
|
|
4733
4733
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
4734
4734
|
/**
|
|
4735
4735
|
* Enforce a case style for filenames.
|
|
4736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
|
|
4737
4737
|
*/
|
|
4738
4738
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
4739
4739
|
/**
|
|
4740
4740
|
* Enforce specific import styles per module.
|
|
4741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
|
|
4742
4742
|
*/
|
|
4743
4743
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
4744
|
+
/**
|
|
4745
|
+
* Prevent usage of variables from outside the scope of isolated functions.
|
|
4746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
|
|
4747
|
+
*/
|
|
4748
|
+
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
4744
4749
|
/**
|
|
4745
4750
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
4746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
|
|
4747
4752
|
*/
|
|
4748
4753
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
4749
4754
|
/**
|
|
4750
4755
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
4751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
4752
4757
|
*/
|
|
4753
4758
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
4754
4759
|
/**
|
|
4755
4760
|
* Disallow recursive access to `this` within getters and setters.
|
|
4756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
|
|
4757
4762
|
*/
|
|
4758
4763
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
4759
4764
|
/**
|
|
4760
4765
|
* Disallow anonymous functions and classes as the default export.
|
|
4761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
|
|
4762
4767
|
*/
|
|
4763
4768
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
4764
4769
|
/**
|
|
4765
4770
|
* Prevent passing a function reference directly to iterator methods.
|
|
4766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
|
|
4767
4772
|
*/
|
|
4768
4773
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
4769
4774
|
/**
|
|
4770
4775
|
* Prefer `for…of` over the `forEach` method.
|
|
4771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
|
|
4772
4777
|
*/
|
|
4773
4778
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
4774
4779
|
/**
|
|
4775
4780
|
* Disallow using the `this` argument in array methods.
|
|
4776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
|
|
4777
4782
|
*/
|
|
4778
4783
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
4779
4784
|
/**
|
|
4780
4785
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
4781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
4782
4787
|
* @deprecated
|
|
4783
4788
|
*/
|
|
4784
4789
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
4785
4790
|
/**
|
|
4786
4791
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
4787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
|
|
4788
4793
|
*/
|
|
4789
4794
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
4790
4795
|
/**
|
|
4791
4796
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
4792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
|
|
4793
4798
|
*/
|
|
4794
4799
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
4795
4800
|
/**
|
|
4796
4801
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
4797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
|
|
4798
4803
|
*/
|
|
4799
4804
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
4800
4805
|
/**
|
|
4801
4806
|
* Disallow member access from await expression.
|
|
4802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
|
|
4803
4808
|
*/
|
|
4804
4809
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
4805
4810
|
/**
|
|
4806
4811
|
* Disallow using `await` in `Promise` method parameters.
|
|
4807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
|
|
4808
4813
|
*/
|
|
4809
4814
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
4810
4815
|
/**
|
|
4811
4816
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
4812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
|
|
4813
4818
|
*/
|
|
4814
4819
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
4815
4820
|
/**
|
|
4816
4821
|
* Do not use `document.cookie` directly.
|
|
4817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
|
|
4818
4823
|
*/
|
|
4819
4824
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
4820
4825
|
/**
|
|
4821
4826
|
* Disallow empty files.
|
|
4822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
|
|
4823
4828
|
*/
|
|
4824
4829
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
4825
4830
|
/**
|
|
4826
4831
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
4827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
|
|
4828
4833
|
*/
|
|
4829
4834
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
4830
4835
|
/**
|
|
4831
4836
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
4832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
|
|
4833
4838
|
*/
|
|
4834
4839
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
4835
4840
|
/**
|
|
4836
4841
|
* Disallow immediate mutation after variable assignment.
|
|
4837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
|
|
4838
4843
|
*/
|
|
4839
4844
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
4840
4845
|
/**
|
|
4841
4846
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
4842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
4843
4848
|
* @deprecated
|
|
4844
4849
|
*/
|
|
4845
4850
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
4846
4851
|
/**
|
|
4847
4852
|
* Disallow `instanceof` with built-in objects
|
|
4848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
|
|
4849
4854
|
*/
|
|
4850
4855
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
4851
4856
|
/**
|
|
4852
4857
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
4853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
|
|
4854
4859
|
*/
|
|
4855
4860
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
4856
4861
|
/**
|
|
4857
4862
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
4858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
4859
4864
|
*/
|
|
4860
4865
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
4861
4866
|
/**
|
|
4862
4867
|
* Disallow identifiers starting with `new` or `class`.
|
|
4863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
|
|
4864
4869
|
*/
|
|
4865
4870
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
4866
4871
|
/**
|
|
4867
4872
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
4868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
4869
4874
|
* @deprecated
|
|
4870
4875
|
*/
|
|
4871
4876
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
4872
4877
|
/**
|
|
4873
4878
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
4874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
|
|
4875
4880
|
*/
|
|
4876
4881
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
4877
4882
|
/**
|
|
4878
4883
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
4879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
4880
4885
|
*/
|
|
4881
4886
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
4882
4887
|
/**
|
|
4883
4888
|
* Disallow named usage of default import and export.
|
|
4884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
|
|
4885
4890
|
*/
|
|
4886
4891
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
4887
4892
|
/**
|
|
4888
4893
|
* Disallow negated conditions.
|
|
4889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
|
|
4890
4895
|
*/
|
|
4891
4896
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
4892
4897
|
/**
|
|
4893
4898
|
* Disallow negated expression in equality check.
|
|
4894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
|
|
4895
4900
|
*/
|
|
4896
4901
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
4897
4902
|
/**
|
|
4898
4903
|
* Disallow nested ternary expressions.
|
|
4899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
|
|
4900
4905
|
*/
|
|
4901
4906
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
4902
4907
|
/**
|
|
4903
4908
|
* Disallow `new Array()`.
|
|
4904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
|
|
4905
4910
|
*/
|
|
4906
4911
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
4907
4912
|
/**
|
|
4908
4913
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
4909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
|
|
4910
4915
|
*/
|
|
4911
4916
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
4912
4917
|
/**
|
|
4913
4918
|
* Disallow the use of the `null` literal.
|
|
4914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
|
|
4915
4920
|
*/
|
|
4916
4921
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
4917
4922
|
/**
|
|
4918
4923
|
* Disallow the use of objects as default parameters.
|
|
4919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
|
|
4920
4925
|
*/
|
|
4921
4926
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
4922
4927
|
/**
|
|
4923
4928
|
* Disallow `process.exit()`.
|
|
4924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
|
|
4925
4930
|
*/
|
|
4926
4931
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
4927
4932
|
/**
|
|
4928
4933
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
4929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
4930
4935
|
*/
|
|
4931
4936
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
4932
4937
|
/**
|
|
4933
4938
|
* Disallow classes that only have static members.
|
|
4934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
|
|
4935
4940
|
*/
|
|
4936
4941
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
4937
4942
|
/**
|
|
4938
4943
|
* Disallow `then` property.
|
|
4939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
|
|
4940
4945
|
*/
|
|
4941
4946
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
4942
4947
|
/**
|
|
4943
4948
|
* Disallow assigning `this` to a variable.
|
|
4944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
|
|
4945
4950
|
*/
|
|
4946
4951
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
4947
4952
|
/**
|
|
4948
4953
|
* Disallow comparing `undefined` using `typeof`.
|
|
4949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
|
|
4950
4955
|
*/
|
|
4951
4956
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
4952
4957
|
/**
|
|
4953
4958
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
4954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
4955
4960
|
*/
|
|
4956
4961
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
4957
4962
|
/**
|
|
4958
4963
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
4959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
4960
4965
|
*/
|
|
4961
4966
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
4962
4967
|
/**
|
|
4963
4968
|
* Disallow awaiting non-promise values.
|
|
4964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
|
|
4965
4970
|
*/
|
|
4966
4971
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
4967
4972
|
/**
|
|
4968
4973
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
4969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
4970
4975
|
*/
|
|
4971
4976
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
4972
4977
|
/**
|
|
4973
4978
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
4974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
4975
4980
|
*/
|
|
4976
4981
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
4977
4982
|
/**
|
|
4978
4983
|
* Disallow unreadable array destructuring.
|
|
4979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
4980
4985
|
*/
|
|
4981
4986
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
4982
4987
|
/**
|
|
4983
4988
|
* Disallow unreadable IIFEs.
|
|
4984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
|
|
4985
4990
|
*/
|
|
4986
4991
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
4987
4992
|
/**
|
|
4988
4993
|
* Disallow unused object properties.
|
|
4989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
|
|
4990
4995
|
*/
|
|
4991
4996
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
4992
4997
|
/**
|
|
4993
4998
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
4994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
4999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
|
|
4995
5000
|
*/
|
|
4996
5001
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
4997
5002
|
/**
|
|
4998
5003
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
4999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5000
5005
|
*/
|
|
5001
5006
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5002
5007
|
/**
|
|
5003
5008
|
* Disallow useless fallback when spreading in object literals.
|
|
5004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5005
5010
|
*/
|
|
5006
5011
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5007
5012
|
/**
|
|
5008
5013
|
* Disallow useless array length check.
|
|
5009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
|
|
5010
5015
|
*/
|
|
5011
5016
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5012
5017
|
/**
|
|
5013
5018
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5015
5020
|
*/
|
|
5016
5021
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5017
5022
|
/**
|
|
5018
5023
|
* Disallow unnecessary spread.
|
|
5019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
|
|
5020
5025
|
*/
|
|
5021
5026
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5022
5027
|
/**
|
|
5023
5028
|
* Disallow useless case in switch statements.
|
|
5024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
|
|
5025
5030
|
*/
|
|
5026
5031
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5027
5032
|
/**
|
|
5028
5033
|
* Disallow useless `undefined`.
|
|
5029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
|
|
5030
5035
|
*/
|
|
5031
5036
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5032
5037
|
/**
|
|
5033
5038
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
|
|
5035
5040
|
*/
|
|
5036
5041
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5037
5042
|
/**
|
|
5038
5043
|
* Enforce proper case for numeric literals.
|
|
5039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
|
|
5040
5045
|
*/
|
|
5041
5046
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5042
5047
|
/**
|
|
5043
5048
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
|
|
5045
5050
|
*/
|
|
5046
5051
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5047
5052
|
/**
|
|
5048
5053
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
|
|
5050
5055
|
*/
|
|
5051
5056
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5052
5057
|
/**
|
|
5053
5058
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
|
|
5055
5060
|
*/
|
|
5056
5061
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5057
5062
|
/**
|
|
5058
5063
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
|
|
5060
5065
|
*/
|
|
5061
5066
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5062
5067
|
/**
|
|
5063
5068
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
|
|
5065
5070
|
*/
|
|
5066
5071
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5067
5072
|
/**
|
|
5068
5073
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
|
|
5070
5075
|
*/
|
|
5071
5076
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5072
5077
|
/**
|
|
5073
5078
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
|
|
5075
5080
|
*/
|
|
5076
5081
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5077
5082
|
/**
|
|
5078
5083
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
|
|
5080
5085
|
*/
|
|
5081
5086
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5082
5087
|
/**
|
|
5083
5088
|
* Prefer `BigInt` literals over the constructor.
|
|
5084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
|
|
5085
5090
|
*/
|
|
5086
5091
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5087
5092
|
/**
|
|
5088
5093
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5090
5095
|
*/
|
|
5091
5096
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5092
5097
|
/**
|
|
5093
5098
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
|
|
5095
5100
|
*/
|
|
5096
5101
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5097
5102
|
/**
|
|
5098
5103
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5100
5105
|
*/
|
|
5101
5106
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5102
5107
|
/**
|
|
5103
5108
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
|
|
5105
5110
|
*/
|
|
5106
5111
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5107
5112
|
/**
|
|
5108
5113
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
|
|
5110
5115
|
*/
|
|
5111
5116
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5112
5117
|
/**
|
|
5113
5118
|
* Prefer default parameters over reassignment.
|
|
5114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
|
|
5115
5120
|
*/
|
|
5116
5121
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5117
5122
|
/**
|
|
5118
5123
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
|
|
5120
5125
|
*/
|
|
5121
5126
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5122
5127
|
/**
|
|
5123
5128
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5125
5130
|
*/
|
|
5126
5131
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5127
5132
|
/**
|
|
5128
5133
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5130
5135
|
*/
|
|
5131
5136
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5132
5137
|
/**
|
|
5133
5138
|
* Prefer `.textContent` over `.innerText`.
|
|
5134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5135
5140
|
*/
|
|
5136
5141
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5137
5142
|
/**
|
|
5138
5143
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
|
|
5140
5145
|
*/
|
|
5141
5146
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5142
5147
|
/**
|
|
5143
5148
|
* Prefer `export…from` when re-exporting.
|
|
5144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
|
|
5145
5150
|
*/
|
|
5146
5151
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5147
5152
|
/**
|
|
5148
5153
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
|
|
5150
5155
|
*/
|
|
5151
5156
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5152
5157
|
/**
|
|
5153
5158
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5155
5160
|
*/
|
|
5156
5161
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5157
5162
|
/**
|
|
5158
5163
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
|
|
5160
5165
|
*/
|
|
5161
5166
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5162
5167
|
/**
|
|
5163
5168
|
* Prefer reading a JSON file as a buffer.
|
|
5164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5165
5170
|
*/
|
|
5166
5171
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5167
5172
|
/**
|
|
5168
5173
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5170
5175
|
*/
|
|
5171
5176
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5172
5177
|
/**
|
|
5173
5178
|
* Prefer using a logical operator over a ternary.
|
|
5174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5175
5180
|
*/
|
|
5176
5181
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5177
5182
|
/**
|
|
5178
5183
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
|
|
5180
5185
|
*/
|
|
5181
5186
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5182
5187
|
/**
|
|
5183
5188
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
|
|
5185
5190
|
*/
|
|
5186
5191
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5187
5192
|
/**
|
|
5188
5193
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5190
5195
|
*/
|
|
5191
5196
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5192
5197
|
/**
|
|
5193
5198
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5195
5200
|
*/
|
|
5196
5201
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5197
5202
|
/**
|
|
5198
5203
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
|
|
5200
5205
|
*/
|
|
5201
5206
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5202
5207
|
/**
|
|
5203
5208
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5205
5210
|
*/
|
|
5206
5211
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5207
5212
|
/**
|
|
5208
5213
|
* Prefer negative index over `.length - index` when possible.
|
|
5209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
|
|
5210
5215
|
*/
|
|
5211
5216
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5212
5217
|
/**
|
|
5213
5218
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
|
|
5215
5220
|
*/
|
|
5216
5221
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5217
5222
|
/**
|
|
5218
5223
|
* Prefer `Number` static properties over global ones.
|
|
5219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
|
|
5220
5225
|
*/
|
|
5221
5226
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5222
5227
|
/**
|
|
5223
5228
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
|
|
5225
5230
|
*/
|
|
5226
5231
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5227
5232
|
/**
|
|
5228
5233
|
* Prefer omitting the `catch` binding parameter.
|
|
5229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5230
5235
|
*/
|
|
5231
5236
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5232
5237
|
/**
|
|
5233
5238
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
|
|
5235
5240
|
*/
|
|
5236
5241
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5237
5242
|
/**
|
|
5238
5243
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
|
|
5240
5245
|
*/
|
|
5241
5246
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5242
5247
|
/**
|
|
5243
5248
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
|
|
5245
5250
|
*/
|
|
5246
5251
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5247
5252
|
/**
|
|
5248
5253
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
|
|
5250
5255
|
*/
|
|
5251
5256
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5252
5257
|
/**
|
|
5253
5258
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
|
|
5255
5260
|
*/
|
|
5256
5261
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5257
5262
|
/**
|
|
5258
5263
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
|
|
5260
5265
|
*/
|
|
5261
5266
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5262
5267
|
/**
|
|
5263
5268
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
|
|
5265
5270
|
*/
|
|
5266
5271
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5267
5272
|
/**
|
|
5268
5273
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
|
|
5270
5275
|
*/
|
|
5271
5276
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5272
5277
|
/**
|
|
5273
5278
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
|
|
5275
5280
|
*/
|
|
5276
5281
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5277
5282
|
/**
|
|
5278
5283
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5284
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
|
|
5280
5285
|
*/
|
|
5281
5286
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5282
5287
|
/**
|
|
5283
5288
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
|
|
5285
5290
|
*/
|
|
5286
5291
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5287
5292
|
/**
|
|
5288
5293
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5294
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
|
|
5290
5295
|
*/
|
|
5291
5296
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5292
5297
|
/**
|
|
5293
5298
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5299
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5295
5300
|
*/
|
|
5296
5301
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5297
5302
|
/**
|
|
5298
5303
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5300
5305
|
*/
|
|
5301
5306
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5302
5307
|
/**
|
|
5303
5308
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
|
|
5305
5310
|
*/
|
|
5306
5311
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5307
5312
|
/**
|
|
5308
5313
|
* Prefer `switch` over multiple `else-if`.
|
|
5309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
|
|
5310
5315
|
*/
|
|
5311
5316
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5312
5317
|
/**
|
|
5313
5318
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5319
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
|
|
5315
5320
|
*/
|
|
5316
5321
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5317
5322
|
/**
|
|
5318
5323
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5324
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
|
|
5320
5325
|
*/
|
|
5321
5326
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5322
5327
|
/**
|
|
5323
5328
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
|
|
5325
5330
|
*/
|
|
5326
5331
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5327
5332
|
/**
|
|
5328
5333
|
* Prevent abbreviations.
|
|
5329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
|
|
5330
5335
|
*/
|
|
5331
5336
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5332
5337
|
/**
|
|
5333
5338
|
* Enforce consistent relative URL style.
|
|
5334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
|
|
5335
5340
|
*/
|
|
5336
5341
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5337
5342
|
/**
|
|
5338
5343
|
* Enforce using the separator argument with `Array#join()`.
|
|
5339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
|
|
5340
5345
|
*/
|
|
5341
5346
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5342
5347
|
/**
|
|
5343
5348
|
* Require non-empty module attributes for imports and exports
|
|
5344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
|
|
5345
5350
|
*/
|
|
5346
5351
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5347
5352
|
/**
|
|
5348
5353
|
* Require non-empty specifier list in import and export statements.
|
|
5349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
|
|
5350
5355
|
*/
|
|
5351
5356
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5352
5357
|
/**
|
|
5353
5358
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5355
5360
|
*/
|
|
5356
5361
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5357
5362
|
/**
|
|
5358
5363
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
|
|
5360
5365
|
*/
|
|
5361
5366
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5362
5367
|
/**
|
|
5363
5368
|
* Enforce better string content.
|
|
5364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
|
|
5365
5370
|
*/
|
|
5366
5371
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5367
5372
|
/**
|
|
5368
5373
|
* Enforce consistent brace style for `case` clauses.
|
|
5369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
|
|
5370
5375
|
*/
|
|
5371
5376
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5372
5377
|
/**
|
|
5373
5378
|
* Fix whitespace-insensitive template indentation.
|
|
5374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
|
|
5375
5380
|
*/
|
|
5376
5381
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5377
5382
|
/**
|
|
5378
5383
|
* Enforce consistent case for text encoding identifiers.
|
|
5379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5380
5385
|
*/
|
|
5381
5386
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
5382
5387
|
/**
|
|
5383
5388
|
* Require `new` when creating an error.
|
|
5384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
|
|
5385
5390
|
*/
|
|
5386
5391
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5387
5392
|
/**
|
|
@@ -13884,7 +13889,15 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
13884
13889
|
}
|
|
13885
13890
|
interface _UnicornImportStyle_BooleanObject {
|
|
13886
13891
|
[k: string]: boolean | undefined;
|
|
13887
|
-
} // ----- unicorn/
|
|
13892
|
+
} // ----- unicorn/isolated-functions -----
|
|
13893
|
+
type UnicornIsolatedFunctions = [] | [{
|
|
13894
|
+
overrideGlobals?: {
|
|
13895
|
+
[k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined;
|
|
13896
|
+
};
|
|
13897
|
+
functions?: string[];
|
|
13898
|
+
selectors?: string[];
|
|
13899
|
+
comments?: string[];
|
|
13900
|
+
}]; // ----- unicorn/no-array-reduce -----
|
|
13888
13901
|
type UnicornNoArrayReduce = [] | [{
|
|
13889
13902
|
allowSimpleOperations?: boolean;
|
|
13890
13903
|
}]; // ----- unicorn/no-array-reverse -----
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ivanmaxlogiudice/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.3",
|
|
5
5
|
"packageManager": "bun@1.3.5",
|
|
6
6
|
"description": "Personal ESLint config",
|
|
7
7
|
"license": "MIT",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"@vitest/eslint-plugin": "^1.6.7",
|
|
75
75
|
"ansis": "^4.2.0",
|
|
76
76
|
"cac": "^6.7.14",
|
|
77
|
-
"eslint-plugin-antfu": "^3.2.
|
|
77
|
+
"eslint-plugin-antfu": "^3.2.1",
|
|
78
78
|
"eslint-plugin-import-lite": "^0.5.0",
|
|
79
79
|
"eslint-plugin-jsdoc": "^62.5.4",
|
|
80
80
|
"eslint-plugin-jsonc": "^2.21.1",
|
|
81
81
|
"eslint-plugin-n": "^17.23.2",
|
|
82
82
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
83
83
|
"eslint-plugin-perfectionist": "^5.5.0",
|
|
84
|
-
"eslint-plugin-unicorn": "^
|
|
84
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
85
85
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
86
86
|
"eslint-plugin-vue": "^10.7.0",
|
|
87
87
|
"globals": "^17.3.0",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@eslint/config-inspector": "^1.4.2",
|
|
95
|
-
"@types/bun": "^1.3.
|
|
96
|
-
"@types/node": "^25.2.
|
|
95
|
+
"@types/bun": "^1.3.9",
|
|
96
|
+
"@types/node": "^25.2.3",
|
|
97
97
|
"@unocss/eslint-plugin": "^66.6.0",
|
|
98
98
|
"bumpp": "^10.4.1",
|
|
99
99
|
"eslint": "^10.0.0",
|