@jsse/eslint-config 0.2.18 → 0.2.20
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/README.md +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +715 -145
- package/dist/index.d.cts +531 -147
- package/dist/index.d.ts +531 -147
- package/dist/index.js +711 -145
- package/package.json +24 -21
package/dist/index.d.cts
CHANGED
|
@@ -2,15 +2,18 @@ import { ParserOptions } from '@typescript-eslint/parser';
|
|
|
2
2
|
import * as parser from '@typescript-eslint/parser';
|
|
3
3
|
export { parser as parserTs };
|
|
4
4
|
import * as eslint from 'eslint';
|
|
5
|
-
import { Linter } from 'eslint';
|
|
5
|
+
import { Linter, Rule } from 'eslint';
|
|
6
6
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
7
|
+
import * as neverthrow from 'neverthrow';
|
|
7
8
|
import * as _stylistic_eslint_plugin from '@stylistic/eslint-plugin';
|
|
9
|
+
import * as _eslint_markdown from '@eslint/markdown';
|
|
8
10
|
import * as eslint_plugin_yml_lib_types_js from 'eslint-plugin-yml/lib/types.js';
|
|
9
11
|
import * as eslint_plugin_yml_lib_meta_js from 'eslint-plugin-yml/lib/meta.js';
|
|
10
12
|
import * as yaml_eslint_parser from 'yaml-eslint-parser';
|
|
11
13
|
import * as eslint_plugin_jsonc_types from 'eslint-plugin-jsonc/types';
|
|
12
14
|
import * as eslint_plugin_jsonc_meta from 'eslint-plugin-jsonc/meta';
|
|
13
15
|
import * as jsonc_eslint_parser from 'jsonc-eslint-parser';
|
|
16
|
+
import * as eslint_plugin_react from 'eslint-plugin-react';
|
|
14
17
|
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
15
18
|
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
16
19
|
export { default as pluginEslintComments } from 'eslint-plugin-eslint-comments';
|
|
@@ -1776,6 +1779,7 @@ type Complexity =
|
|
|
1776
1779
|
| {
|
|
1777
1780
|
maximum?: number;
|
|
1778
1781
|
max?: number;
|
|
1782
|
+
variant?: "classic" | "modified";
|
|
1779
1783
|
},
|
|
1780
1784
|
];
|
|
1781
1785
|
// ----- computed-property-spacing -----
|
|
@@ -6700,7 +6704,54 @@ type JsoncSpaceUnaryOps =
|
|
|
6700
6704
|
/* prettier-ignore */
|
|
6701
6705
|
|
|
6702
6706
|
|
|
6703
|
-
interface MarkdownRuleOptions {
|
|
6707
|
+
interface MarkdownRuleOptions {
|
|
6708
|
+
/**
|
|
6709
|
+
* Require languages for fenced code blocks.
|
|
6710
|
+
*/
|
|
6711
|
+
"markdown/fenced-code-language"?: Linter.RuleEntry<MarkdownFencedCodeLanguage>;
|
|
6712
|
+
/**
|
|
6713
|
+
* Enforce heading levels increment by one.
|
|
6714
|
+
*/
|
|
6715
|
+
"markdown/heading-increment"?: Linter.RuleEntry<[]>;
|
|
6716
|
+
/**
|
|
6717
|
+
* Disallow duplicate headings in the same document.
|
|
6718
|
+
*/
|
|
6719
|
+
"markdown/no-duplicate-headings"?: Linter.RuleEntry<[]>;
|
|
6720
|
+
/**
|
|
6721
|
+
* Disallow empty links.
|
|
6722
|
+
*/
|
|
6723
|
+
"markdown/no-empty-links"?: Linter.RuleEntry<[]>;
|
|
6724
|
+
/**
|
|
6725
|
+
* Disallow HTML tags.
|
|
6726
|
+
*/
|
|
6727
|
+
"markdown/no-html"?: Linter.RuleEntry<MarkdownNoHtml>;
|
|
6728
|
+
/**
|
|
6729
|
+
* Disallow invalid label references.
|
|
6730
|
+
*/
|
|
6731
|
+
"markdown/no-invalid-label-refs"?: Linter.RuleEntry<[]>;
|
|
6732
|
+
/**
|
|
6733
|
+
* Disallow missing label references.
|
|
6734
|
+
*/
|
|
6735
|
+
"markdown/no-missing-label-refs"?: Linter.RuleEntry<[]>;
|
|
6736
|
+
}
|
|
6737
|
+
|
|
6738
|
+
/* ======= Declarations ======= */
|
|
6739
|
+
// ----- markdown/fenced-code-language -----
|
|
6740
|
+
type MarkdownFencedCodeLanguage =
|
|
6741
|
+
| []
|
|
6742
|
+
| [
|
|
6743
|
+
{
|
|
6744
|
+
required?: string[];
|
|
6745
|
+
},
|
|
6746
|
+
];
|
|
6747
|
+
// ----- markdown/no-html -----
|
|
6748
|
+
type MarkdownNoHtml =
|
|
6749
|
+
| []
|
|
6750
|
+
| [
|
|
6751
|
+
{
|
|
6752
|
+
allowed?: string[];
|
|
6753
|
+
},
|
|
6754
|
+
];
|
|
6704
6755
|
|
|
6705
6756
|
/* eslint-disable */
|
|
6706
6757
|
/* prettier-ignore */
|
|
@@ -6797,7 +6848,7 @@ interface NRuleOptions {
|
|
|
6797
6848
|
* disallow the use of `process.env`
|
|
6798
6849
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-env.md
|
|
6799
6850
|
*/
|
|
6800
|
-
"n/no-process-env"?: Linter.RuleEntry<
|
|
6851
|
+
"n/no-process-env"?: Linter.RuleEntry<NNoProcessEnv>;
|
|
6801
6852
|
/**
|
|
6802
6853
|
* disallow the use of `process.exit()`
|
|
6803
6854
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-exit.md
|
|
@@ -7020,6 +7071,9 @@ type NNoDeprecatedApi =
|
|
|
7020
7071
|
| "readline.getStringWidth"
|
|
7021
7072
|
| "readline.isFullWidthCodePoint"
|
|
7022
7073
|
| "readline.stripVTControlCharacters"
|
|
7074
|
+
| "repl.REPLServer"
|
|
7075
|
+
| "repl.Recoverable"
|
|
7076
|
+
| "repl.REPL_MODE_MAGIC"
|
|
7023
7077
|
| "safe-buffer.Buffer()"
|
|
7024
7078
|
| "new safe-buffer.Buffer()"
|
|
7025
7079
|
| "safe-buffer.SlowBuffer"
|
|
@@ -7058,6 +7112,15 @@ type NNoDeprecatedApi =
|
|
|
7058
7112
|
| "util.puts"
|
|
7059
7113
|
| "util._extend"
|
|
7060
7114
|
| "vm.runInDebugContext"
|
|
7115
|
+
| "zlib.BrotliCompress()"
|
|
7116
|
+
| "zlib.BrotliDecompress()"
|
|
7117
|
+
| "zlib.Deflate()"
|
|
7118
|
+
| "zlib.DeflateRaw()"
|
|
7119
|
+
| "zlib.Gunzip()"
|
|
7120
|
+
| "zlib.Gzip()"
|
|
7121
|
+
| "zlib.Inflate()"
|
|
7122
|
+
| "zlib.InflateRaw()"
|
|
7123
|
+
| "zlib.Unzip()"
|
|
7061
7124
|
)[];
|
|
7062
7125
|
ignoreGlobalItems?: (
|
|
7063
7126
|
| "Buffer()"
|
|
@@ -7184,6 +7247,7 @@ type NNoMissingImport =
|
|
|
7184
7247
|
allowModules?: string[];
|
|
7185
7248
|
resolvePaths?: string[];
|
|
7186
7249
|
tryExtensions?: string[];
|
|
7250
|
+
ignoreTypeImport?: boolean;
|
|
7187
7251
|
tsconfigPath?: string;
|
|
7188
7252
|
typescriptExtensionMap?:
|
|
7189
7253
|
| unknown[][]
|
|
@@ -7226,6 +7290,14 @@ type NNoMixedRequires =
|
|
|
7226
7290
|
allowCall?: boolean;
|
|
7227
7291
|
},
|
|
7228
7292
|
];
|
|
7293
|
+
// ----- n/no-process-env -----
|
|
7294
|
+
type NNoProcessEnv =
|
|
7295
|
+
| []
|
|
7296
|
+
| [
|
|
7297
|
+
{
|
|
7298
|
+
allowedVariables?: string[];
|
|
7299
|
+
},
|
|
7300
|
+
];
|
|
7229
7301
|
// ----- n/no-restricted-import -----
|
|
7230
7302
|
type NNoRestrictedImport =
|
|
7231
7303
|
| []
|
|
@@ -8359,6 +8431,31 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8359
8431
|
| "PerformanceObserverEntryList"
|
|
8360
8432
|
| "PerformanceResourceTiming"
|
|
8361
8433
|
| "performance"
|
|
8434
|
+
| "performance.clearMarks"
|
|
8435
|
+
| "performance.clearMeasures"
|
|
8436
|
+
| "performance.clearResourceTimings"
|
|
8437
|
+
| "performance.eventLoopUtilization"
|
|
8438
|
+
| "performance.getEntries"
|
|
8439
|
+
| "performance.getEntriesByName"
|
|
8440
|
+
| "performance.getEntriesByType"
|
|
8441
|
+
| "performance.mark"
|
|
8442
|
+
| "performance.markResourceTiming"
|
|
8443
|
+
| "performance.measure"
|
|
8444
|
+
| "performance.nodeTiming"
|
|
8445
|
+
| "performance.nodeTiming.bootstrapComplete"
|
|
8446
|
+
| "performance.nodeTiming.environment"
|
|
8447
|
+
| "performance.nodeTiming.idleTime"
|
|
8448
|
+
| "performance.nodeTiming.loopExit"
|
|
8449
|
+
| "performance.nodeTiming.loopStart"
|
|
8450
|
+
| "performance.nodeTiming.nodeStart"
|
|
8451
|
+
| "performance.nodeTiming.uvMetricsInfo"
|
|
8452
|
+
| "performance.nodeTiming.v8Start"
|
|
8453
|
+
| "performance.now"
|
|
8454
|
+
| "performance.onresourcetimingbufferfull"
|
|
8455
|
+
| "performance.setResourceTimingBufferSize"
|
|
8456
|
+
| "performance.timeOrigin"
|
|
8457
|
+
| "performance.timerify"
|
|
8458
|
+
| "performance.toJSON"
|
|
8362
8459
|
| "process"
|
|
8363
8460
|
| "process.allowedNodeEnvironmentFlags"
|
|
8364
8461
|
| "process.availableMemory"
|
|
@@ -9020,6 +9117,10 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9020
9117
|
| "http.Server"
|
|
9021
9118
|
| "inspector"
|
|
9022
9119
|
| "inspector.Session"
|
|
9120
|
+
| "inspector.Network.requestWillBeSent"
|
|
9121
|
+
| "inspector.Network.responseReceived"
|
|
9122
|
+
| "inspector.Network.loadingFinished"
|
|
9123
|
+
| "inspector.Network.loadingFailed"
|
|
9023
9124
|
| "inspector.console"
|
|
9024
9125
|
| "inspector.close"
|
|
9025
9126
|
| "inspector.open"
|
|
@@ -9033,8 +9134,11 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9033
9134
|
| "inspector/promises.url"
|
|
9034
9135
|
| "inspector/promises.waitForDebugger"
|
|
9035
9136
|
| "module.builtinModules"
|
|
9137
|
+
| "module.constants.compileCacheStatus"
|
|
9036
9138
|
| "module.createRequire"
|
|
9037
9139
|
| "module.createRequireFromPath"
|
|
9140
|
+
| "module.enableCompileCache"
|
|
9141
|
+
| "module.getCompileCacheDir"
|
|
9038
9142
|
| "module.isBuiltin"
|
|
9039
9143
|
| "module.register"
|
|
9040
9144
|
| "module.syncBuiltinESMExports"
|
|
@@ -9043,6 +9147,8 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9043
9147
|
| "module.Module.builtinModules"
|
|
9044
9148
|
| "module.Module.createRequire"
|
|
9045
9149
|
| "module.Module.createRequireFromPath"
|
|
9150
|
+
| "module.Module.enableCompileCache"
|
|
9151
|
+
| "module.Module.getCompileCacheDir"
|
|
9046
9152
|
| "module.Module.isBuiltin"
|
|
9047
9153
|
| "module.Module.register"
|
|
9048
9154
|
| "module.Module.syncBuiltinESMExports"
|
|
@@ -9165,6 +9271,31 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9165
9271
|
| "path/win32.toNamespacedPath"
|
|
9166
9272
|
| "perf_hooks"
|
|
9167
9273
|
| "perf_hooks.performance"
|
|
9274
|
+
| "perf_hooks.performance.clearMarks"
|
|
9275
|
+
| "perf_hooks.performance.clearMeasures"
|
|
9276
|
+
| "perf_hooks.performance.clearResourceTimings"
|
|
9277
|
+
| "perf_hooks.performance.eventLoopUtilization"
|
|
9278
|
+
| "perf_hooks.performance.getEntries"
|
|
9279
|
+
| "perf_hooks.performance.getEntriesByName"
|
|
9280
|
+
| "perf_hooks.performance.getEntriesByType"
|
|
9281
|
+
| "perf_hooks.performance.mark"
|
|
9282
|
+
| "perf_hooks.performance.markResourceTiming"
|
|
9283
|
+
| "perf_hooks.performance.measure"
|
|
9284
|
+
| "perf_hooks.performance.nodeTiming"
|
|
9285
|
+
| "perf_hooks.performance.nodeTiming.bootstrapComplete"
|
|
9286
|
+
| "perf_hooks.performance.nodeTiming.environment"
|
|
9287
|
+
| "perf_hooks.performance.nodeTiming.idleTime"
|
|
9288
|
+
| "perf_hooks.performance.nodeTiming.loopExit"
|
|
9289
|
+
| "perf_hooks.performance.nodeTiming.loopStart"
|
|
9290
|
+
| "perf_hooks.performance.nodeTiming.nodeStart"
|
|
9291
|
+
| "perf_hooks.performance.nodeTiming.uvMetricsInfo"
|
|
9292
|
+
| "perf_hooks.performance.nodeTiming.v8Start"
|
|
9293
|
+
| "perf_hooks.performance.now"
|
|
9294
|
+
| "perf_hooks.performance.onresourcetimingbufferfull"
|
|
9295
|
+
| "perf_hooks.performance.setResourceTimingBufferSize"
|
|
9296
|
+
| "perf_hooks.performance.timeOrigin"
|
|
9297
|
+
| "perf_hooks.performance.timerify"
|
|
9298
|
+
| "perf_hooks.performance.toJSON"
|
|
9168
9299
|
| "perf_hooks.createHistogram"
|
|
9169
9300
|
| "perf_hooks.monitorEventLoopDelay"
|
|
9170
9301
|
| "perf_hooks.PerformanceEntry"
|
|
@@ -9209,6 +9340,17 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9209
9340
|
| "readline/promises.createInterface"
|
|
9210
9341
|
| "readline/promises.Interface"
|
|
9211
9342
|
| "readline/promises.Readline"
|
|
9343
|
+
| "repl"
|
|
9344
|
+
| "repl.start"
|
|
9345
|
+
| "repl.writer"
|
|
9346
|
+
| "repl.REPLServer()"
|
|
9347
|
+
| "repl.REPLServer"
|
|
9348
|
+
| "repl.REPL_MODE_MAGIC"
|
|
9349
|
+
| "repl.REPL_MODE_SLOPPY"
|
|
9350
|
+
| "repl.REPL_MODE_STRICT"
|
|
9351
|
+
| "repl.Recoverable()"
|
|
9352
|
+
| "repl.Recoverable"
|
|
9353
|
+
| "repl.builtinModules"
|
|
9212
9354
|
| "sea"
|
|
9213
9355
|
| "sea.isSea"
|
|
9214
9356
|
| "sea.getAsset"
|
|
@@ -9225,6 +9367,7 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9225
9367
|
| "stream.finished"
|
|
9226
9368
|
| "stream.pipeline"
|
|
9227
9369
|
| "stream.compose"
|
|
9370
|
+
| "stream.duplexPair"
|
|
9228
9371
|
| "stream.Readable"
|
|
9229
9372
|
| "stream.Readable.from"
|
|
9230
9373
|
| "stream.Readable.isDisturbed"
|
|
@@ -9386,6 +9529,7 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9386
9529
|
| "util.deprecate"
|
|
9387
9530
|
| "util.format"
|
|
9388
9531
|
| "util.formatWithOptions"
|
|
9532
|
+
| "util.getCallSite"
|
|
9389
9533
|
| "util.getSystemErrorName"
|
|
9390
9534
|
| "util.getSystemErrorMap"
|
|
9391
9535
|
| "util.inherits"
|
|
@@ -9604,14 +9748,23 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9604
9748
|
| "zlib.inflateRawSync"
|
|
9605
9749
|
| "zlib.unzip"
|
|
9606
9750
|
| "zlib.unzipSync"
|
|
9751
|
+
| "zlib.BrotliCompress()"
|
|
9607
9752
|
| "zlib.BrotliCompress"
|
|
9753
|
+
| "zlib.BrotliDecompress()"
|
|
9608
9754
|
| "zlib.BrotliDecompress"
|
|
9755
|
+
| "zlib.Deflate()"
|
|
9609
9756
|
| "zlib.Deflate"
|
|
9757
|
+
| "zlib.DeflateRaw()"
|
|
9610
9758
|
| "zlib.DeflateRaw"
|
|
9759
|
+
| "zlib.Gunzip()"
|
|
9611
9760
|
| "zlib.Gunzip"
|
|
9761
|
+
| "zlib.Gzip()"
|
|
9612
9762
|
| "zlib.Gzip"
|
|
9763
|
+
| "zlib.Inflate()"
|
|
9613
9764
|
| "zlib.Inflate"
|
|
9765
|
+
| "zlib.InflateRaw()"
|
|
9614
9766
|
| "zlib.InflateRaw"
|
|
9767
|
+
| "zlib.Unzip()"
|
|
9615
9768
|
| "zlib.Unzip"
|
|
9616
9769
|
| "zlib"
|
|
9617
9770
|
)[];
|
|
@@ -11793,6 +11946,11 @@ interface StylisticRuleOptions {
|
|
|
11793
11946
|
* @see https://eslint.style/rules/js/computed-property-spacing
|
|
11794
11947
|
*/
|
|
11795
11948
|
"@stylistic/computed-property-spacing"?: Linter.RuleEntry<StylisticComputedPropertySpacing>;
|
|
11949
|
+
/**
|
|
11950
|
+
* Enforce consistent line breaks after opening and before closing braces
|
|
11951
|
+
* @see https://eslint.style/rules/plus/curly-newline
|
|
11952
|
+
*/
|
|
11953
|
+
"@stylistic/curly-newline"?: Linter.RuleEntry<StylisticCurlyNewline>;
|
|
11796
11954
|
/**
|
|
11797
11955
|
* Enforce consistent newlines before and after dots
|
|
11798
11956
|
* @see https://eslint.style/rules/js/dot-location
|
|
@@ -11857,7 +12015,7 @@ interface StylisticRuleOptions {
|
|
|
11857
12015
|
* Enforce closing tag location for multiline JSX
|
|
11858
12016
|
* @see https://eslint.style/rules/jsx/jsx-closing-tag-location
|
|
11859
12017
|
*/
|
|
11860
|
-
"@stylistic/jsx-closing-tag-location"?: Linter.RuleEntry<
|
|
12018
|
+
"@stylistic/jsx-closing-tag-location"?: Linter.RuleEntry<StylisticJsxClosingTagLocation>;
|
|
11861
12019
|
/**
|
|
11862
12020
|
* Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
|
|
11863
12021
|
* @see https://eslint.style/rules/jsx/jsx-curly-brace-presence
|
|
@@ -12345,6 +12503,178 @@ type StylisticComputedPropertySpacing =
|
|
|
12345
12503
|
enforceForClassMembers?: boolean;
|
|
12346
12504
|
},
|
|
12347
12505
|
];
|
|
12506
|
+
// ----- @stylistic/curly-newline -----
|
|
12507
|
+
type StylisticCurlyNewline =
|
|
12508
|
+
| []
|
|
12509
|
+
| [
|
|
12510
|
+
| ("always" | "never")
|
|
12511
|
+
| {
|
|
12512
|
+
IfStatementConsequent?:
|
|
12513
|
+
| ("always" | "never")
|
|
12514
|
+
| {
|
|
12515
|
+
multiline?: boolean;
|
|
12516
|
+
minElements?: number;
|
|
12517
|
+
consistent?: boolean;
|
|
12518
|
+
};
|
|
12519
|
+
IfStatementAlternative?:
|
|
12520
|
+
| ("always" | "never")
|
|
12521
|
+
| {
|
|
12522
|
+
multiline?: boolean;
|
|
12523
|
+
minElements?: number;
|
|
12524
|
+
consistent?: boolean;
|
|
12525
|
+
};
|
|
12526
|
+
DoWhileStatement?:
|
|
12527
|
+
| ("always" | "never")
|
|
12528
|
+
| {
|
|
12529
|
+
multiline?: boolean;
|
|
12530
|
+
minElements?: number;
|
|
12531
|
+
consistent?: boolean;
|
|
12532
|
+
};
|
|
12533
|
+
ForInStatement?:
|
|
12534
|
+
| ("always" | "never")
|
|
12535
|
+
| {
|
|
12536
|
+
multiline?: boolean;
|
|
12537
|
+
minElements?: number;
|
|
12538
|
+
consistent?: boolean;
|
|
12539
|
+
};
|
|
12540
|
+
ForOfStatement?:
|
|
12541
|
+
| ("always" | "never")
|
|
12542
|
+
| {
|
|
12543
|
+
multiline?: boolean;
|
|
12544
|
+
minElements?: number;
|
|
12545
|
+
consistent?: boolean;
|
|
12546
|
+
};
|
|
12547
|
+
ForStatement?:
|
|
12548
|
+
| ("always" | "never")
|
|
12549
|
+
| {
|
|
12550
|
+
multiline?: boolean;
|
|
12551
|
+
minElements?: number;
|
|
12552
|
+
consistent?: boolean;
|
|
12553
|
+
};
|
|
12554
|
+
WhileStatement?:
|
|
12555
|
+
| ("always" | "never")
|
|
12556
|
+
| {
|
|
12557
|
+
multiline?: boolean;
|
|
12558
|
+
minElements?: number;
|
|
12559
|
+
consistent?: boolean;
|
|
12560
|
+
};
|
|
12561
|
+
SwitchStatement?:
|
|
12562
|
+
| ("always" | "never")
|
|
12563
|
+
| {
|
|
12564
|
+
multiline?: boolean;
|
|
12565
|
+
minElements?: number;
|
|
12566
|
+
consistent?: boolean;
|
|
12567
|
+
};
|
|
12568
|
+
SwitchCase?:
|
|
12569
|
+
| ("always" | "never")
|
|
12570
|
+
| {
|
|
12571
|
+
multiline?: boolean;
|
|
12572
|
+
minElements?: number;
|
|
12573
|
+
consistent?: boolean;
|
|
12574
|
+
};
|
|
12575
|
+
TryStatementBlock?:
|
|
12576
|
+
| ("always" | "never")
|
|
12577
|
+
| {
|
|
12578
|
+
multiline?: boolean;
|
|
12579
|
+
minElements?: number;
|
|
12580
|
+
consistent?: boolean;
|
|
12581
|
+
};
|
|
12582
|
+
TryStatementHandler?:
|
|
12583
|
+
| ("always" | "never")
|
|
12584
|
+
| {
|
|
12585
|
+
multiline?: boolean;
|
|
12586
|
+
minElements?: number;
|
|
12587
|
+
consistent?: boolean;
|
|
12588
|
+
};
|
|
12589
|
+
TryStatementFinalizer?:
|
|
12590
|
+
| ("always" | "never")
|
|
12591
|
+
| {
|
|
12592
|
+
multiline?: boolean;
|
|
12593
|
+
minElements?: number;
|
|
12594
|
+
consistent?: boolean;
|
|
12595
|
+
};
|
|
12596
|
+
BlockStatement?:
|
|
12597
|
+
| ("always" | "never")
|
|
12598
|
+
| {
|
|
12599
|
+
multiline?: boolean;
|
|
12600
|
+
minElements?: number;
|
|
12601
|
+
consistent?: boolean;
|
|
12602
|
+
};
|
|
12603
|
+
ArrowFunctionExpression?:
|
|
12604
|
+
| ("always" | "never")
|
|
12605
|
+
| {
|
|
12606
|
+
multiline?: boolean;
|
|
12607
|
+
minElements?: number;
|
|
12608
|
+
consistent?: boolean;
|
|
12609
|
+
};
|
|
12610
|
+
FunctionDeclaration?:
|
|
12611
|
+
| ("always" | "never")
|
|
12612
|
+
| {
|
|
12613
|
+
multiline?: boolean;
|
|
12614
|
+
minElements?: number;
|
|
12615
|
+
consistent?: boolean;
|
|
12616
|
+
};
|
|
12617
|
+
FunctionExpression?:
|
|
12618
|
+
| ("always" | "never")
|
|
12619
|
+
| {
|
|
12620
|
+
multiline?: boolean;
|
|
12621
|
+
minElements?: number;
|
|
12622
|
+
consistent?: boolean;
|
|
12623
|
+
};
|
|
12624
|
+
Property?:
|
|
12625
|
+
| ("always" | "never")
|
|
12626
|
+
| {
|
|
12627
|
+
multiline?: boolean;
|
|
12628
|
+
minElements?: number;
|
|
12629
|
+
consistent?: boolean;
|
|
12630
|
+
};
|
|
12631
|
+
ClassBody?:
|
|
12632
|
+
| ("always" | "never")
|
|
12633
|
+
| {
|
|
12634
|
+
multiline?: boolean;
|
|
12635
|
+
minElements?: number;
|
|
12636
|
+
consistent?: boolean;
|
|
12637
|
+
};
|
|
12638
|
+
StaticBlock?:
|
|
12639
|
+
| ("always" | "never")
|
|
12640
|
+
| {
|
|
12641
|
+
multiline?: boolean;
|
|
12642
|
+
minElements?: number;
|
|
12643
|
+
consistent?: boolean;
|
|
12644
|
+
};
|
|
12645
|
+
WithStatement?:
|
|
12646
|
+
| ("always" | "never")
|
|
12647
|
+
| {
|
|
12648
|
+
multiline?: boolean;
|
|
12649
|
+
minElements?: number;
|
|
12650
|
+
consistent?: boolean;
|
|
12651
|
+
};
|
|
12652
|
+
TSEnumBody?:
|
|
12653
|
+
| ("always" | "never")
|
|
12654
|
+
| {
|
|
12655
|
+
multiline?: boolean;
|
|
12656
|
+
minElements?: number;
|
|
12657
|
+
consistent?: boolean;
|
|
12658
|
+
};
|
|
12659
|
+
TSInterfaceBody?:
|
|
12660
|
+
| ("always" | "never")
|
|
12661
|
+
| {
|
|
12662
|
+
multiline?: boolean;
|
|
12663
|
+
minElements?: number;
|
|
12664
|
+
consistent?: boolean;
|
|
12665
|
+
};
|
|
12666
|
+
TSModuleBlock?:
|
|
12667
|
+
| ("always" | "never")
|
|
12668
|
+
| {
|
|
12669
|
+
multiline?: boolean;
|
|
12670
|
+
minElements?: number;
|
|
12671
|
+
consistent?: boolean;
|
|
12672
|
+
};
|
|
12673
|
+
multiline?: boolean;
|
|
12674
|
+
minElements?: number;
|
|
12675
|
+
consistent?: boolean;
|
|
12676
|
+
},
|
|
12677
|
+
];
|
|
12348
12678
|
// ----- @stylistic/dot-location -----
|
|
12349
12679
|
type StylisticDotLocation = [] | ["object" | "property"];
|
|
12350
12680
|
// ----- @stylistic/eol-last -----
|
|
@@ -12486,6 +12816,8 @@ type StylisticJsxClosingBracketLocation =
|
|
|
12486
12816
|
| false;
|
|
12487
12817
|
},
|
|
12488
12818
|
];
|
|
12819
|
+
// ----- @stylistic/jsx-closing-tag-location -----
|
|
12820
|
+
type StylisticJsxClosingTagLocation = [] | ["tag-aligned" | "line-aligned"];
|
|
12489
12821
|
// ----- @stylistic/jsx-curly-brace-presence -----
|
|
12490
12822
|
type StylisticJsxCurlyBracePresence =
|
|
12491
12823
|
| []
|
|
@@ -14205,6 +14537,11 @@ interface VitestRuleOptions {
|
|
|
14205
14537
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md
|
|
14206
14538
|
*/
|
|
14207
14539
|
"vitest/prefer-todo"?: Linter.RuleEntry<[]>;
|
|
14540
|
+
/**
|
|
14541
|
+
* Prefer `vi.mocked()` over `fn as Mock`
|
|
14542
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
|
|
14543
|
+
*/
|
|
14544
|
+
"vitest/prefer-vi-mocked"?: Linter.RuleEntry<[]>;
|
|
14208
14545
|
/**
|
|
14209
14546
|
* require setup and teardown to be within a hook
|
|
14210
14547
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
@@ -19496,687 +19833,702 @@ type ImportPreferDefaultExport =
|
|
|
19496
19833
|
interface UnicornRuleOptions {
|
|
19497
19834
|
/**
|
|
19498
19835
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
19499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/better-regex.md
|
|
19500
19837
|
*/
|
|
19501
19838
|
"unicorn/better-regex"?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
19502
19839
|
/**
|
|
19503
19840
|
* Enforce a specific parameter name in catch clauses.
|
|
19504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/catch-error-name.md
|
|
19505
19842
|
*/
|
|
19506
19843
|
"unicorn/catch-error-name"?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
19507
19844
|
/**
|
|
19508
19845
|
* Use destructured variables over properties.
|
|
19509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-destructuring.md
|
|
19510
19847
|
*/
|
|
19511
19848
|
"unicorn/consistent-destructuring"?: Linter.RuleEntry<[]>;
|
|
19512
19849
|
/**
|
|
19513
19850
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
19514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-empty-array-spread.md
|
|
19515
19852
|
*/
|
|
19516
19853
|
"unicorn/consistent-empty-array-spread"?: Linter.RuleEntry<[]>;
|
|
19854
|
+
/**
|
|
19855
|
+
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
19856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-existence-index-check.md
|
|
19857
|
+
*/
|
|
19858
|
+
"unicorn/consistent-existence-index-check"?: Linter.RuleEntry<[]>;
|
|
19517
19859
|
/**
|
|
19518
19860
|
* Move function definitions to the highest possible scope.
|
|
19519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/consistent-function-scoping.md
|
|
19520
19862
|
*/
|
|
19521
19863
|
"unicorn/consistent-function-scoping"?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
19522
19864
|
/**
|
|
19523
19865
|
* Enforce correct `Error` subclassing.
|
|
19524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/custom-error-definition.md
|
|
19525
19867
|
*/
|
|
19526
19868
|
"unicorn/custom-error-definition"?: Linter.RuleEntry<[]>;
|
|
19527
19869
|
/**
|
|
19528
19870
|
* Enforce no spaces between braces.
|
|
19529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/empty-brace-spaces.md
|
|
19530
19872
|
*/
|
|
19531
19873
|
"unicorn/empty-brace-spaces"?: Linter.RuleEntry<[]>;
|
|
19532
19874
|
/**
|
|
19533
19875
|
* Enforce passing a `message` value when creating a built-in error.
|
|
19534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/error-message.md
|
|
19535
19877
|
*/
|
|
19536
19878
|
"unicorn/error-message"?: Linter.RuleEntry<[]>;
|
|
19537
19879
|
/**
|
|
19538
19880
|
* Require escape sequences to use uppercase values.
|
|
19539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/escape-case.md
|
|
19540
19882
|
*/
|
|
19541
19883
|
"unicorn/escape-case"?: Linter.RuleEntry<[]>;
|
|
19542
19884
|
/**
|
|
19543
19885
|
* Add expiration conditions to TODO comments.
|
|
19544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/expiring-todo-comments.md
|
|
19545
19887
|
*/
|
|
19546
19888
|
"unicorn/expiring-todo-comments"?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
19547
19889
|
/**
|
|
19548
19890
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
19549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/explicit-length-check.md
|
|
19550
19892
|
*/
|
|
19551
19893
|
"unicorn/explicit-length-check"?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
19552
19894
|
/**
|
|
19553
19895
|
* Enforce a case style for filenames.
|
|
19554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/filename-case.md
|
|
19555
19897
|
*/
|
|
19556
19898
|
"unicorn/filename-case"?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
19557
19899
|
/**
|
|
19558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#import-index
|
|
19559
19901
|
* @deprecated
|
|
19560
19902
|
*/
|
|
19561
19903
|
"unicorn/import-index"?: Linter.RuleEntry<[]>;
|
|
19562
19904
|
/**
|
|
19563
19905
|
* Enforce specific import styles per module.
|
|
19564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/import-style.md
|
|
19565
19907
|
*/
|
|
19566
19908
|
"unicorn/import-style"?: Linter.RuleEntry<UnicornImportStyle>;
|
|
19567
19909
|
/**
|
|
19568
19910
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
19569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/new-for-builtins.md
|
|
19570
19912
|
*/
|
|
19571
19913
|
"unicorn/new-for-builtins"?: Linter.RuleEntry<[]>;
|
|
19572
19914
|
/**
|
|
19573
19915
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
19574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
19575
19917
|
*/
|
|
19576
19918
|
"unicorn/no-abusive-eslint-disable"?: Linter.RuleEntry<[]>;
|
|
19577
19919
|
/**
|
|
19578
19920
|
* Disallow anonymous functions and classes as the default export.
|
|
19579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-anonymous-default-export.md
|
|
19580
19922
|
*/
|
|
19581
19923
|
"unicorn/no-anonymous-default-export"?: Linter.RuleEntry<[]>;
|
|
19582
19924
|
/**
|
|
19583
19925
|
* Prevent passing a function reference directly to iterator methods.
|
|
19584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-callback-reference.md
|
|
19585
19927
|
*/
|
|
19586
19928
|
"unicorn/no-array-callback-reference"?: Linter.RuleEntry<[]>;
|
|
19587
19929
|
/**
|
|
19588
19930
|
* Prefer `for…of` over the `forEach` method.
|
|
19589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-for-each.md
|
|
19590
19932
|
*/
|
|
19591
19933
|
"unicorn/no-array-for-each"?: Linter.RuleEntry<[]>;
|
|
19592
19934
|
/**
|
|
19593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-array-instanceof
|
|
19594
19936
|
* @deprecated
|
|
19595
19937
|
*/
|
|
19596
19938
|
"unicorn/no-array-instanceof"?: Linter.RuleEntry<[]>;
|
|
19597
19939
|
/**
|
|
19598
19940
|
* Disallow using the `this` argument in array methods.
|
|
19599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-method-this-argument.md
|
|
19600
19942
|
*/
|
|
19601
19943
|
"unicorn/no-array-method-this-argument"?: Linter.RuleEntry<[]>;
|
|
19602
19944
|
/**
|
|
19603
19945
|
* Enforce combining multiple `Array#push()` into one call.
|
|
19604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-push-push.md
|
|
19605
19947
|
*/
|
|
19606
19948
|
"unicorn/no-array-push-push"?: Linter.RuleEntry<UnicornNoArrayPushPush>;
|
|
19607
19949
|
/**
|
|
19608
19950
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
19609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-array-reduce.md
|
|
19610
19952
|
*/
|
|
19611
19953
|
"unicorn/no-array-reduce"?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
19612
19954
|
/**
|
|
19613
19955
|
* Disallow member access from await expression.
|
|
19614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-expression-member.md
|
|
19615
19957
|
*/
|
|
19616
19958
|
"unicorn/no-await-expression-member"?: Linter.RuleEntry<[]>;
|
|
19617
19959
|
/**
|
|
19618
19960
|
* Disallow using `await` in `Promise` method parameters.
|
|
19619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-await-in-promise-methods.md
|
|
19620
19962
|
*/
|
|
19621
19963
|
"unicorn/no-await-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
19622
19964
|
/**
|
|
19623
19965
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
19624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-console-spaces.md
|
|
19625
19967
|
*/
|
|
19626
19968
|
"unicorn/no-console-spaces"?: Linter.RuleEntry<[]>;
|
|
19627
19969
|
/**
|
|
19628
19970
|
* Do not use `document.cookie` directly.
|
|
19629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-document-cookie.md
|
|
19630
19972
|
*/
|
|
19631
19973
|
"unicorn/no-document-cookie"?: Linter.RuleEntry<[]>;
|
|
19632
19974
|
/**
|
|
19633
19975
|
* Disallow empty files.
|
|
19634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-empty-file.md
|
|
19635
19977
|
*/
|
|
19636
19978
|
"unicorn/no-empty-file"?: Linter.RuleEntry<[]>;
|
|
19637
19979
|
/**
|
|
19638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
19639
19981
|
* @deprecated
|
|
19640
19982
|
*/
|
|
19641
19983
|
"unicorn/no-fn-reference-in-iterator"?: Linter.RuleEntry<[]>;
|
|
19642
19984
|
/**
|
|
19643
19985
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
19644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-for-loop.md
|
|
19645
19987
|
*/
|
|
19646
19988
|
"unicorn/no-for-loop"?: Linter.RuleEntry<[]>;
|
|
19647
19989
|
/**
|
|
19648
19990
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
19649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-hex-escape.md
|
|
19650
19992
|
*/
|
|
19651
19993
|
"unicorn/no-hex-escape"?: Linter.RuleEntry<[]>;
|
|
19652
19994
|
/**
|
|
19653
19995
|
* Require `Array.isArray()` instead of `instanceof Array`.
|
|
19654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-instanceof-array.md
|
|
19655
19997
|
*/
|
|
19656
19998
|
"unicorn/no-instanceof-array"?: Linter.RuleEntry<[]>;
|
|
19657
19999
|
/**
|
|
19658
20000
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
19659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-fetch-options.md
|
|
19660
20002
|
*/
|
|
19661
20003
|
"unicorn/no-invalid-fetch-options"?: Linter.RuleEntry<[]>;
|
|
19662
20004
|
/**
|
|
19663
20005
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
19664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
19665
20007
|
*/
|
|
19666
20008
|
"unicorn/no-invalid-remove-event-listener"?: Linter.RuleEntry<[]>;
|
|
19667
20009
|
/**
|
|
19668
20010
|
* Disallow identifiers starting with `new` or `class`.
|
|
19669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-keyword-prefix.md
|
|
19670
20012
|
*/
|
|
19671
20013
|
"unicorn/no-keyword-prefix"?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
19672
20014
|
/**
|
|
19673
20015
|
* Disallow using `.length` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
19674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-length-as-slice-end.md
|
|
19675
20017
|
*/
|
|
19676
20018
|
"unicorn/no-length-as-slice-end"?: Linter.RuleEntry<[]>;
|
|
19677
20019
|
/**
|
|
19678
20020
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
19679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-lonely-if.md
|
|
19680
20022
|
*/
|
|
19681
20023
|
"unicorn/no-lonely-if"?: Linter.RuleEntry<[]>;
|
|
19682
20024
|
/**
|
|
19683
20025
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
19684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
19685
20027
|
*/
|
|
19686
20028
|
"unicorn/no-magic-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
19687
20029
|
/**
|
|
19688
20030
|
* Disallow negated conditions.
|
|
19689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negated-condition.md
|
|
19690
20032
|
*/
|
|
19691
20033
|
"unicorn/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
19692
20034
|
/**
|
|
19693
20035
|
* Disallow negated expression in equality check.
|
|
19694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-negation-in-equality-check.md
|
|
19695
20037
|
*/
|
|
19696
20038
|
"unicorn/no-negation-in-equality-check"?: Linter.RuleEntry<[]>;
|
|
19697
20039
|
/**
|
|
19698
20040
|
* Disallow nested ternary expressions.
|
|
19699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20041
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-nested-ternary.md
|
|
19700
20042
|
*/
|
|
19701
20043
|
"unicorn/no-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
19702
20044
|
/**
|
|
19703
20045
|
* Disallow `new Array()`.
|
|
19704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20046
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-array.md
|
|
19705
20047
|
*/
|
|
19706
20048
|
"unicorn/no-new-array"?: Linter.RuleEntry<[]>;
|
|
19707
20049
|
/**
|
|
19708
20050
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
19709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-new-buffer.md
|
|
19710
20052
|
*/
|
|
19711
20053
|
"unicorn/no-new-buffer"?: Linter.RuleEntry<[]>;
|
|
19712
20054
|
/**
|
|
19713
20055
|
* Disallow the use of the `null` literal.
|
|
19714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-null.md
|
|
19715
20057
|
*/
|
|
19716
20058
|
"unicorn/no-null"?: Linter.RuleEntry<UnicornNoNull>;
|
|
19717
20059
|
/**
|
|
19718
20060
|
* Disallow the use of objects as default parameters.
|
|
19719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-object-as-default-parameter.md
|
|
19720
20062
|
*/
|
|
19721
20063
|
"unicorn/no-object-as-default-parameter"?: Linter.RuleEntry<[]>;
|
|
19722
20064
|
/**
|
|
19723
20065
|
* Disallow `process.exit()`.
|
|
19724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20066
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-process-exit.md
|
|
19725
20067
|
*/
|
|
19726
20068
|
"unicorn/no-process-exit"?: Linter.RuleEntry<[]>;
|
|
19727
20069
|
/**
|
|
19728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-reduce
|
|
19729
20071
|
* @deprecated
|
|
19730
20072
|
*/
|
|
19731
20073
|
"unicorn/no-reduce"?: Linter.RuleEntry<[]>;
|
|
19732
20074
|
/**
|
|
19733
20075
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
19734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
19735
20077
|
*/
|
|
19736
20078
|
"unicorn/no-single-promise-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
19737
20079
|
/**
|
|
19738
20080
|
* Disallow classes that only have static members.
|
|
19739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-static-only-class.md
|
|
19740
20082
|
*/
|
|
19741
20083
|
"unicorn/no-static-only-class"?: Linter.RuleEntry<[]>;
|
|
19742
20084
|
/**
|
|
19743
20085
|
* Disallow `then` property.
|
|
19744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-thenable.md
|
|
19745
20087
|
*/
|
|
19746
20088
|
"unicorn/no-thenable"?: Linter.RuleEntry<[]>;
|
|
19747
20089
|
/**
|
|
19748
20090
|
* Disallow assigning `this` to a variable.
|
|
19749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-this-assignment.md
|
|
19750
20092
|
*/
|
|
19751
20093
|
"unicorn/no-this-assignment"?: Linter.RuleEntry<[]>;
|
|
19752
20094
|
/**
|
|
19753
20095
|
* Disallow comparing `undefined` using `typeof`.
|
|
19754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20096
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-typeof-undefined.md
|
|
19755
20097
|
*/
|
|
19756
20098
|
"unicorn/no-typeof-undefined"?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
19757
20099
|
/**
|
|
19758
20100
|
* Disallow awaiting non-promise values.
|
|
19759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-await.md
|
|
19760
20102
|
*/
|
|
19761
20103
|
"unicorn/no-unnecessary-await"?: Linter.RuleEntry<[]>;
|
|
19762
20104
|
/**
|
|
19763
20105
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
19764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20106
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
19765
20107
|
*/
|
|
19766
20108
|
"unicorn/no-unnecessary-polyfills"?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
19767
20109
|
/**
|
|
19768
20110
|
* Disallow unreadable array destructuring.
|
|
19769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
19770
20112
|
*/
|
|
19771
20113
|
"unicorn/no-unreadable-array-destructuring"?: Linter.RuleEntry<[]>;
|
|
19772
20114
|
/**
|
|
19773
20115
|
* Disallow unreadable IIFEs.
|
|
19774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unreadable-iife.md
|
|
19775
20117
|
*/
|
|
19776
20118
|
"unicorn/no-unreadable-iife"?: Linter.RuleEntry<[]>;
|
|
19777
20119
|
/**
|
|
19778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#no-unsafe-regex
|
|
19779
20121
|
* @deprecated
|
|
19780
20122
|
*/
|
|
19781
20123
|
"unicorn/no-unsafe-regex"?: Linter.RuleEntry<[]>;
|
|
19782
20124
|
/**
|
|
19783
20125
|
* Disallow unused object properties.
|
|
19784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-unused-properties.md
|
|
19785
20127
|
*/
|
|
19786
20128
|
"unicorn/no-unused-properties"?: Linter.RuleEntry<[]>;
|
|
19787
20129
|
/**
|
|
19788
20130
|
* Disallow useless fallback when spreading in object literals.
|
|
19789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
19790
20132
|
*/
|
|
19791
20133
|
"unicorn/no-useless-fallback-in-spread"?: Linter.RuleEntry<[]>;
|
|
19792
20134
|
/**
|
|
19793
20135
|
* Disallow useless array length check.
|
|
19794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-length-check.md
|
|
19795
20137
|
*/
|
|
19796
20138
|
"unicorn/no-useless-length-check"?: Linter.RuleEntry<[]>;
|
|
19797
20139
|
/**
|
|
19798
20140
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
19799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
19800
20142
|
*/
|
|
19801
20143
|
"unicorn/no-useless-promise-resolve-reject"?: Linter.RuleEntry<[]>;
|
|
19802
20144
|
/**
|
|
19803
20145
|
* Disallow unnecessary spread.
|
|
19804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-spread.md
|
|
19805
20147
|
*/
|
|
19806
20148
|
"unicorn/no-useless-spread"?: Linter.RuleEntry<[]>;
|
|
19807
20149
|
/**
|
|
19808
20150
|
* Disallow useless case in switch statements.
|
|
19809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-switch-case.md
|
|
19810
20152
|
*/
|
|
19811
20153
|
"unicorn/no-useless-switch-case"?: Linter.RuleEntry<[]>;
|
|
19812
20154
|
/**
|
|
19813
20155
|
* Disallow useless `undefined`.
|
|
19814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-useless-undefined.md
|
|
19815
20157
|
*/
|
|
19816
20158
|
"unicorn/no-useless-undefined"?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
19817
20159
|
/**
|
|
19818
20160
|
* Disallow number literals with zero fractions or dangling dots.
|
|
19819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/no-zero-fractions.md
|
|
19820
20162
|
*/
|
|
19821
20163
|
"unicorn/no-zero-fractions"?: Linter.RuleEntry<[]>;
|
|
19822
20164
|
/**
|
|
19823
20165
|
* Enforce proper case for numeric literals.
|
|
19824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/number-literal-case.md
|
|
19825
20167
|
*/
|
|
19826
20168
|
"unicorn/number-literal-case"?: Linter.RuleEntry<[]>;
|
|
19827
20169
|
/**
|
|
19828
20170
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
19829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/numeric-separators-style.md
|
|
19830
20172
|
*/
|
|
19831
20173
|
"unicorn/numeric-separators-style"?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
19832
20174
|
/**
|
|
19833
20175
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
19834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-add-event-listener.md
|
|
19835
20177
|
*/
|
|
19836
20178
|
"unicorn/prefer-add-event-listener"?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
19837
20179
|
/**
|
|
19838
20180
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
19839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-find.md
|
|
19840
20182
|
*/
|
|
19841
20183
|
"unicorn/prefer-array-find"?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
19842
20184
|
/**
|
|
19843
20185
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
19844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat.md
|
|
19845
20187
|
*/
|
|
19846
20188
|
"unicorn/prefer-array-flat"?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
19847
20189
|
/**
|
|
19848
20190
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
19849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-flat-map.md
|
|
19850
20192
|
*/
|
|
19851
20193
|
"unicorn/prefer-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
19852
20194
|
/**
|
|
19853
20195
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
19854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-index-of.md
|
|
19855
20197
|
*/
|
|
19856
20198
|
"unicorn/prefer-array-index-of"?: Linter.RuleEntry<[]>;
|
|
19857
20199
|
/**
|
|
19858
20200
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
19859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-array-some.md
|
|
19860
20202
|
*/
|
|
19861
20203
|
"unicorn/prefer-array-some"?: Linter.RuleEntry<[]>;
|
|
19862
20204
|
/**
|
|
19863
20205
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
19864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-at.md
|
|
19865
20207
|
*/
|
|
19866
20208
|
"unicorn/prefer-at"?: Linter.RuleEntry<UnicornPreferAt>;
|
|
19867
20209
|
/**
|
|
19868
20210
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
19869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
19870
20212
|
*/
|
|
19871
20213
|
"unicorn/prefer-blob-reading-methods"?: Linter.RuleEntry<[]>;
|
|
19872
20214
|
/**
|
|
19873
20215
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
19874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-code-point.md
|
|
19875
20217
|
*/
|
|
19876
20218
|
"unicorn/prefer-code-point"?: Linter.RuleEntry<[]>;
|
|
19877
20219
|
/**
|
|
19878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-dataset
|
|
19879
20221
|
* @deprecated
|
|
19880
20222
|
*/
|
|
19881
20223
|
"unicorn/prefer-dataset"?: Linter.RuleEntry<[]>;
|
|
19882
20224
|
/**
|
|
19883
20225
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
19884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-date-now.md
|
|
19885
20227
|
*/
|
|
19886
20228
|
"unicorn/prefer-date-now"?: Linter.RuleEntry<[]>;
|
|
19887
20229
|
/**
|
|
19888
20230
|
* Prefer default parameters over reassignment.
|
|
19889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-default-parameters.md
|
|
19890
20232
|
*/
|
|
19891
20233
|
"unicorn/prefer-default-parameters"?: Linter.RuleEntry<[]>;
|
|
19892
20234
|
/**
|
|
19893
20235
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
19894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-append.md
|
|
19895
20237
|
*/
|
|
19896
20238
|
"unicorn/prefer-dom-node-append"?: Linter.RuleEntry<[]>;
|
|
19897
20239
|
/**
|
|
19898
20240
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
19899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
19900
20242
|
*/
|
|
19901
20243
|
"unicorn/prefer-dom-node-dataset"?: Linter.RuleEntry<[]>;
|
|
19902
20244
|
/**
|
|
19903
20245
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
19904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-remove.md
|
|
19905
20247
|
*/
|
|
19906
20248
|
"unicorn/prefer-dom-node-remove"?: Linter.RuleEntry<[]>;
|
|
19907
20249
|
/**
|
|
19908
20250
|
* Prefer `.textContent` over `.innerText`.
|
|
19909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
19910
20252
|
*/
|
|
19911
20253
|
"unicorn/prefer-dom-node-text-content"?: Linter.RuleEntry<[]>;
|
|
19912
20254
|
/**
|
|
19913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-event-key
|
|
19914
20256
|
* @deprecated
|
|
19915
20257
|
*/
|
|
19916
20258
|
"unicorn/prefer-event-key"?: Linter.RuleEntry<[]>;
|
|
19917
20259
|
/**
|
|
19918
20260
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
19919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-event-target.md
|
|
19920
20262
|
*/
|
|
19921
20263
|
"unicorn/prefer-event-target"?: Linter.RuleEntry<[]>;
|
|
19922
20264
|
/**
|
|
19923
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
19924
20266
|
* @deprecated
|
|
19925
20267
|
*/
|
|
19926
20268
|
"unicorn/prefer-exponentiation-operator"?: Linter.RuleEntry<[]>;
|
|
19927
20269
|
/**
|
|
19928
20270
|
* Prefer `export…from` when re-exporting.
|
|
19929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-export-from.md
|
|
19930
20272
|
*/
|
|
19931
20273
|
"unicorn/prefer-export-from"?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
19932
20274
|
/**
|
|
19933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-flat-map
|
|
19934
20276
|
* @deprecated
|
|
19935
20277
|
*/
|
|
19936
20278
|
"unicorn/prefer-flat-map"?: Linter.RuleEntry<[]>;
|
|
20279
|
+
/**
|
|
20280
|
+
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
20281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-global-this.md
|
|
20282
|
+
*/
|
|
20283
|
+
"unicorn/prefer-global-this"?: Linter.RuleEntry<[]>;
|
|
19937
20284
|
/**
|
|
19938
20285
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
19939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-includes.md
|
|
19940
20287
|
*/
|
|
19941
20288
|
"unicorn/prefer-includes"?: Linter.RuleEntry<[]>;
|
|
19942
20289
|
/**
|
|
19943
20290
|
* Prefer reading a JSON file as a buffer.
|
|
19944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
19945
20292
|
*/
|
|
19946
20293
|
"unicorn/prefer-json-parse-buffer"?: Linter.RuleEntry<[]>;
|
|
19947
20294
|
/**
|
|
19948
20295
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
19949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
19950
20297
|
*/
|
|
19951
20298
|
"unicorn/prefer-keyboard-event-key"?: Linter.RuleEntry<[]>;
|
|
19952
20299
|
/**
|
|
19953
20300
|
* Prefer using a logical operator over a ternary.
|
|
19954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
19955
20302
|
*/
|
|
19956
20303
|
"unicorn/prefer-logical-operator-over-ternary"?: Linter.RuleEntry<[]>;
|
|
20304
|
+
/**
|
|
20305
|
+
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
20306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-min-max.md
|
|
20307
|
+
*/
|
|
20308
|
+
"unicorn/prefer-math-min-max"?: Linter.RuleEntry<[]>;
|
|
19957
20309
|
/**
|
|
19958
20310
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
19959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-math-trunc.md
|
|
19960
20312
|
*/
|
|
19961
20313
|
"unicorn/prefer-math-trunc"?: Linter.RuleEntry<[]>;
|
|
19962
20314
|
/**
|
|
19963
20315
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
19964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
19965
20317
|
*/
|
|
19966
20318
|
"unicorn/prefer-modern-dom-apis"?: Linter.RuleEntry<[]>;
|
|
19967
20319
|
/**
|
|
19968
20320
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
19969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-modern-math-apis.md
|
|
19970
20322
|
*/
|
|
19971
20323
|
"unicorn/prefer-modern-math-apis"?: Linter.RuleEntry<[]>;
|
|
19972
20324
|
/**
|
|
19973
20325
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
19974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-module.md
|
|
19975
20327
|
*/
|
|
19976
20328
|
"unicorn/prefer-module"?: Linter.RuleEntry<[]>;
|
|
19977
20329
|
/**
|
|
19978
20330
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
19979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
19980
20332
|
*/
|
|
19981
20333
|
"unicorn/prefer-native-coercion-functions"?: Linter.RuleEntry<[]>;
|
|
19982
20334
|
/**
|
|
19983
20335
|
* Prefer negative index over `.length - index` when possible.
|
|
19984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-negative-index.md
|
|
19985
20337
|
*/
|
|
19986
20338
|
"unicorn/prefer-negative-index"?: Linter.RuleEntry<[]>;
|
|
19987
20339
|
/**
|
|
19988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-append
|
|
19989
20341
|
* @deprecated
|
|
19990
20342
|
*/
|
|
19991
20343
|
"unicorn/prefer-node-append"?: Linter.RuleEntry<[]>;
|
|
19992
20344
|
/**
|
|
19993
20345
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
19994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-node-protocol.md
|
|
19995
20347
|
*/
|
|
19996
20348
|
"unicorn/prefer-node-protocol"?: Linter.RuleEntry<[]>;
|
|
19997
20349
|
/**
|
|
19998
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-node-remove
|
|
19999
20351
|
* @deprecated
|
|
20000
20352
|
*/
|
|
20001
20353
|
"unicorn/prefer-node-remove"?: Linter.RuleEntry<[]>;
|
|
20002
20354
|
/**
|
|
20003
20355
|
* Prefer `Number` static properties over global ones.
|
|
20004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-number-properties.md
|
|
20005
20357
|
*/
|
|
20006
20358
|
"unicorn/prefer-number-properties"?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
20007
20359
|
/**
|
|
20008
20360
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
20009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-object-from-entries.md
|
|
20010
20362
|
*/
|
|
20011
20363
|
"unicorn/prefer-object-from-entries"?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
20012
20364
|
/**
|
|
20013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-object-has-own
|
|
20014
20366
|
* @deprecated
|
|
20015
20367
|
*/
|
|
20016
20368
|
"unicorn/prefer-object-has-own"?: Linter.RuleEntry<[]>;
|
|
20017
20369
|
/**
|
|
20018
20370
|
* Prefer omitting the `catch` binding parameter.
|
|
20019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
20020
20372
|
*/
|
|
20021
20373
|
"unicorn/prefer-optional-catch-binding"?: Linter.RuleEntry<[]>;
|
|
20022
20374
|
/**
|
|
20023
20375
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
20024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-prototype-methods.md
|
|
20025
20377
|
*/
|
|
20026
20378
|
"unicorn/prefer-prototype-methods"?: Linter.RuleEntry<[]>;
|
|
20027
20379
|
/**
|
|
20028
|
-
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
|
|
20029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20380
|
+
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
20381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-query-selector.md
|
|
20030
20382
|
*/
|
|
20031
20383
|
"unicorn/prefer-query-selector"?: Linter.RuleEntry<[]>;
|
|
20032
20384
|
/**
|
|
20033
20385
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
20034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-reflect-apply.md
|
|
20035
20387
|
*/
|
|
20036
20388
|
"unicorn/prefer-reflect-apply"?: Linter.RuleEntry<[]>;
|
|
20037
20389
|
/**
|
|
20038
20390
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
20039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-regexp-test.md
|
|
20040
20392
|
*/
|
|
20041
20393
|
"unicorn/prefer-regexp-test"?: Linter.RuleEntry<[]>;
|
|
20042
20394
|
/**
|
|
20043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-replace-all
|
|
20044
20396
|
* @deprecated
|
|
20045
20397
|
*/
|
|
20046
20398
|
"unicorn/prefer-replace-all"?: Linter.RuleEntry<[]>;
|
|
20047
20399
|
/**
|
|
20048
20400
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
20049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-has.md
|
|
20050
20402
|
*/
|
|
20051
20403
|
"unicorn/prefer-set-has"?: Linter.RuleEntry<[]>;
|
|
20052
20404
|
/**
|
|
20053
20405
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
20054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-set-size.md
|
|
20055
20407
|
*/
|
|
20056
20408
|
"unicorn/prefer-set-size"?: Linter.RuleEntry<[]>;
|
|
20057
20409
|
/**
|
|
20058
20410
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
20059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-spread.md
|
|
20060
20412
|
*/
|
|
20061
20413
|
"unicorn/prefer-spread"?: Linter.RuleEntry<[]>;
|
|
20062
20414
|
/**
|
|
20063
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
20064
20416
|
* @deprecated
|
|
20065
20417
|
*/
|
|
20066
20418
|
"unicorn/prefer-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
20067
20419
|
/**
|
|
20068
20420
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
20069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-raw.md
|
|
20070
20422
|
*/
|
|
20071
20423
|
"unicorn/prefer-string-raw"?: Linter.RuleEntry<[]>;
|
|
20072
20424
|
/**
|
|
20073
20425
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
20074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-replace-all.md
|
|
20075
20427
|
*/
|
|
20076
20428
|
"unicorn/prefer-string-replace-all"?: Linter.RuleEntry<[]>;
|
|
20077
20429
|
/**
|
|
20078
20430
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
20079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-slice.md
|
|
20080
20432
|
*/
|
|
20081
20433
|
"unicorn/prefer-string-slice"?: Linter.RuleEntry<[]>;
|
|
20082
20434
|
/**
|
|
20083
20435
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
20084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
20085
20437
|
*/
|
|
20086
20438
|
"unicorn/prefer-string-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
20087
20439
|
/**
|
|
20088
20440
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
20089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
20090
20442
|
*/
|
|
20091
20443
|
"unicorn/prefer-string-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
20092
20444
|
/**
|
|
20093
20445
|
* Prefer using `structuredClone` to create a deep clone.
|
|
20094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-structured-clone.md
|
|
20095
20447
|
*/
|
|
20096
20448
|
"unicorn/prefer-structured-clone"?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
20097
20449
|
/**
|
|
20098
20450
|
* Prefer `switch` over multiple `else-if`.
|
|
20099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-switch.md
|
|
20100
20452
|
*/
|
|
20101
20453
|
"unicorn/prefer-switch"?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
20102
20454
|
/**
|
|
20103
20455
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
20104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-ternary.md
|
|
20105
20457
|
*/
|
|
20106
20458
|
"unicorn/prefer-ternary"?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
20107
20459
|
/**
|
|
20108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-text-content
|
|
20109
20461
|
* @deprecated
|
|
20110
20462
|
*/
|
|
20111
20463
|
"unicorn/prefer-text-content"?: Linter.RuleEntry<[]>;
|
|
20112
20464
|
/**
|
|
20113
20465
|
* Prefer top-level await over top-level promises and async function calls.
|
|
20114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-top-level-await.md
|
|
20115
20467
|
*/
|
|
20116
20468
|
"unicorn/prefer-top-level-await"?: Linter.RuleEntry<[]>;
|
|
20117
20469
|
/**
|
|
20118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#prefer-trim-start-end
|
|
20119
20471
|
* @deprecated
|
|
20120
20472
|
*/
|
|
20121
20473
|
"unicorn/prefer-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
20122
20474
|
/**
|
|
20123
20475
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
20124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prefer-type-error.md
|
|
20125
20477
|
*/
|
|
20126
20478
|
"unicorn/prefer-type-error"?: Linter.RuleEntry<[]>;
|
|
20127
20479
|
/**
|
|
20128
20480
|
* Prevent abbreviations.
|
|
20129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/prevent-abbreviations.md
|
|
20130
20482
|
*/
|
|
20131
20483
|
"unicorn/prevent-abbreviations"?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
20132
20484
|
/**
|
|
20133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/deprecated-rules.md#regex-shorthand
|
|
20134
20486
|
* @deprecated
|
|
20135
20487
|
*/
|
|
20136
20488
|
"unicorn/regex-shorthand"?: Linter.RuleEntry<[]>;
|
|
20137
20489
|
/**
|
|
20138
20490
|
* Enforce consistent relative URL style.
|
|
20139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/relative-url-style.md
|
|
20140
20492
|
*/
|
|
20141
20493
|
"unicorn/relative-url-style"?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
20142
20494
|
/**
|
|
20143
20495
|
* Enforce using the separator argument with `Array#join()`.
|
|
20144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-array-join-separator.md
|
|
20145
20497
|
*/
|
|
20146
20498
|
"unicorn/require-array-join-separator"?: Linter.RuleEntry<[]>;
|
|
20147
20499
|
/**
|
|
20148
20500
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
20149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
20150
20502
|
*/
|
|
20151
20503
|
"unicorn/require-number-to-fixed-digits-argument"?: Linter.RuleEntry<[]>;
|
|
20152
20504
|
/**
|
|
20153
20505
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
20154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/require-post-message-target-origin.md
|
|
20155
20507
|
*/
|
|
20156
20508
|
"unicorn/require-post-message-target-origin"?: Linter.RuleEntry<[]>;
|
|
20157
20509
|
/**
|
|
20158
20510
|
* Enforce better string content.
|
|
20159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/string-content.md
|
|
20160
20512
|
*/
|
|
20161
20513
|
"unicorn/string-content"?: Linter.RuleEntry<UnicornStringContent>;
|
|
20162
20514
|
/**
|
|
20163
20515
|
* Enforce consistent brace style for `case` clauses.
|
|
20164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/switch-case-braces.md
|
|
20165
20517
|
*/
|
|
20166
20518
|
"unicorn/switch-case-braces"?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
20167
20519
|
/**
|
|
20168
20520
|
* Fix whitespace-insensitive template indentation.
|
|
20169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/template-indent.md
|
|
20170
20522
|
*/
|
|
20171
20523
|
"unicorn/template-indent"?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
20172
20524
|
/**
|
|
20173
20525
|
* Enforce consistent case for text encoding identifiers.
|
|
20174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/text-encoding-identifier-case.md
|
|
20175
20527
|
*/
|
|
20176
20528
|
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<[]>;
|
|
20177
20529
|
/**
|
|
20178
20530
|
* Require `new` when creating an error.
|
|
20179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v56.0.0/docs/rules/throw-new-error.md
|
|
20180
20532
|
*/
|
|
20181
20533
|
"unicorn/throw-new-error"?: Linter.RuleEntry<[]>;
|
|
20182
20534
|
}
|
|
@@ -21290,6 +21642,7 @@ declare const GLOB_JSON5 = "**/*.json5";
|
|
|
21290
21642
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
21291
21643
|
declare const GLOB_TOML = "**/*.toml";
|
|
21292
21644
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
21645
|
+
declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
21293
21646
|
declare const GLOB_GRAPHQL: string[];
|
|
21294
21647
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
21295
21648
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
@@ -21300,7 +21653,7 @@ declare const GLOB_ALL_SRC: string[];
|
|
|
21300
21653
|
declare const GLOB_EXCLUDE: string[];
|
|
21301
21654
|
|
|
21302
21655
|
declare function importPluginReact(): Promise<{
|
|
21303
|
-
pluginReact:
|
|
21656
|
+
pluginReact: typeof eslint_plugin_react;
|
|
21304
21657
|
}>;
|
|
21305
21658
|
declare function importPluginReactHooks(): Promise<{
|
|
21306
21659
|
pluginReactHooks: any;
|
|
@@ -21309,7 +21662,7 @@ declare function importPluginReactRefresh(): Promise<{
|
|
|
21309
21662
|
pluginReactRefresh: any;
|
|
21310
21663
|
}>;
|
|
21311
21664
|
declare function importReactPlugins(): Promise<{
|
|
21312
|
-
pluginReact:
|
|
21665
|
+
pluginReact: typeof eslint_plugin_react;
|
|
21313
21666
|
pluginReactHooks: any;
|
|
21314
21667
|
pluginReactRefresh: any;
|
|
21315
21668
|
}>;
|
|
@@ -22247,7 +22600,9 @@ declare function importYmlLibs(): Promise<{
|
|
|
22247
22600
|
};
|
|
22248
22601
|
}>;
|
|
22249
22602
|
declare function importPluginMarkdown(): Promise<{
|
|
22250
|
-
pluginMarkdown:
|
|
22603
|
+
pluginMarkdown: eslint.ESLint.Plugin & {
|
|
22604
|
+
languages: Record<string, _eslint_markdown.Language>;
|
|
22605
|
+
};
|
|
22251
22606
|
}>;
|
|
22252
22607
|
declare function importPluginJsdoc(): Promise<{
|
|
22253
22608
|
pluginJsdoc: eslint.ESLint.Plugin & {
|
|
@@ -22257,7 +22612,7 @@ declare function importPluginJsdoc(): Promise<{
|
|
|
22257
22612
|
declare function importPluginTsdoc(): Promise<{
|
|
22258
22613
|
pluginTsdoc: {
|
|
22259
22614
|
rules: {
|
|
22260
|
-
[x: string]:
|
|
22615
|
+
[x: string]: Rule.RuleModule;
|
|
22261
22616
|
};
|
|
22262
22617
|
};
|
|
22263
22618
|
}>;
|
|
@@ -22267,6 +22622,9 @@ declare function importPluginStylistic(): Promise<{
|
|
|
22267
22622
|
declare function importPluginTailwind(): Promise<{
|
|
22268
22623
|
pluginTailwind: any;
|
|
22269
22624
|
}>;
|
|
22625
|
+
declare function safeImportPluginTailwind(): Promise<neverthrow.Ok<{
|
|
22626
|
+
pluginTailwind: any;
|
|
22627
|
+
}, never> | neverthrow.Err<never, Error>>;
|
|
22270
22628
|
|
|
22271
22629
|
declare function jssestd(): Promise<TypedFlatConfigItem[]>;
|
|
22272
22630
|
declare function jsseReact(): Promise<TypedFlatConfigItem[]>;
|
|
@@ -22291,5 +22649,31 @@ declare function isInEditor(): boolean;
|
|
|
22291
22649
|
* @returns unique strings
|
|
22292
22650
|
*/
|
|
22293
22651
|
declare function uniqueStrings(...strings: (string | string[])[]): string[];
|
|
22652
|
+
declare const parserPlain: {
|
|
22653
|
+
meta: {
|
|
22654
|
+
name: string;
|
|
22655
|
+
};
|
|
22656
|
+
parseForESLint: (code: string) => {
|
|
22657
|
+
ast: {
|
|
22658
|
+
body: never[];
|
|
22659
|
+
comments: never[];
|
|
22660
|
+
loc: {
|
|
22661
|
+
end: number;
|
|
22662
|
+
start: number;
|
|
22663
|
+
};
|
|
22664
|
+
range: number[];
|
|
22665
|
+
tokens: never[];
|
|
22666
|
+
type: string;
|
|
22667
|
+
};
|
|
22668
|
+
scopeManager: undefined;
|
|
22669
|
+
services: {
|
|
22670
|
+
isPlain: boolean;
|
|
22671
|
+
};
|
|
22672
|
+
visitorKeys: {
|
|
22673
|
+
Program: never[];
|
|
22674
|
+
};
|
|
22675
|
+
};
|
|
22676
|
+
};
|
|
22677
|
+
declare function turnOffRules(configs: TypedFlatConfigItem[], off: string[]): TypedFlatConfigItem[];
|
|
22294
22678
|
|
|
22295
|
-
export { type Awaitable, type EslintConfigFn, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JS_SRC_EXT, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_YAML, type LanguageOptions, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type PromiseFlatConfigItem, type RenamePefix, type RuleName, type Rules, SLOW_RULES, type StylisticConfig, type TailwindEslintSettings, type TailwindOptions, type TypedFlatConfigItem, type TypedFlatConfigItemWithId, combine, combineAsync, jsse as default, importJsoncLibs, importParserJsonc, importPluginJsdoc, importPluginJsonc, importPluginMarkdown, importPluginReact, importPluginReactHooks, importPluginReactRefresh, importPluginStylistic, importPluginTailwind, importPluginTsdoc, importReactPlugins, importYmlLibs, interopDefault, isCI, isInEditor, jsse, jsseReact, jssestd, renameRules, uniqueStrings };
|
|
22679
|
+
export { type Awaitable, type EslintConfigFn, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JS_SRC_EXT, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_YAML, type LanguageOptions, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type PromiseFlatConfigItem, type RenamePefix, type RuleName, type Rules, SLOW_RULES, type StylisticConfig, type TailwindEslintSettings, type TailwindOptions, type TypedFlatConfigItem, type TypedFlatConfigItemWithId, combine, combineAsync, jsse as default, importJsoncLibs, importParserJsonc, importPluginJsdoc, importPluginJsonc, importPluginMarkdown, importPluginReact, importPluginReactHooks, importPluginReactRefresh, importPluginStylistic, importPluginTailwind, importPluginTsdoc, importReactPlugins, importYmlLibs, interopDefault, isCI, isInEditor, jsse, jsseReact, jssestd, parserPlain, renameRules, safeImportPluginTailwind, turnOffRules, uniqueStrings };
|