@eienjs/eslint-config 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/{constants_generated.js → constants_generated.mjs} +3 -3
- package/dist/cli/{index.js → index.mjs} +2 -2
- package/dist/cli/{run.js → run.mjs} +5 -5
- package/dist/cli/stages/{update_eslint_files.js → update_eslint_files.mjs} +1 -1
- package/dist/cli/stages/{update_package_json.js → update_package_json.mjs} +3 -3
- package/dist/cli/stages/{update_vscode_settings.js → update_vscode_settings.mjs} +1 -1
- package/dist/configs/{adonisjs.d.ts → adonisjs.d.mts} +1 -1
- package/dist/configs/{adonisjs.js → adonisjs.mjs} +7 -4
- package/dist/configs/{astro.d.ts → astro.d.mts} +1 -1
- package/dist/configs/{astro.js → astro.mjs} +2 -2
- package/dist/configs/{command.d.ts → command.d.mts} +1 -1
- package/dist/configs/{comments.d.ts → comments.d.mts} +1 -1
- package/dist/configs/{comments.js → comments.mjs} +1 -1
- package/dist/configs/{disables.d.ts → disables.d.mts} +1 -1
- package/dist/configs/{disables.js → disables.mjs} +1 -1
- package/dist/configs/{formatters.d.ts → formatters.d.mts} +1 -1
- package/dist/configs/{formatters.js → formatters.mjs} +3 -3
- package/dist/configs/ignores.d.mts +6 -0
- package/dist/configs/ignores.mjs +14 -0
- package/dist/configs/{imports.d.ts → imports.d.mts} +1 -1
- package/dist/configs/{imports.js → imports.mjs} +1 -1
- package/dist/configs/index.d.mts +26 -0
- package/dist/configs/index.mjs +27 -0
- package/dist/configs/{javascript.d.ts → javascript.d.mts} +1 -1
- package/dist/configs/{javascript.js → javascript.mjs} +1 -1
- package/dist/configs/{jsdoc.d.ts → jsdoc.d.mts} +1 -1
- package/dist/configs/{jsdoc.js → jsdoc.mjs} +1 -1
- package/dist/configs/{jsonc.d.ts → jsonc.d.mts} +1 -1
- package/dist/configs/{jsonc.js → jsonc.mjs} +2 -2
- package/dist/configs/{markdown.d.ts → markdown.d.mts} +1 -1
- package/dist/configs/{markdown.js → markdown.mjs} +2 -2
- package/dist/configs/{node.d.ts → node.d.mts} +1 -1
- package/dist/configs/{node.js → node.mjs} +1 -1
- package/dist/configs/{nuxt.d.ts → nuxt.d.mts} +1 -1
- package/dist/configs/{nuxt.js → nuxt.mjs} +2 -2
- package/dist/configs/{perfectionist.d.ts → perfectionist.d.mts} +1 -1
- package/dist/configs/{perfectionist.js → perfectionist.mjs} +1 -1
- package/dist/configs/{pnpm.d.ts → pnpm.d.mts} +1 -1
- package/dist/configs/{pnpm.js → pnpm.mjs} +1 -1
- package/dist/configs/{regexp.d.ts → regexp.d.mts} +1 -1
- package/dist/configs/{sort.d.ts → sort.d.mts} +1 -1
- package/dist/configs/{stylistic.d.ts → stylistic.d.mts} +1 -1
- package/dist/configs/{stylistic.js → stylistic.mjs} +2 -2
- package/dist/configs/{test.d.ts → test.d.mts} +1 -1
- package/dist/configs/{test.js → test.mjs} +2 -2
- package/dist/configs/{toml.d.ts → toml.d.mts} +1 -1
- package/dist/configs/{toml.js → toml.mjs} +2 -2
- package/dist/configs/{typescript.d.ts → typescript.d.mts} +1 -1
- package/dist/configs/{typescript.js → typescript.mjs} +4 -3
- package/dist/configs/{unicorn.d.ts → unicorn.d.mts} +1 -1
- package/dist/configs/{unicorn.js → unicorn.mjs} +2 -2
- package/dist/configs/{vue.d.ts → vue.d.mts} +1 -1
- package/dist/configs/{vue.js → vue.mjs} +2 -2
- package/dist/configs/{yaml.d.ts → yaml.d.mts} +1 -1
- package/dist/configs/{yaml.js → yaml.mjs} +2 -2
- package/dist/{factory.d.ts → factory.d.mts} +2 -2
- package/dist/{factory.js → factory.mjs} +29 -29
- package/dist/{index.d.ts → index.d.mts} +5 -5
- package/dist/{index.js → index.mjs} +3 -3
- package/dist/package.mjs +5 -0
- package/dist/{typegen.d.ts → typegen.d.mts} +344 -145
- package/dist/{types.d.ts → types.d.mts} +11 -2
- package/dist/{utils.d.ts → utils.d.mts} +1 -1
- package/package.json +29 -33
- package/dist/configs/ignores.d.ts +0 -6
- package/dist/configs/ignores.js +0 -12
- package/dist/configs/index.d.ts +0 -26
- package/dist/configs/index.js +0 -27
- package/dist/package.js +0 -5
- /package/dist/cli/{constants.js → constants.mjs} +0 -0
- /package/dist/cli/{index.d.ts → index.d.mts} +0 -0
- /package/dist/cli/{utils.js → utils.mjs} +0 -0
- /package/dist/configs/{command.js → command.mjs} +0 -0
- /package/dist/configs/{regexp.js → regexp.mjs} +0 -0
- /package/dist/configs/{sort.js → sort.mjs} +0 -0
- /package/dist/{globs.d.ts → globs.d.mts} +0 -0
- /package/dist/{globs.js → globs.mjs} +0 -0
- /package/dist/{plugins.js → plugins.mjs} +0 -0
- /package/dist/{utils.js → utils.mjs} +0 -0
- /package/dist/vendored/{prettier_types.d.ts → prettier_types.d.mts} +0 -0
|
@@ -128,6 +128,11 @@ interface RuleOptions {
|
|
|
128
128
|
* @see https://eslint.style/rules/eol-last
|
|
129
129
|
*/
|
|
130
130
|
'@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
|
|
131
|
+
/**
|
|
132
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
133
|
+
* @see https://eslint.style/rules/list-style
|
|
134
|
+
*/
|
|
135
|
+
'@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle>;
|
|
131
136
|
/**
|
|
132
137
|
* Enforce line breaks between arguments of a function call
|
|
133
138
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -1522,6 +1527,11 @@ interface RuleOptions {
|
|
|
1522
1527
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/
|
|
1523
1528
|
*/
|
|
1524
1529
|
'astro/no-set-text-directive'?: Linter.RuleEntry<[]>;
|
|
1530
|
+
/**
|
|
1531
|
+
* disallow inline `<script>` without `src` to encourage CSP-safe patterns
|
|
1532
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unsafe-inline-scripts/
|
|
1533
|
+
*/
|
|
1534
|
+
'astro/no-unsafe-inline-scripts'?: Linter.RuleEntry<AstroNoUnsafeInlineScripts>;
|
|
1525
1535
|
/**
|
|
1526
1536
|
* disallow selectors defined in `style` tag that don't use in HTML
|
|
1527
1537
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/
|
|
@@ -1618,6 +1628,11 @@ interface RuleOptions {
|
|
|
1618
1628
|
* @deprecated
|
|
1619
1629
|
*/
|
|
1620
1630
|
'comma-style'?: Linter.RuleEntry<CommaStyle>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Comment-as-command for one-off codemod with ESLint
|
|
1633
|
+
* @see https://github.com/antfu/eslint-plugin-command
|
|
1634
|
+
*/
|
|
1635
|
+
'command/command'?: Linter.RuleEntry<[]>;
|
|
1621
1636
|
/**
|
|
1622
1637
|
* Enforce a maximum cyclomatic complexity allowed in a program
|
|
1623
1638
|
* @see https://eslint.org/docs/latest/rules/complexity
|
|
@@ -1686,6 +1701,26 @@ interface RuleOptions {
|
|
|
1686
1701
|
* @see https://eslint.org/docs/latest/rules/eqeqeq
|
|
1687
1702
|
*/
|
|
1688
1703
|
'eqeqeq'?: Linter.RuleEntry<Eqeqeq>;
|
|
1704
|
+
/**
|
|
1705
|
+
* Avoid using TypeScript's enums.
|
|
1706
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/enums.md
|
|
1707
|
+
*/
|
|
1708
|
+
'erasable-syntax-only/enums'?: Linter.RuleEntry<[]>;
|
|
1709
|
+
/**
|
|
1710
|
+
* Avoid using TypeScript's import aliases.
|
|
1711
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/import-aliases.md
|
|
1712
|
+
*/
|
|
1713
|
+
'erasable-syntax-only/import-aliases'?: Linter.RuleEntry<[]>;
|
|
1714
|
+
/**
|
|
1715
|
+
* Avoid using TypeScript's namespaces.
|
|
1716
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/namespaces.md
|
|
1717
|
+
*/
|
|
1718
|
+
'erasable-syntax-only/namespaces'?: Linter.RuleEntry<[]>;
|
|
1719
|
+
/**
|
|
1720
|
+
* Avoid using TypeScript's class parameter properties.
|
|
1721
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/parameter-properties.md
|
|
1722
|
+
*/
|
|
1723
|
+
'erasable-syntax-only/parameter-properties'?: Linter.RuleEntry<[]>;
|
|
1689
1724
|
/**
|
|
1690
1725
|
* Enforce `for` loop update clause moving the counter in the right direction
|
|
1691
1726
|
* @see https://eslint.org/docs/latest/rules/for-direction
|
|
@@ -2184,6 +2219,26 @@ interface RuleOptions {
|
|
|
2184
2219
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
2185
2220
|
*/
|
|
2186
2221
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
2222
|
+
/**
|
|
2223
|
+
* Prefers either function properties or method signatures
|
|
2224
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
|
|
2225
|
+
*/
|
|
2226
|
+
'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>;
|
|
2227
|
+
/**
|
|
2228
|
+
* Warns against use of the empty object type
|
|
2229
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
|
|
2230
|
+
*/
|
|
2231
|
+
'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]>;
|
|
2232
|
+
/**
|
|
2233
|
+
* Catches unnecessary template expressions such as string expressions within a template literal.
|
|
2234
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
|
|
2235
|
+
*/
|
|
2236
|
+
'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>;
|
|
2237
|
+
/**
|
|
2238
|
+
* Prefers function types over call signatures when there are no other properties.
|
|
2239
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
|
|
2240
|
+
*/
|
|
2241
|
+
'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType>;
|
|
2187
2242
|
/**
|
|
2188
2243
|
* Formats JSDoc type values.
|
|
2189
2244
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
@@ -3841,6 +3896,36 @@ interface RuleOptions {
|
|
|
3841
3896
|
* @see https://perfectionist.dev/rules/sort-variable-declarations
|
|
3842
3897
|
*/
|
|
3843
3898
|
'perfectionist/sort-variable-declarations'?: Linter.RuleEntry<PerfectionistSortVariableDeclarations>;
|
|
3899
|
+
/**
|
|
3900
|
+
* Enforce using "catalog:" in `package.json`
|
|
3901
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-enforce-catalog.test.ts
|
|
3902
|
+
*/
|
|
3903
|
+
'pnpm/json-enforce-catalog'?: Linter.RuleEntry<PnpmJsonEnforceCatalog>;
|
|
3904
|
+
/**
|
|
3905
|
+
* Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037.
|
|
3906
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-prefer-workspace-settings.test.ts
|
|
3907
|
+
*/
|
|
3908
|
+
'pnpm/json-prefer-workspace-settings'?: Linter.RuleEntry<PnpmJsonPreferWorkspaceSettings>;
|
|
3909
|
+
/**
|
|
3910
|
+
* Enforce using valid catalog in `package.json`
|
|
3911
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-valid-catalog.test.ts
|
|
3912
|
+
*/
|
|
3913
|
+
'pnpm/json-valid-catalog'?: Linter.RuleEntry<PnpmJsonValidCatalog>;
|
|
3914
|
+
/**
|
|
3915
|
+
* Disallow duplicate catalog items in `pnpm-workspace.yaml`
|
|
3916
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-duplicate-catalog-item.test.ts
|
|
3917
|
+
*/
|
|
3918
|
+
'pnpm/yaml-no-duplicate-catalog-item'?: Linter.RuleEntry<PnpmYamlNoDuplicateCatalogItem>;
|
|
3919
|
+
/**
|
|
3920
|
+
* Disallow unused catalogs in `pnpm-workspace.yaml`
|
|
3921
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-unused-catalog-item.test.ts
|
|
3922
|
+
*/
|
|
3923
|
+
'pnpm/yaml-no-unused-catalog-item'?: Linter.RuleEntry<[]>;
|
|
3924
|
+
/**
|
|
3925
|
+
* Ensure all package patterns in `pnpm-workspace.yaml` match at least one directory
|
|
3926
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-valid-packages.test.ts
|
|
3927
|
+
*/
|
|
3928
|
+
'pnpm/yaml-valid-packages'?: Linter.RuleEntry<[]>;
|
|
3844
3929
|
/**
|
|
3845
3930
|
* Require using arrow functions for callbacks
|
|
3846
3931
|
* @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
|
|
@@ -4468,7 +4553,7 @@ interface RuleOptions {
|
|
|
4468
4553
|
*/
|
|
4469
4554
|
'template-tag-spacing'?: Linter.RuleEntry<TemplateTagSpacing>;
|
|
4470
4555
|
/**
|
|
4471
|
-
* require
|
|
4556
|
+
* require test file pattern
|
|
4472
4557
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
4473
4558
|
*/
|
|
4474
4559
|
'test/consistent-test-filename'?: Linter.RuleEntry<TestConsistentTestFilename>;
|
|
@@ -4966,710 +5051,725 @@ interface RuleOptions {
|
|
|
4966
5051
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
4967
5052
|
/**
|
|
4968
5053
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
4969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
4970
5055
|
*/
|
|
4971
5056
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
4972
5057
|
/**
|
|
4973
5058
|
* Enforce a specific parameter name in catch clauses.
|
|
4974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
4975
5060
|
*/
|
|
4976
5061
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
4977
5062
|
/**
|
|
4978
5063
|
* Enforce consistent assertion style with `node:assert`.
|
|
4979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
4980
5065
|
*/
|
|
4981
5066
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
4982
5067
|
/**
|
|
4983
5068
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
4984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
4985
5070
|
*/
|
|
4986
5071
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
4987
5072
|
/**
|
|
4988
5073
|
* Use destructured variables over properties.
|
|
4989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
4990
5075
|
*/
|
|
4991
5076
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
4992
5077
|
/**
|
|
4993
5078
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
4994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
4995
5080
|
*/
|
|
4996
5081
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
4997
5082
|
/**
|
|
4998
5083
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
4999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
5000
5085
|
*/
|
|
5001
5086
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5002
5087
|
/**
|
|
5003
5088
|
* Move function definitions to the highest possible scope.
|
|
5004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
5005
5090
|
*/
|
|
5006
5091
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5007
5092
|
/**
|
|
5008
5093
|
* Enforce correct `Error` subclassing.
|
|
5009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
5010
5095
|
*/
|
|
5011
5096
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5012
5097
|
/**
|
|
5013
5098
|
* Enforce no spaces between braces.
|
|
5014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
5015
5100
|
*/
|
|
5016
5101
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5017
5102
|
/**
|
|
5018
5103
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
5020
5105
|
*/
|
|
5021
5106
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5022
5107
|
/**
|
|
5023
5108
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
5025
5110
|
*/
|
|
5026
5111
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5027
5112
|
/**
|
|
5028
5113
|
* Add expiration conditions to TODO comments.
|
|
5029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
5030
5115
|
*/
|
|
5031
5116
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5032
5117
|
/**
|
|
5033
5118
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
5035
5120
|
*/
|
|
5036
5121
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5037
5122
|
/**
|
|
5038
5123
|
* Enforce a case style for filenames.
|
|
5039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
5040
5125
|
*/
|
|
5041
5126
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5042
5127
|
/**
|
|
5043
5128
|
* Enforce specific import styles per module.
|
|
5044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
5045
5130
|
*/
|
|
5046
5131
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5047
5132
|
/**
|
|
5048
5133
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
5050
5135
|
*/
|
|
5051
5136
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5052
5137
|
/**
|
|
5053
5138
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5055
5140
|
*/
|
|
5056
5141
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5057
5142
|
/**
|
|
5058
5143
|
* Disallow recursive access to `this` within getters and setters.
|
|
5059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
5060
5145
|
*/
|
|
5061
5146
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5062
5147
|
/**
|
|
5063
5148
|
* Disallow anonymous functions and classes as the default export.
|
|
5064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
5065
5150
|
*/
|
|
5066
5151
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5067
5152
|
/**
|
|
5068
5153
|
* Prevent passing a function reference directly to iterator methods.
|
|
5069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
5070
5155
|
*/
|
|
5071
5156
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5072
5157
|
/**
|
|
5073
5158
|
* Prefer `for…of` over the `forEach` method.
|
|
5074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
5075
5160
|
*/
|
|
5076
5161
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5077
5162
|
/**
|
|
5078
5163
|
* Disallow using the `this` argument in array methods.
|
|
5079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
5080
5165
|
*/
|
|
5081
5166
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5082
5167
|
/**
|
|
5083
5168
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
5085
5170
|
* @deprecated
|
|
5086
5171
|
*/
|
|
5087
5172
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5088
5173
|
/**
|
|
5089
5174
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
5091
5176
|
*/
|
|
5092
5177
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5093
5178
|
/**
|
|
5094
5179
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
5096
5181
|
*/
|
|
5097
5182
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5098
5183
|
/**
|
|
5099
5184
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
5101
5186
|
*/
|
|
5102
5187
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5103
5188
|
/**
|
|
5104
5189
|
* Disallow member access from await expression.
|
|
5105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
5106
5191
|
*/
|
|
5107
5192
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5108
5193
|
/**
|
|
5109
5194
|
* Disallow using `await` in `Promise` method parameters.
|
|
5110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5111
5196
|
*/
|
|
5112
5197
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5113
5198
|
/**
|
|
5114
5199
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
5116
5201
|
*/
|
|
5117
5202
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5118
5203
|
/**
|
|
5119
5204
|
* Do not use `document.cookie` directly.
|
|
5120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
5121
5206
|
*/
|
|
5122
5207
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5123
5208
|
/**
|
|
5124
5209
|
* Disallow empty files.
|
|
5125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
5126
5211
|
*/
|
|
5127
5212
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5128
5213
|
/**
|
|
5129
5214
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
5131
5216
|
*/
|
|
5132
5217
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5133
5218
|
/**
|
|
5134
5219
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
5136
5221
|
*/
|
|
5137
5222
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5223
|
+
/**
|
|
5224
|
+
* Disallow immediate mutation after variable assignment.
|
|
5225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
5226
|
+
*/
|
|
5227
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5138
5228
|
/**
|
|
5139
5229
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5141
5231
|
* @deprecated
|
|
5142
5232
|
*/
|
|
5143
5233
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5144
5234
|
/**
|
|
5145
5235
|
* Disallow `instanceof` with built-in objects
|
|
5146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
5147
5237
|
*/
|
|
5148
5238
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5149
5239
|
/**
|
|
5150
5240
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5152
5242
|
*/
|
|
5153
5243
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5154
5244
|
/**
|
|
5155
5245
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5157
5247
|
*/
|
|
5158
5248
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5159
5249
|
/**
|
|
5160
5250
|
* Disallow identifiers starting with `new` or `class`.
|
|
5161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
5162
5252
|
*/
|
|
5163
5253
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5164
5254
|
/**
|
|
5165
5255
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5167
5257
|
* @deprecated
|
|
5168
5258
|
*/
|
|
5169
5259
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5170
5260
|
/**
|
|
5171
5261
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
5173
5263
|
*/
|
|
5174
5264
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5175
5265
|
/**
|
|
5176
5266
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5178
5268
|
*/
|
|
5179
5269
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5180
5270
|
/**
|
|
5181
5271
|
* Disallow named usage of default import and export.
|
|
5182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
5183
5273
|
*/
|
|
5184
5274
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5185
5275
|
/**
|
|
5186
5276
|
* Disallow negated conditions.
|
|
5187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
5188
5278
|
*/
|
|
5189
5279
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5190
5280
|
/**
|
|
5191
5281
|
* Disallow negated expression in equality check.
|
|
5192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5193
5283
|
*/
|
|
5194
5284
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5195
5285
|
/**
|
|
5196
5286
|
* Disallow nested ternary expressions.
|
|
5197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
5198
5288
|
*/
|
|
5199
5289
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5200
5290
|
/**
|
|
5201
5291
|
* Disallow `new Array()`.
|
|
5202
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
5203
5293
|
*/
|
|
5204
5294
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5205
5295
|
/**
|
|
5206
5296
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5207
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
5208
5298
|
*/
|
|
5209
5299
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5210
5300
|
/**
|
|
5211
5301
|
* Disallow the use of the `null` literal.
|
|
5212
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
5213
5303
|
*/
|
|
5214
5304
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5215
5305
|
/**
|
|
5216
5306
|
* Disallow the use of objects as default parameters.
|
|
5217
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5307
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5218
5308
|
*/
|
|
5219
5309
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5220
5310
|
/**
|
|
5221
5311
|
* Disallow `process.exit()`.
|
|
5222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5312
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
5223
5313
|
*/
|
|
5224
5314
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5225
5315
|
/**
|
|
5226
5316
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5227
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5228
5318
|
*/
|
|
5229
5319
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5230
5320
|
/**
|
|
5231
5321
|
* Disallow classes that only have static members.
|
|
5232
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
5233
5323
|
*/
|
|
5234
5324
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5235
5325
|
/**
|
|
5236
5326
|
* Disallow `then` property.
|
|
5237
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
5238
5328
|
*/
|
|
5239
5329
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5240
5330
|
/**
|
|
5241
5331
|
* Disallow assigning `this` to a variable.
|
|
5242
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
5243
5333
|
*/
|
|
5244
5334
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5245
5335
|
/**
|
|
5246
5336
|
* Disallow comparing `undefined` using `typeof`.
|
|
5247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
5248
5338
|
*/
|
|
5249
5339
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5250
5340
|
/**
|
|
5251
5341
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5252
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5253
5343
|
*/
|
|
5254
5344
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5255
5345
|
/**
|
|
5256
5346
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5258
5348
|
*/
|
|
5259
5349
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5260
5350
|
/**
|
|
5261
5351
|
* Disallow awaiting non-promise values.
|
|
5262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
5263
5353
|
*/
|
|
5264
5354
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5265
5355
|
/**
|
|
5266
5356
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5268
5358
|
*/
|
|
5269
5359
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5270
5360
|
/**
|
|
5271
5361
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5273
5363
|
*/
|
|
5274
5364
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5275
5365
|
/**
|
|
5276
5366
|
* Disallow unreadable array destructuring.
|
|
5277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5278
5368
|
*/
|
|
5279
5369
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5280
5370
|
/**
|
|
5281
5371
|
* Disallow unreadable IIFEs.
|
|
5282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
5283
5373
|
*/
|
|
5284
5374
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5285
5375
|
/**
|
|
5286
5376
|
* Disallow unused object properties.
|
|
5287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
5288
5378
|
*/
|
|
5289
5379
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5380
|
+
/**
|
|
5381
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
5383
|
+
*/
|
|
5384
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5290
5385
|
/**
|
|
5291
5386
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5293
5388
|
*/
|
|
5294
5389
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5295
5390
|
/**
|
|
5296
5391
|
* Disallow useless fallback when spreading in object literals.
|
|
5297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5298
5393
|
*/
|
|
5299
5394
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5300
5395
|
/**
|
|
5301
5396
|
* Disallow useless array length check.
|
|
5302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
5303
5398
|
*/
|
|
5304
5399
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5305
5400
|
/**
|
|
5306
5401
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5308
5403
|
*/
|
|
5309
5404
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5310
5405
|
/**
|
|
5311
5406
|
* Disallow unnecessary spread.
|
|
5312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
5313
5408
|
*/
|
|
5314
5409
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5315
5410
|
/**
|
|
5316
5411
|
* Disallow useless case in switch statements.
|
|
5317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
5318
5413
|
*/
|
|
5319
5414
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5320
5415
|
/**
|
|
5321
5416
|
* Disallow useless `undefined`.
|
|
5322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
5323
5418
|
*/
|
|
5324
5419
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5325
5420
|
/**
|
|
5326
5421
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
5328
5423
|
*/
|
|
5329
5424
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5330
5425
|
/**
|
|
5331
5426
|
* Enforce proper case for numeric literals.
|
|
5332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
5333
5428
|
*/
|
|
5334
5429
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5335
5430
|
/**
|
|
5336
5431
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
5338
5433
|
*/
|
|
5339
5434
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5340
5435
|
/**
|
|
5341
5436
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
5343
5438
|
*/
|
|
5344
5439
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5345
5440
|
/**
|
|
5346
5441
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
5348
5443
|
*/
|
|
5349
5444
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5350
5445
|
/**
|
|
5351
5446
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
5353
5448
|
*/
|
|
5354
5449
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5355
5450
|
/**
|
|
5356
5451
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
5358
5453
|
*/
|
|
5359
5454
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5360
5455
|
/**
|
|
5361
5456
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
5363
5458
|
*/
|
|
5364
5459
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5365
5460
|
/**
|
|
5366
5461
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
5368
5463
|
*/
|
|
5369
5464
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5370
5465
|
/**
|
|
5371
5466
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
5373
5468
|
*/
|
|
5374
5469
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5375
5470
|
/**
|
|
5376
5471
|
* Prefer `BigInt` literals over the constructor.
|
|
5377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
5378
5473
|
*/
|
|
5379
5474
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5380
5475
|
/**
|
|
5381
5476
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5383
5478
|
*/
|
|
5384
5479
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5385
5480
|
/**
|
|
5386
5481
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
5388
5483
|
*/
|
|
5389
5484
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5390
5485
|
/**
|
|
5391
5486
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5393
5488
|
*/
|
|
5394
5489
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5395
5490
|
/**
|
|
5396
5491
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
5398
5493
|
*/
|
|
5399
5494
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5400
5495
|
/**
|
|
5401
5496
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
5403
5498
|
*/
|
|
5404
5499
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5405
5500
|
/**
|
|
5406
5501
|
* Prefer default parameters over reassignment.
|
|
5407
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
5408
5503
|
*/
|
|
5409
5504
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5410
5505
|
/**
|
|
5411
5506
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5412
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
5413
5508
|
*/
|
|
5414
5509
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5415
5510
|
/**
|
|
5416
5511
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5418
5513
|
*/
|
|
5419
5514
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5420
5515
|
/**
|
|
5421
5516
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5423
5518
|
*/
|
|
5424
5519
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5425
5520
|
/**
|
|
5426
5521
|
* Prefer `.textContent` over `.innerText`.
|
|
5427
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5428
5523
|
*/
|
|
5429
5524
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5430
5525
|
/**
|
|
5431
5526
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5432
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
5433
5528
|
*/
|
|
5434
5529
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5435
5530
|
/**
|
|
5436
5531
|
* Prefer `export…from` when re-exporting.
|
|
5437
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
5438
5533
|
*/
|
|
5439
5534
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5440
5535
|
/**
|
|
5441
5536
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
5443
5538
|
*/
|
|
5444
5539
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5445
5540
|
/**
|
|
5446
5541
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5448
5543
|
*/
|
|
5449
5544
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5450
5545
|
/**
|
|
5451
5546
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
5453
5548
|
*/
|
|
5454
5549
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5455
5550
|
/**
|
|
5456
5551
|
* Prefer reading a JSON file as a buffer.
|
|
5457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5458
5553
|
*/
|
|
5459
5554
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5460
5555
|
/**
|
|
5461
5556
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5463
5558
|
*/
|
|
5464
5559
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5465
5560
|
/**
|
|
5466
5561
|
* Prefer using a logical operator over a ternary.
|
|
5467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5468
5563
|
*/
|
|
5469
5564
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5470
5565
|
/**
|
|
5471
5566
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
5473
5568
|
*/
|
|
5474
5569
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5475
5570
|
/**
|
|
5476
5571
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
5478
5573
|
*/
|
|
5479
5574
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5480
5575
|
/**
|
|
5481
5576
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5483
5578
|
*/
|
|
5484
5579
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5485
5580
|
/**
|
|
5486
5581
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5488
5583
|
*/
|
|
5489
5584
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5490
5585
|
/**
|
|
5491
5586
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
5493
5588
|
*/
|
|
5494
5589
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5495
5590
|
/**
|
|
5496
5591
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5498
5593
|
*/
|
|
5499
5594
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5500
5595
|
/**
|
|
5501
5596
|
* Prefer negative index over `.length - index` when possible.
|
|
5502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
5503
5598
|
*/
|
|
5504
5599
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5505
5600
|
/**
|
|
5506
5601
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
5508
5603
|
*/
|
|
5509
5604
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5510
5605
|
/**
|
|
5511
5606
|
* Prefer `Number` static properties over global ones.
|
|
5512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
5513
5608
|
*/
|
|
5514
5609
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5515
5610
|
/**
|
|
5516
5611
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
5518
5613
|
*/
|
|
5519
5614
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5520
5615
|
/**
|
|
5521
5616
|
* Prefer omitting the `catch` binding parameter.
|
|
5522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5523
5618
|
*/
|
|
5524
5619
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5525
5620
|
/**
|
|
5526
5621
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
5528
5623
|
*/
|
|
5529
5624
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5530
5625
|
/**
|
|
5531
5626
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
5533
5628
|
*/
|
|
5534
5629
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5535
5630
|
/**
|
|
5536
5631
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
5538
5633
|
*/
|
|
5539
5634
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5540
5635
|
/**
|
|
5541
5636
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
5543
5638
|
*/
|
|
5544
5639
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5640
|
+
/**
|
|
5641
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
5643
|
+
*/
|
|
5644
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5545
5645
|
/**
|
|
5546
5646
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
5548
5648
|
*/
|
|
5549
5649
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5550
5650
|
/**
|
|
5551
5651
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
5553
5653
|
*/
|
|
5554
5654
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5555
5655
|
/**
|
|
5556
5656
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
5558
5658
|
*/
|
|
5559
5659
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5560
5660
|
/**
|
|
5561
5661
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
5563
5663
|
*/
|
|
5564
5664
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5565
5665
|
/**
|
|
5566
5666
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
5568
5668
|
*/
|
|
5569
5669
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5570
5670
|
/**
|
|
5571
5671
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
5573
5673
|
*/
|
|
5574
5674
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5575
5675
|
/**
|
|
5576
5676
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
5578
5678
|
*/
|
|
5579
5679
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5580
5680
|
/**
|
|
5581
5681
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5583
5683
|
*/
|
|
5584
5684
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5585
5685
|
/**
|
|
5586
5686
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5588
5688
|
*/
|
|
5589
5689
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5590
5690
|
/**
|
|
5591
5691
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
5593
5693
|
*/
|
|
5594
5694
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5595
5695
|
/**
|
|
5596
5696
|
* Prefer `switch` over multiple `else-if`.
|
|
5597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
5598
5698
|
*/
|
|
5599
5699
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5600
5700
|
/**
|
|
5601
5701
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
5603
5703
|
*/
|
|
5604
5704
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5605
5705
|
/**
|
|
5606
5706
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
5608
5708
|
*/
|
|
5609
5709
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5610
5710
|
/**
|
|
5611
5711
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
5613
5713
|
*/
|
|
5614
5714
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5615
5715
|
/**
|
|
5616
5716
|
* Prevent abbreviations.
|
|
5617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
5618
5718
|
*/
|
|
5619
5719
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5620
5720
|
/**
|
|
5621
5721
|
* Enforce consistent relative URL style.
|
|
5622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
5623
5723
|
*/
|
|
5624
5724
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5625
5725
|
/**
|
|
5626
5726
|
* Enforce using the separator argument with `Array#join()`.
|
|
5627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
5628
5728
|
*/
|
|
5629
5729
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5630
5730
|
/**
|
|
5631
5731
|
* Require non-empty module attributes for imports and exports
|
|
5632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
5633
5733
|
*/
|
|
5634
5734
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5635
5735
|
/**
|
|
5636
5736
|
* Require non-empty specifier list in import and export statements.
|
|
5637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
5638
5738
|
*/
|
|
5639
5739
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5640
5740
|
/**
|
|
5641
5741
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5643
5743
|
*/
|
|
5644
5744
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5645
5745
|
/**
|
|
5646
5746
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
5648
5748
|
*/
|
|
5649
5749
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5650
5750
|
/**
|
|
5651
5751
|
* Enforce better string content.
|
|
5652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
5653
5753
|
*/
|
|
5654
5754
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5655
5755
|
/**
|
|
5656
5756
|
* Enforce consistent brace style for `case` clauses.
|
|
5657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
5658
5758
|
*/
|
|
5659
5759
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5660
5760
|
/**
|
|
5661
5761
|
* Fix whitespace-insensitive template indentation.
|
|
5662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
5663
5763
|
*/
|
|
5664
5764
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5665
5765
|
/**
|
|
5666
5766
|
* Enforce consistent case for text encoding identifiers.
|
|
5667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5668
5768
|
*/
|
|
5669
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
5769
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
5670
5770
|
/**
|
|
5671
5771
|
* Require `new` when creating an error.
|
|
5672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
5673
5773
|
*/
|
|
5674
5774
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5675
5775
|
/**
|
|
@@ -7296,6 +7396,50 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
|
|
|
7296
7396
|
type StylisticDotLocation = [] | [("object" | "property")];
|
|
7297
7397
|
// ----- @stylistic/eol-last -----
|
|
7298
7398
|
type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
7399
|
+
// ----- @stylistic/exp-list-style -----
|
|
7400
|
+
type StylisticExpListStyle = [] | [{
|
|
7401
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
7402
|
+
multiLine?: _StylisticExpListStyle_MultiLineConfig;
|
|
7403
|
+
overrides?: {
|
|
7404
|
+
"[]"?: _StylisticExpListStyle_BaseConfig;
|
|
7405
|
+
"{}"?: _StylisticExpListStyle_BaseConfig;
|
|
7406
|
+
"<>"?: _StylisticExpListStyle_BaseConfig;
|
|
7407
|
+
"()"?: _StylisticExpListStyle_BaseConfig;
|
|
7408
|
+
ArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7409
|
+
ArrayPattern?: _StylisticExpListStyle_BaseConfig;
|
|
7410
|
+
ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7411
|
+
CallExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7412
|
+
ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7413
|
+
FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7414
|
+
FunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7415
|
+
ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7416
|
+
ImportAttributes?: _StylisticExpListStyle_BaseConfig;
|
|
7417
|
+
NewExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7418
|
+
ObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7419
|
+
ObjectPattern?: _StylisticExpListStyle_BaseConfig;
|
|
7420
|
+
TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
|
|
7421
|
+
TSFunctionType?: _StylisticExpListStyle_BaseConfig;
|
|
7422
|
+
TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
|
|
7423
|
+
TSEnumBody?: _StylisticExpListStyle_BaseConfig;
|
|
7424
|
+
TSTupleType?: _StylisticExpListStyle_BaseConfig;
|
|
7425
|
+
TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
|
|
7426
|
+
TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7427
|
+
TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
|
|
7428
|
+
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7429
|
+
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7430
|
+
};
|
|
7431
|
+
}];
|
|
7432
|
+
interface _StylisticExpListStyle_SingleLineConfig {
|
|
7433
|
+
spacing?: ("always" | "never");
|
|
7434
|
+
maxItems?: number;
|
|
7435
|
+
}
|
|
7436
|
+
interface _StylisticExpListStyle_MultiLineConfig {
|
|
7437
|
+
minItems?: number;
|
|
7438
|
+
}
|
|
7439
|
+
interface _StylisticExpListStyle_BaseConfig {
|
|
7440
|
+
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
7441
|
+
multiline?: _StylisticExpListStyle_MultiLineConfig;
|
|
7442
|
+
}
|
|
7299
7443
|
// ----- @stylistic/function-call-argument-newline -----
|
|
7300
7444
|
type StylisticFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
|
|
7301
7445
|
// ----- @stylistic/function-call-spacing -----
|
|
@@ -7365,7 +7509,11 @@ type StylisticIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
7365
7509
|
ObjectExpression?: (number | ("first" | "off"));
|
|
7366
7510
|
ImportDeclaration?: (number | ("first" | "off"));
|
|
7367
7511
|
flatTernaryExpressions?: boolean;
|
|
7368
|
-
offsetTernaryExpressions?: boolean
|
|
7512
|
+
offsetTernaryExpressions?: (boolean | {
|
|
7513
|
+
CallExpression?: boolean;
|
|
7514
|
+
AwaitExpression?: boolean;
|
|
7515
|
+
NewExpression?: boolean;
|
|
7516
|
+
});
|
|
7369
7517
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean;
|
|
7370
7518
|
ignoredNodes?: string[];
|
|
7371
7519
|
ignoreComments?: boolean;
|
|
@@ -8166,6 +8314,7 @@ type StylisticObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "n
|
|
|
8166
8314
|
TSInterfaceBody?: ("always" | "never");
|
|
8167
8315
|
TSEnumBody?: ("always" | "never");
|
|
8168
8316
|
};
|
|
8317
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
8169
8318
|
}];
|
|
8170
8319
|
// ----- @stylistic/object-property-newline -----
|
|
8171
8320
|
type StylisticObjectPropertyNewline = [] | [{
|
|
@@ -9335,6 +9484,13 @@ type ArrowSpacing = [] | [{
|
|
|
9335
9484
|
before?: boolean;
|
|
9336
9485
|
after?: boolean;
|
|
9337
9486
|
}];
|
|
9487
|
+
// ----- astro/no-unsafe-inline-scripts -----
|
|
9488
|
+
type AstroNoUnsafeInlineScripts = [] | [{
|
|
9489
|
+
allowDefineVars?: boolean;
|
|
9490
|
+
allowModuleScripts?: boolean;
|
|
9491
|
+
allowNonExecutingTypes?: string[];
|
|
9492
|
+
allowNonce?: boolean;
|
|
9493
|
+
}];
|
|
9338
9494
|
// ----- astro/prefer-split-class-list -----
|
|
9339
9495
|
type AstroPreferSplitClassList = [] | [{
|
|
9340
9496
|
splitLiteral?: boolean;
|
|
@@ -10105,6 +10261,18 @@ type JsdocTextEscaping = [] | [{
|
|
|
10105
10261
|
escapeHTML?: boolean;
|
|
10106
10262
|
escapeMarkdown?: boolean;
|
|
10107
10263
|
}];
|
|
10264
|
+
// ----- jsdoc/ts-method-signature-style -----
|
|
10265
|
+
type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
|
|
10266
|
+
enableFixer?: boolean;
|
|
10267
|
+
}];
|
|
10268
|
+
// ----- jsdoc/ts-no-unnecessary-template-expression -----
|
|
10269
|
+
type JsdocTsNoUnnecessaryTemplateExpression = [] | [{
|
|
10270
|
+
enableFixer?: boolean;
|
|
10271
|
+
}];
|
|
10272
|
+
// ----- jsdoc/ts-prefer-function-type -----
|
|
10273
|
+
type JsdocTsPreferFunctionType = [] | [{
|
|
10274
|
+
enableFixer?: boolean;
|
|
10275
|
+
}];
|
|
10108
10276
|
// ----- jsdoc/type-formatting -----
|
|
10109
10277
|
type JsdocTypeFormatting = [] | [{
|
|
10110
10278
|
arrayBrackets?: ("angle" | "square");
|
|
@@ -13451,6 +13619,33 @@ type PerfectionistSortVariableDeclarations = [] | [{
|
|
|
13451
13619
|
commentAbove?: string;
|
|
13452
13620
|
})[];
|
|
13453
13621
|
}];
|
|
13622
|
+
// ----- pnpm/json-enforce-catalog -----
|
|
13623
|
+
type PnpmJsonEnforceCatalog = [] | [{
|
|
13624
|
+
allowedProtocols?: string[];
|
|
13625
|
+
autofix?: boolean;
|
|
13626
|
+
defaultCatalog?: string;
|
|
13627
|
+
reuseExistingCatalog?: boolean;
|
|
13628
|
+
conflicts?: ("new-catalog" | "overrides" | "error");
|
|
13629
|
+
fields?: string[];
|
|
13630
|
+
ignores?: string[];
|
|
13631
|
+
}];
|
|
13632
|
+
// ----- pnpm/json-prefer-workspace-settings -----
|
|
13633
|
+
type PnpmJsonPreferWorkspaceSettings = [] | [{
|
|
13634
|
+
autofix?: boolean;
|
|
13635
|
+
}];
|
|
13636
|
+
// ----- pnpm/json-valid-catalog -----
|
|
13637
|
+
type PnpmJsonValidCatalog = [] | [{
|
|
13638
|
+
autoInsert?: boolean;
|
|
13639
|
+
autoInsertDefaultSpecifier?: string;
|
|
13640
|
+
autofix?: boolean;
|
|
13641
|
+
enforceNoConflict?: boolean;
|
|
13642
|
+
fields?: unknown[];
|
|
13643
|
+
}];
|
|
13644
|
+
// ----- pnpm/yaml-no-duplicate-catalog-item -----
|
|
13645
|
+
type PnpmYamlNoDuplicateCatalogItem = [] | [{
|
|
13646
|
+
allow?: string[];
|
|
13647
|
+
checkDuplicates?: ("name-only" | "exact-version");
|
|
13648
|
+
}];
|
|
13454
13649
|
// ----- prefer-arrow-callback -----
|
|
13455
13650
|
type PreferArrowCallback = [] | [{
|
|
13456
13651
|
allowNamedFunctions?: boolean;
|
|
@@ -14185,6 +14380,10 @@ type UnicornTemplateIndent = [] | [{
|
|
|
14185
14380
|
selectors?: string[];
|
|
14186
14381
|
comments?: string[];
|
|
14187
14382
|
}];
|
|
14383
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
14384
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
14385
|
+
withDash?: boolean;
|
|
14386
|
+
}];
|
|
14188
14387
|
// ----- unused-imports/no-unused-imports -----
|
|
14189
14388
|
type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
14190
14389
|
args?: ("all" | "after-used" | "none");
|
|
@@ -15631,6 +15830,6 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
15631
15830
|
onlyEquality?: boolean;
|
|
15632
15831
|
}];
|
|
15633
15832
|
// Names of all the configs
|
|
15634
|
-
type ConfigNames = 'eienjs/
|
|
15833
|
+
type ConfigNames = 'eienjs/gitignore' | 'eienjs/ignores' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/node/rules' | 'eienjs/jsdoc/rules' | 'eienjs/imports/rules' | 'eienjs/command/rules' | 'eienjs/perfectionist/setup' | 'eienjs/imports/rules' | 'eienjs/unicorn/rules' | 'eienjs/unicorn/special-rules' | 'eienjs/typescript/setup' | 'eienjs/typescript/parser' | 'eienjs/typescript/type-aware-parser' | 'eienjs/typescript/rules' | 'eienjs/typescript/rules-type-aware' | 'eienjs/typescript/disables' | 'eienjs/typescript/erasable-syntax-only' | 'eienjs/stylistic/rules' | 'eienjs/regexp/rules' | 'eienjs/test/setup' | 'eienjs/test/rules' | 'eienjs/vue/setup' | 'eienjs/vue/rules' | 'eienjs/vue/composables-disables' | 'eienjs/astro/setup' | 'eienjs/astro/rules' | 'eienjs/adonisjs/rules' | 'eienjs/adonisjs/disables' | 'eienjs/adonisjs/database-disables' | 'eienjs/adonisjs/bin-disables' | 'eienjs/adonisjs/commands-disables' | 'eienjs/adonisjs/middleware-disables' | 'eienjs/adonisjs/exceptions-disables' | 'eienjs/adonisjs/controllers-disables' | 'eienjs/adonisjs/config-disables' | 'eienjs/adonisjs/providers-disables' | 'eienjs/adonisjs/tests-disables' | 'eienjs/nuxt/setup' | 'eienjs/nuxt/vue/single-root' | 'eienjs/nuxt/rules' | 'eienjs/nuxt/utils-disables' | 'eienjs/nuxt/sort-config' | 'eienjs/nuxt/vue/rules' | 'eienjs/jsonc/setup' | 'eienjs/jsonc/rules' | 'eienjs/sort/package-json' | 'eienjs/sort/tsconfig-json' | 'eienjs/pnpm/package-json' | 'eienjs/pnpm/pnpm-workspace-yaml' | 'eienjs/yaml/setup' | 'eienjs/yaml/rules' | 'eienjs/yaml/pnpm-workspace' | 'eienjs/toml/setup' | 'eienjs/toml/rules' | 'eienjs/markdown/setup' | 'eienjs/markdown/processor' | 'eienjs/markdown/parser' | 'eienjs/markdown/disables' | 'eienjs/formatter/setup' | 'eienjs/formatter/css' | 'eienjs/formatter/scss' | 'eienjs/formatter/less' | 'eienjs/formatter/html' | 'eienjs/formatter/xml' | 'eienjs/formatter/svg' | 'eienjs/formatter/markdown' | 'eienjs/formatter/astro' | 'eienjs/formatter/astro/disables' | 'eienjs/disables/scripts' | 'eienjs/disables/cli' | 'eienjs/disables/bin' | 'eienjs/disables/dts' | 'eienjs/disables/cjs' | 'eienjs/disables/config-files' | 'eienjs/disables/json' | 'eienjs/disables/yaml' | 'eienjs/disables/toml' | 'eienjs/disables/astro';
|
|
15635
15834
|
//#endregion
|
|
15636
15835
|
export { ConfigNames, RuleOptions };
|