@jsse/eslint-config 0.1.13 → 0.1.15
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.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +35 -4
- package/dist/index.d.cts +367 -254
- package/dist/index.d.ts +367 -254
- package/dist/index.js +35 -4
- package/package.json +17 -17
package/dist/index.d.cts
CHANGED
|
@@ -4147,6 +4147,11 @@ interface AntfuRuleOptions {
|
|
|
4147
4147
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/import-dedupe.md
|
|
4148
4148
|
*/
|
|
4149
4149
|
"antfu/import-dedupe"?: Linter.RuleEntry<[]>;
|
|
4150
|
+
/**
|
|
4151
|
+
* Enforce consistent indentation in `unindent` template tag
|
|
4152
|
+
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/indent-unindent.test.ts
|
|
4153
|
+
*/
|
|
4154
|
+
"antfu/indent-unindent"?: Linter.RuleEntry<AntfuIndentUnindent>;
|
|
4150
4155
|
/**
|
|
4151
4156
|
* Prevent importing modules in `dist` folder
|
|
4152
4157
|
* @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-dist.test.ts
|
|
@@ -4191,6 +4196,16 @@ type AntfuConsistentListNewline =
|
|
|
4191
4196
|
TSTypeParameterInstantiation?: boolean;
|
|
4192
4197
|
ObjectPattern?: boolean;
|
|
4193
4198
|
ArrayPattern?: boolean;
|
|
4199
|
+
JSXOpeningElement?: boolean;
|
|
4200
|
+
},
|
|
4201
|
+
];
|
|
4202
|
+
// ----- antfu/indent-unindent -----
|
|
4203
|
+
type AntfuIndentUnindent =
|
|
4204
|
+
| []
|
|
4205
|
+
| [
|
|
4206
|
+
{
|
|
4207
|
+
indent?: number;
|
|
4208
|
+
tags?: string[];
|
|
4194
4209
|
},
|
|
4195
4210
|
];
|
|
4196
4211
|
|
|
@@ -6846,6 +6861,9 @@ type NHashbang =
|
|
|
6846
6861
|
];
|
|
6847
6862
|
ignoreUnpublished?: boolean;
|
|
6848
6863
|
additionalExecutables?: string[];
|
|
6864
|
+
executableMap?: {
|
|
6865
|
+
[k: string]: string;
|
|
6866
|
+
};
|
|
6849
6867
|
},
|
|
6850
6868
|
];
|
|
6851
6869
|
// ----- n/no-deprecated-api -----
|
|
@@ -7512,89 +7530,6 @@ type NNoUnsupportedFeaturesEsBuiltins =
|
|
|
7512
7530
|
| "parseFloat"
|
|
7513
7531
|
| "parseInt"
|
|
7514
7532
|
| "unescape"
|
|
7515
|
-
| "AbortController"
|
|
7516
|
-
| "AbortSignal"
|
|
7517
|
-
| "AbortSignal.abort"
|
|
7518
|
-
| "AbortSignal.any"
|
|
7519
|
-
| "AbortSignal.timeout"
|
|
7520
|
-
| "Blob"
|
|
7521
|
-
| "BroadcastChannel"
|
|
7522
|
-
| "ByteLengthQueuingStrategy"
|
|
7523
|
-
| "CompressionStream"
|
|
7524
|
-
| "CountQueuingStrategy"
|
|
7525
|
-
| "Crypto"
|
|
7526
|
-
| "CryptoKey"
|
|
7527
|
-
| "CustomEvent"
|
|
7528
|
-
| "DOMException"
|
|
7529
|
-
| "DecompressionStream"
|
|
7530
|
-
| "Event"
|
|
7531
|
-
| "EventTarget"
|
|
7532
|
-
| "FormData"
|
|
7533
|
-
| "Headers"
|
|
7534
|
-
| "MessageChannel"
|
|
7535
|
-
| "MessageEvent"
|
|
7536
|
-
| "MessagePort"
|
|
7537
|
-
| "Performance"
|
|
7538
|
-
| "PerformanceEntry"
|
|
7539
|
-
| "PerformanceMark"
|
|
7540
|
-
| "PerformanceMeasure"
|
|
7541
|
-
| "PerformanceObserver"
|
|
7542
|
-
| "PerformanceObserver.supportedEntryTypes"
|
|
7543
|
-
| "PerformanceObserverEntryList"
|
|
7544
|
-
| "ReadableByteStreamController"
|
|
7545
|
-
| "ReadableStream"
|
|
7546
|
-
| "ReadableStream.from"
|
|
7547
|
-
| "ReadableStreamBYOBReader"
|
|
7548
|
-
| "ReadableStreamBYOBRequest"
|
|
7549
|
-
| "ReadableStreamDefaultController"
|
|
7550
|
-
| "ReadableStreamDefaultReader"
|
|
7551
|
-
| "Request"
|
|
7552
|
-
| "Response"
|
|
7553
|
-
| "SubtleCrypto"
|
|
7554
|
-
| "TextDecoder"
|
|
7555
|
-
| "TextDecoderStream"
|
|
7556
|
-
| "TextEncoder"
|
|
7557
|
-
| "TextEncoderStream"
|
|
7558
|
-
| "TransformStream"
|
|
7559
|
-
| "TransformStreamDefaultController"
|
|
7560
|
-
| "URL"
|
|
7561
|
-
| "URL.canParse"
|
|
7562
|
-
| "URL.createObjectURL"
|
|
7563
|
-
| "URL.revokeObjectURL"
|
|
7564
|
-
| "URLSearchParams"
|
|
7565
|
-
| "Worker"
|
|
7566
|
-
| "WritableStream"
|
|
7567
|
-
| "WritableStreamDefaultController"
|
|
7568
|
-
| "WritableStreamDefaultWriter"
|
|
7569
|
-
| "atob"
|
|
7570
|
-
| "btoa"
|
|
7571
|
-
| "clearInterval"
|
|
7572
|
-
| "clearTimeout"
|
|
7573
|
-
| "console"
|
|
7574
|
-
| "console.assert"
|
|
7575
|
-
| "console.clear"
|
|
7576
|
-
| "console.countReset"
|
|
7577
|
-
| "console.count"
|
|
7578
|
-
| "console.debug"
|
|
7579
|
-
| "console.dir"
|
|
7580
|
-
| "console.dirxml"
|
|
7581
|
-
| "console.error"
|
|
7582
|
-
| "console.groupCollapsed"
|
|
7583
|
-
| "console.groupEnd"
|
|
7584
|
-
| "console.group"
|
|
7585
|
-
| "console.info"
|
|
7586
|
-
| "console.log"
|
|
7587
|
-
| "console.table"
|
|
7588
|
-
| "console.timeEnd"
|
|
7589
|
-
| "console.timeLog"
|
|
7590
|
-
| "console.time"
|
|
7591
|
-
| "console.trace"
|
|
7592
|
-
| "console.warn"
|
|
7593
|
-
| "fetch"
|
|
7594
|
-
| "queueMicrotask"
|
|
7595
|
-
| "setInterval"
|
|
7596
|
-
| "setTimeout"
|
|
7597
|
-
| "structuredClone"
|
|
7598
7533
|
)[];
|
|
7599
7534
|
},
|
|
7600
7535
|
];
|
|
@@ -8204,9 +8139,54 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8204
8139
|
| [
|
|
8205
8140
|
{
|
|
8206
8141
|
version?: string;
|
|
8142
|
+
allowExperimental?: boolean;
|
|
8207
8143
|
ignores?: (
|
|
8208
|
-
| "
|
|
8144
|
+
| "__filename"
|
|
8145
|
+
| "__dirname"
|
|
8146
|
+
| "require"
|
|
8147
|
+
| "require.cache"
|
|
8148
|
+
| "require.extensions"
|
|
8149
|
+
| "require.main"
|
|
8150
|
+
| "require.resolve"
|
|
8209
8151
|
| "require.resolve.paths"
|
|
8152
|
+
| "module"
|
|
8153
|
+
| "module.children"
|
|
8154
|
+
| "module.exports"
|
|
8155
|
+
| "module.filename"
|
|
8156
|
+
| "module.id"
|
|
8157
|
+
| "module.isPreloading"
|
|
8158
|
+
| "module.loaded"
|
|
8159
|
+
| "module.parent"
|
|
8160
|
+
| "module.path"
|
|
8161
|
+
| "module.paths"
|
|
8162
|
+
| "module.require"
|
|
8163
|
+
| "exports"
|
|
8164
|
+
| "AbortController"
|
|
8165
|
+
| "AbortSignal"
|
|
8166
|
+
| "AbortSignal.abort"
|
|
8167
|
+
| "AbortSignal.timeout"
|
|
8168
|
+
| "AbortSignal.any"
|
|
8169
|
+
| "DOMException"
|
|
8170
|
+
| "FormData"
|
|
8171
|
+
| "Headers"
|
|
8172
|
+
| "MessageEvent"
|
|
8173
|
+
| "Navigator"
|
|
8174
|
+
| "Request"
|
|
8175
|
+
| "Response"
|
|
8176
|
+
| "WebAssembly"
|
|
8177
|
+
| "WebSocket"
|
|
8178
|
+
| "fetch"
|
|
8179
|
+
| "global"
|
|
8180
|
+
| "queueMicrotask"
|
|
8181
|
+
| "navigator"
|
|
8182
|
+
| "navigator.hardwareConcurrency"
|
|
8183
|
+
| "navigator.language"
|
|
8184
|
+
| "navigator.languages"
|
|
8185
|
+
| "navigator.platform"
|
|
8186
|
+
| "navigator.userAgent"
|
|
8187
|
+
| "structuredClone"
|
|
8188
|
+
| "Blob"
|
|
8189
|
+
| "new Buffer()"
|
|
8210
8190
|
| "Buffer"
|
|
8211
8191
|
| "Buffer.alloc"
|
|
8212
8192
|
| "Buffer.allocUnsafe"
|
|
@@ -8218,13 +8198,9 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8218
8198
|
| "Buffer.from"
|
|
8219
8199
|
| "Buffer.isBuffer"
|
|
8220
8200
|
| "Buffer.isEncoding"
|
|
8221
|
-
| "
|
|
8222
|
-
| "
|
|
8223
|
-
| "
|
|
8224
|
-
| "URL.canParse"
|
|
8225
|
-
| "URL.createObjectURL"
|
|
8226
|
-
| "URL.revokeObjectURL"
|
|
8227
|
-
| "URLSearchParams"
|
|
8201
|
+
| "File"
|
|
8202
|
+
| "atob"
|
|
8203
|
+
| "btoa"
|
|
8228
8204
|
| "console"
|
|
8229
8205
|
| "console.profile"
|
|
8230
8206
|
| "console.profileEnd"
|
|
@@ -8249,8 +8225,38 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8249
8225
|
| "console.timeLog"
|
|
8250
8226
|
| "console.trace"
|
|
8251
8227
|
| "console.warn"
|
|
8228
|
+
| "crypto"
|
|
8229
|
+
| "crypto.subtle"
|
|
8230
|
+
| "crypto.subtle.decrypt"
|
|
8231
|
+
| "crypto.subtle.deriveBits"
|
|
8232
|
+
| "crypto.subtle.deriveKey"
|
|
8233
|
+
| "crypto.subtle.digest"
|
|
8234
|
+
| "crypto.subtle.encrypt"
|
|
8235
|
+
| "crypto.subtle.exportKey"
|
|
8236
|
+
| "crypto.subtle.generateKey"
|
|
8237
|
+
| "crypto.subtle.importKey"
|
|
8238
|
+
| "crypto.subtle.sign"
|
|
8239
|
+
| "crypto.subtle.unwrapKey"
|
|
8240
|
+
| "crypto.subtle.verify"
|
|
8241
|
+
| "crypto.subtle.wrapKey"
|
|
8242
|
+
| "crypto.getRandomValues"
|
|
8243
|
+
| "crypto.randomUUID"
|
|
8244
|
+
| "Crypto"
|
|
8245
|
+
| "CryptoKey"
|
|
8246
|
+
| "SubtleCrypto"
|
|
8247
|
+
| "CustomEvent"
|
|
8248
|
+
| "Event"
|
|
8249
|
+
| "EventTarget"
|
|
8250
|
+
| "PerformanceEntry"
|
|
8251
|
+
| "PerformanceMark"
|
|
8252
|
+
| "PerformanceMeasure"
|
|
8253
|
+
| "PerformanceObserver"
|
|
8254
|
+
| "PerformanceObserverEntryList"
|
|
8255
|
+
| "PerformanceResourceTiming"
|
|
8256
|
+
| "performance"
|
|
8252
8257
|
| "process"
|
|
8253
8258
|
| "process.allowedNodeEnvironmentFlags"
|
|
8259
|
+
| "process.availableMemory"
|
|
8254
8260
|
| "process.arch"
|
|
8255
8261
|
| "process.argv"
|
|
8256
8262
|
| "process.argv0"
|
|
@@ -8337,6 +8343,40 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8337
8343
|
| "process.setUncaughtExceptionCaptureCallback"
|
|
8338
8344
|
| "process.umask"
|
|
8339
8345
|
| "process.uptime"
|
|
8346
|
+
| "ReadableStream"
|
|
8347
|
+
| "ReadableStream.from"
|
|
8348
|
+
| "ReadableStreamDefaultReader"
|
|
8349
|
+
| "ReadableStreamBYOBReader"
|
|
8350
|
+
| "ReadableStreamDefaultController"
|
|
8351
|
+
| "ReadableByteStreamController"
|
|
8352
|
+
| "ReadableStreamBYOBRequest"
|
|
8353
|
+
| "WritableStream"
|
|
8354
|
+
| "WritableStreamDefaultWriter"
|
|
8355
|
+
| "WritableStreamDefaultController"
|
|
8356
|
+
| "TransformStream"
|
|
8357
|
+
| "TransformStreamDefaultController"
|
|
8358
|
+
| "ByteLengthQueuingStrategy"
|
|
8359
|
+
| "CountQueuingStrategy"
|
|
8360
|
+
| "TextEncoderStream"
|
|
8361
|
+
| "TextDecoderStream"
|
|
8362
|
+
| "CompressionStream"
|
|
8363
|
+
| "DecompressionStream"
|
|
8364
|
+
| "setInterval"
|
|
8365
|
+
| "clearInterval"
|
|
8366
|
+
| "setTimeout"
|
|
8367
|
+
| "clearTimeout"
|
|
8368
|
+
| "setImmediate"
|
|
8369
|
+
| "clearImmediate"
|
|
8370
|
+
| "URL"
|
|
8371
|
+
| "URL.canParse"
|
|
8372
|
+
| "URL.createObjectURL"
|
|
8373
|
+
| "URL.revokeObjectURL"
|
|
8374
|
+
| "URLSearchParams"
|
|
8375
|
+
| "TextDecoder"
|
|
8376
|
+
| "TextEncoder"
|
|
8377
|
+
| "BroadcastChannel"
|
|
8378
|
+
| "MessageChannel"
|
|
8379
|
+
| "MessagePort"
|
|
8340
8380
|
| "assert"
|
|
8341
8381
|
| "assert.assert"
|
|
8342
8382
|
| "assert.deepEqual"
|
|
@@ -8420,6 +8460,7 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8420
8460
|
| "buffer.transcode"
|
|
8421
8461
|
| "buffer.SlowBuffer"
|
|
8422
8462
|
| "buffer.Blob"
|
|
8463
|
+
| "new buffer.Buffer()"
|
|
8423
8464
|
| "buffer.Buffer"
|
|
8424
8465
|
| "buffer.Buffer.alloc"
|
|
8425
8466
|
| "buffer.Buffer.allocUnsafe"
|
|
@@ -8454,7 +8495,6 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8454
8495
|
| "cluster.setupMaster"
|
|
8455
8496
|
| "cluster.setupPrimary"
|
|
8456
8497
|
| "cluster.Worker"
|
|
8457
|
-
| "crypto"
|
|
8458
8498
|
| "crypto.constants"
|
|
8459
8499
|
| "crypto.fips"
|
|
8460
8500
|
| "crypto.webcrypto"
|
|
@@ -8473,19 +8513,6 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8473
8513
|
| "crypto.webcrypto.subtle.wrapKey"
|
|
8474
8514
|
| "crypto.webcrypto.getRandomValues"
|
|
8475
8515
|
| "crypto.webcrypto.randomUUID"
|
|
8476
|
-
| "crypto.subtle"
|
|
8477
|
-
| "crypto.subtle.decrypt"
|
|
8478
|
-
| "crypto.subtle.deriveBits"
|
|
8479
|
-
| "crypto.subtle.deriveKey"
|
|
8480
|
-
| "crypto.subtle.digest"
|
|
8481
|
-
| "crypto.subtle.encrypt"
|
|
8482
|
-
| "crypto.subtle.exportKey"
|
|
8483
|
-
| "crypto.subtle.generateKey"
|
|
8484
|
-
| "crypto.subtle.importKey"
|
|
8485
|
-
| "crypto.subtle.sign"
|
|
8486
|
-
| "crypto.subtle.unwrapKey"
|
|
8487
|
-
| "crypto.subtle.verify"
|
|
8488
|
-
| "crypto.subtle.wrapKey"
|
|
8489
8516
|
| "crypto.checkPrime"
|
|
8490
8517
|
| "crypto.checkPrimeSync"
|
|
8491
8518
|
| "crypto.createCipher"
|
|
@@ -8515,7 +8542,6 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8515
8542
|
| "crypto.getDiffieHellman"
|
|
8516
8543
|
| "crypto.getFips"
|
|
8517
8544
|
| "crypto.getHashes"
|
|
8518
|
-
| "crypto.getRandomValues"
|
|
8519
8545
|
| "crypto.hash"
|
|
8520
8546
|
| "crypto.hkdf"
|
|
8521
8547
|
| "crypto.hkdfSync"
|
|
@@ -8529,7 +8555,6 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8529
8555
|
| "crypto.randomFillSync"
|
|
8530
8556
|
| "crypto.randomFill"
|
|
8531
8557
|
| "crypto.randomInt"
|
|
8532
|
-
| "crypto.randomUUID"
|
|
8533
8558
|
| "crypto.scrypt"
|
|
8534
8559
|
| "crypto.scryptSync"
|
|
8535
8560
|
| "crypto.secureHeapUsed"
|
|
@@ -8548,7 +8573,11 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8548
8573
|
| "crypto.DiffieHellmanGroup"
|
|
8549
8574
|
| "crypto.ECDH"
|
|
8550
8575
|
| "crypto.ECDH.convertKey"
|
|
8576
|
+
| "crypto.Hash()"
|
|
8577
|
+
| "new crypto.Hash()"
|
|
8551
8578
|
| "crypto.Hash"
|
|
8579
|
+
| "crypto.Hmac()"
|
|
8580
|
+
| "new crypto.Hmac()"
|
|
8552
8581
|
| "crypto.Hmac"
|
|
8553
8582
|
| "crypto.KeyObject"
|
|
8554
8583
|
| "crypto.KeyObject.from"
|
|
@@ -8679,29 +8708,31 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8679
8708
|
| "events.addAbortListener"
|
|
8680
8709
|
| "fs"
|
|
8681
8710
|
| "fs.promises"
|
|
8682
|
-
| "fs.promises.
|
|
8711
|
+
| "fs.promises.FileHandle"
|
|
8683
8712
|
| "fs.promises.access"
|
|
8684
8713
|
| "fs.promises.appendFile"
|
|
8685
8714
|
| "fs.promises.chmod"
|
|
8686
8715
|
| "fs.promises.chown"
|
|
8716
|
+
| "fs.promises.constants"
|
|
8687
8717
|
| "fs.promises.copyFile"
|
|
8688
8718
|
| "fs.promises.cp"
|
|
8719
|
+
| "fs.promises.glob"
|
|
8689
8720
|
| "fs.promises.lchmod"
|
|
8690
8721
|
| "fs.promises.lchown"
|
|
8691
|
-
| "fs.promises.lutimes"
|
|
8692
8722
|
| "fs.promises.link"
|
|
8693
8723
|
| "fs.promises.lstat"
|
|
8724
|
+
| "fs.promises.lutimes"
|
|
8694
8725
|
| "fs.promises.mkdir"
|
|
8695
8726
|
| "fs.promises.mkdtemp"
|
|
8696
8727
|
| "fs.promises.open"
|
|
8697
8728
|
| "fs.promises.opendir"
|
|
8698
|
-
| "fs.promises.readdir"
|
|
8699
8729
|
| "fs.promises.readFile"
|
|
8730
|
+
| "fs.promises.readdir"
|
|
8700
8731
|
| "fs.promises.readlink"
|
|
8701
8732
|
| "fs.promises.realpath"
|
|
8702
8733
|
| "fs.promises.rename"
|
|
8703
|
-
| "fs.promises.rmdir"
|
|
8704
8734
|
| "fs.promises.rm"
|
|
8735
|
+
| "fs.promises.rmdir"
|
|
8705
8736
|
| "fs.promises.stat"
|
|
8706
8737
|
| "fs.promises.statfs"
|
|
8707
8738
|
| "fs.promises.symlink"
|
|
@@ -8710,7 +8741,6 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8710
8741
|
| "fs.promises.utimes"
|
|
8711
8742
|
| "fs.promises.watch"
|
|
8712
8743
|
| "fs.promises.writeFile"
|
|
8713
|
-
| "fs.promises.FileHandle"
|
|
8714
8744
|
| "fs.access"
|
|
8715
8745
|
| "fs.appendFile"
|
|
8716
8746
|
| "fs.chmod"
|
|
@@ -8728,13 +8758,15 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8728
8758
|
| "fs.fsync"
|
|
8729
8759
|
| "fs.ftruncate"
|
|
8730
8760
|
| "fs.futimes"
|
|
8761
|
+
| "fs.glob"
|
|
8731
8762
|
| "fs.lchmod"
|
|
8732
8763
|
| "fs.lchown"
|
|
8733
|
-
| "fs.lutimes"
|
|
8734
8764
|
| "fs.link"
|
|
8735
8765
|
| "fs.lstat"
|
|
8766
|
+
| "fs.lutimes"
|
|
8736
8767
|
| "fs.mkdir"
|
|
8737
8768
|
| "fs.mkdtemp"
|
|
8769
|
+
| "fs.native"
|
|
8738
8770
|
| "fs.open"
|
|
8739
8771
|
| "fs.openAsBlob"
|
|
8740
8772
|
| "fs.opendir"
|
|
@@ -8745,10 +8777,9 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8745
8777
|
| "fs.readv"
|
|
8746
8778
|
| "fs.realpath"
|
|
8747
8779
|
| "fs.realpath.native"
|
|
8748
|
-
| "fs.native"
|
|
8749
8780
|
| "fs.rename"
|
|
8750
|
-
| "fs.rmdir"
|
|
8751
8781
|
| "fs.rm"
|
|
8782
|
+
| "fs.rmdir"
|
|
8752
8783
|
| "fs.stat"
|
|
8753
8784
|
| "fs.statfs"
|
|
8754
8785
|
| "fs.symlink"
|
|
@@ -8776,11 +8807,12 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8776
8807
|
| "fs.fsyncSync"
|
|
8777
8808
|
| "fs.ftruncateSync"
|
|
8778
8809
|
| "fs.futimesSync"
|
|
8810
|
+
| "fs.globSync"
|
|
8779
8811
|
| "fs.lchmodSync"
|
|
8780
8812
|
| "fs.lchownSync"
|
|
8781
|
-
| "fs.lutimesSync"
|
|
8782
8813
|
| "fs.linkSync"
|
|
8783
8814
|
| "fs.lstatSync"
|
|
8815
|
+
| "fs.lutimesSync"
|
|
8784
8816
|
| "fs.mkdirSync"
|
|
8785
8817
|
| "fs.mkdtempSync"
|
|
8786
8818
|
| "fs.opendirSync"
|
|
@@ -8795,8 +8827,8 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8795
8827
|
| "fs.renameSync"
|
|
8796
8828
|
| "fs.rmdirSync"
|
|
8797
8829
|
| "fs.rmSync"
|
|
8798
|
-
| "fs.statSync"
|
|
8799
8830
|
| "fs.statfsSync"
|
|
8831
|
+
| "fs.statSync"
|
|
8800
8832
|
| "fs.symlinkSync"
|
|
8801
8833
|
| "fs.truncateSync"
|
|
8802
8834
|
| "fs.unlinkSync"
|
|
@@ -8810,34 +8842,38 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8810
8842
|
| "fs.FSWatcher"
|
|
8811
8843
|
| "fs.StatWatcher"
|
|
8812
8844
|
| "fs.ReadStream"
|
|
8845
|
+
| "fs.Stats()"
|
|
8846
|
+
| "new fs.Stats()"
|
|
8813
8847
|
| "fs.Stats"
|
|
8814
8848
|
| "fs.StatFs"
|
|
8815
8849
|
| "fs.WriteStream"
|
|
8816
8850
|
| "fs.common_objects"
|
|
8817
8851
|
| "fs/promises"
|
|
8818
|
-
| "fs/promises.
|
|
8852
|
+
| "fs/promises.FileHandle"
|
|
8819
8853
|
| "fs/promises.access"
|
|
8820
8854
|
| "fs/promises.appendFile"
|
|
8821
8855
|
| "fs/promises.chmod"
|
|
8822
8856
|
| "fs/promises.chown"
|
|
8857
|
+
| "fs/promises.constants"
|
|
8823
8858
|
| "fs/promises.copyFile"
|
|
8824
8859
|
| "fs/promises.cp"
|
|
8860
|
+
| "fs/promises.glob"
|
|
8825
8861
|
| "fs/promises.lchmod"
|
|
8826
8862
|
| "fs/promises.lchown"
|
|
8827
|
-
| "fs/promises.lutimes"
|
|
8828
8863
|
| "fs/promises.link"
|
|
8829
8864
|
| "fs/promises.lstat"
|
|
8865
|
+
| "fs/promises.lutimes"
|
|
8830
8866
|
| "fs/promises.mkdir"
|
|
8831
8867
|
| "fs/promises.mkdtemp"
|
|
8832
8868
|
| "fs/promises.open"
|
|
8833
8869
|
| "fs/promises.opendir"
|
|
8834
|
-
| "fs/promises.readdir"
|
|
8835
8870
|
| "fs/promises.readFile"
|
|
8871
|
+
| "fs/promises.readdir"
|
|
8836
8872
|
| "fs/promises.readlink"
|
|
8837
8873
|
| "fs/promises.realpath"
|
|
8838
8874
|
| "fs/promises.rename"
|
|
8839
|
-
| "fs/promises.rmdir"
|
|
8840
8875
|
| "fs/promises.rm"
|
|
8876
|
+
| "fs/promises.rmdir"
|
|
8841
8877
|
| "fs/promises.stat"
|
|
8842
8878
|
| "fs/promises.statfs"
|
|
8843
8879
|
| "fs/promises.symlink"
|
|
@@ -8846,7 +8882,6 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8846
8882
|
| "fs/promises.utimes"
|
|
8847
8883
|
| "fs/promises.watch"
|
|
8848
8884
|
| "fs/promises.writeFile"
|
|
8849
|
-
| "fs/promises.FileHandle"
|
|
8850
8885
|
| "http2"
|
|
8851
8886
|
| "http2.constants"
|
|
8852
8887
|
| "http2.sensitiveHeaders"
|
|
@@ -8888,7 +8923,6 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
8888
8923
|
| "inspector/promises.open"
|
|
8889
8924
|
| "inspector/promises.url"
|
|
8890
8925
|
| "inspector/promises.waitForDebugger"
|
|
8891
|
-
| "module"
|
|
8892
8926
|
| "module.builtinModules"
|
|
8893
8927
|
| "module.createRequire"
|
|
8894
8928
|
| "module.createRequireFromPath"
|
|
@@ -9137,6 +9171,10 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9137
9171
|
| "test.it.skip"
|
|
9138
9172
|
| "test.it.todo"
|
|
9139
9173
|
| "test.it.only"
|
|
9174
|
+
| "test.suite"
|
|
9175
|
+
| "test.suite.skip"
|
|
9176
|
+
| "test.suite.todo"
|
|
9177
|
+
| "test.suite.only"
|
|
9140
9178
|
| "test.before"
|
|
9141
9179
|
| "test.after"
|
|
9142
9180
|
| "test.beforeEach"
|
|
@@ -9153,6 +9191,7 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9153
9191
|
| "test.test.only"
|
|
9154
9192
|
| "test.test.describe"
|
|
9155
9193
|
| "test.test.it"
|
|
9194
|
+
| "test.test.suite"
|
|
9156
9195
|
| "test.test.before"
|
|
9157
9196
|
| "test.test.after"
|
|
9158
9197
|
| "test.test.beforeEach"
|
|
@@ -9376,6 +9415,7 @@ type NNoUnsupportedFeaturesNodeBuiltins =
|
|
|
9376
9415
|
| "v8.getHeapSnapshot"
|
|
9377
9416
|
| "v8.getHeapSpaceStatistics"
|
|
9378
9417
|
| "v8.getHeapStatistics"
|
|
9418
|
+
| "v8.queryObjects"
|
|
9379
9419
|
| "v8.setFlagsFromString"
|
|
9380
9420
|
| "v8.stopCoverage"
|
|
9381
9421
|
| "v8.takeCoverage"
|
|
@@ -9502,6 +9542,9 @@ type NShebang =
|
|
|
9502
9542
|
];
|
|
9503
9543
|
ignoreUnpublished?: boolean;
|
|
9504
9544
|
additionalExecutables?: string[];
|
|
9545
|
+
executableMap?: {
|
|
9546
|
+
[k: string]: string;
|
|
9547
|
+
};
|
|
9505
9548
|
},
|
|
9506
9549
|
];
|
|
9507
9550
|
|
|
@@ -11426,6 +11469,11 @@ interface StylisticRuleOptions {
|
|
|
11426
11469
|
* @see https://eslint.style/rules/ts/keyword-spacing
|
|
11427
11470
|
*/
|
|
11428
11471
|
"@stylistic/keyword-spacing"?: Linter.RuleEntry<StylisticKeywordSpacing>;
|
|
11472
|
+
/**
|
|
11473
|
+
* Enforce position of line comments
|
|
11474
|
+
* @see https://eslint.style/rules/js/line-comment-position
|
|
11475
|
+
*/
|
|
11476
|
+
"@stylistic/line-comment-position"?: Linter.RuleEntry<StylisticLineCommentPosition>;
|
|
11429
11477
|
/**
|
|
11430
11478
|
* Enforce consistent linebreak style
|
|
11431
11479
|
* @see https://eslint.style/rules/js/linebreak-style
|
|
@@ -11456,6 +11504,11 @@ interface StylisticRuleOptions {
|
|
|
11456
11504
|
* @see https://eslint.style/rules/ts/member-delimiter-style
|
|
11457
11505
|
*/
|
|
11458
11506
|
"@stylistic/member-delimiter-style"?: Linter.RuleEntry<StylisticMemberDelimiterStyle>;
|
|
11507
|
+
/**
|
|
11508
|
+
* Enforce a particular style for multiline comments
|
|
11509
|
+
* @see https://eslint.style/rules/js/multiline-comment-style
|
|
11510
|
+
*/
|
|
11511
|
+
"@stylistic/multiline-comment-style"?: Linter.RuleEntry<StylisticMultilineCommentStyle>;
|
|
11459
11512
|
/**
|
|
11460
11513
|
* Enforce newlines between operands of ternary expressions
|
|
11461
11514
|
* @see https://eslint.style/rules/js/multiline-ternary
|
|
@@ -12492,6 +12545,18 @@ type StylisticKeywordSpacing =
|
|
|
12492
12545
|
};
|
|
12493
12546
|
},
|
|
12494
12547
|
];
|
|
12548
|
+
// ----- @stylistic/line-comment-position -----
|
|
12549
|
+
type StylisticLineCommentPosition =
|
|
12550
|
+
| []
|
|
12551
|
+
| [
|
|
12552
|
+
| ("above" | "beside")
|
|
12553
|
+
| {
|
|
12554
|
+
position?: "above" | "beside";
|
|
12555
|
+
ignorePattern?: string;
|
|
12556
|
+
applyDefaultPatterns?: boolean;
|
|
12557
|
+
applyDefaultIgnorePatterns?: boolean;
|
|
12558
|
+
},
|
|
12559
|
+
];
|
|
12495
12560
|
// ----- @stylistic/linebreak-style -----
|
|
12496
12561
|
type StylisticLinebreakStyle = [] | ["unix" | "windows"];
|
|
12497
12562
|
// ----- @stylistic/lines-around-comment -----
|
|
@@ -12699,6 +12764,18 @@ interface _StylisticMemberDelimiterStyle_DelimiterConfig {
|
|
|
12699
12764
|
requireLast?: boolean;
|
|
12700
12765
|
};
|
|
12701
12766
|
}
|
|
12767
|
+
// ----- @stylistic/multiline-comment-style -----
|
|
12768
|
+
type StylisticMultilineCommentStyle =
|
|
12769
|
+
| []
|
|
12770
|
+
| ["starred-block" | "bare-block"]
|
|
12771
|
+
| []
|
|
12772
|
+
| ["separate-lines"]
|
|
12773
|
+
| [
|
|
12774
|
+
"separate-lines",
|
|
12775
|
+
{
|
|
12776
|
+
checkJSDoc?: boolean;
|
|
12777
|
+
},
|
|
12778
|
+
];
|
|
12702
12779
|
// ----- @stylistic/multiline-ternary -----
|
|
12703
12780
|
type StylisticMultilineTernary =
|
|
12704
12781
|
| []
|
|
@@ -19076,6 +19153,8 @@ type TypescriptEslintSortTypeConstituents =
|
|
|
19076
19153
|
|
|
19077
19154
|
checkUnions?: boolean;
|
|
19078
19155
|
|
|
19156
|
+
caseSensitive?: boolean;
|
|
19157
|
+
|
|
19079
19158
|
groupOrder?: (
|
|
19080
19159
|
| "conditional"
|
|
19081
19160
|
| "function"
|
|
@@ -19583,652 +19662,677 @@ type ImportPreferDefaultExport =
|
|
|
19583
19662
|
interface UnicornRuleOptions {
|
|
19584
19663
|
/**
|
|
19585
19664
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
19586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/better-regex.md
|
|
19587
19666
|
*/
|
|
19588
19667
|
"unicorn/better-regex"?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
19589
19668
|
/**
|
|
19590
19669
|
* Enforce a specific parameter name in catch clauses.
|
|
19591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/catch-error-name.md
|
|
19592
19671
|
*/
|
|
19593
19672
|
"unicorn/catch-error-name"?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
19594
19673
|
/**
|
|
19595
19674
|
* Use destructured variables over properties.
|
|
19596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/consistent-destructuring.md
|
|
19597
19676
|
*/
|
|
19598
19677
|
"unicorn/consistent-destructuring"?: Linter.RuleEntry<[]>;
|
|
19678
|
+
/**
|
|
19679
|
+
* Prefer consistent types when spreading a ternary in an array literal.
|
|
19680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/consistent-empty-array-spread.md
|
|
19681
|
+
*/
|
|
19682
|
+
"unicorn/consistent-empty-array-spread"?: Linter.RuleEntry<[]>;
|
|
19599
19683
|
/**
|
|
19600
19684
|
* Move function definitions to the highest possible scope.
|
|
19601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/consistent-function-scoping.md
|
|
19602
19686
|
*/
|
|
19603
19687
|
"unicorn/consistent-function-scoping"?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
19604
19688
|
/**
|
|
19605
19689
|
* Enforce correct `Error` subclassing.
|
|
19606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/custom-error-definition.md
|
|
19607
19691
|
*/
|
|
19608
19692
|
"unicorn/custom-error-definition"?: Linter.RuleEntry<[]>;
|
|
19609
19693
|
/**
|
|
19610
19694
|
* Enforce no spaces between braces.
|
|
19611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/empty-brace-spaces.md
|
|
19612
19696
|
*/
|
|
19613
19697
|
"unicorn/empty-brace-spaces"?: Linter.RuleEntry<[]>;
|
|
19614
19698
|
/**
|
|
19615
19699
|
* Enforce passing a `message` value when creating a built-in error.
|
|
19616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/error-message.md
|
|
19617
19701
|
*/
|
|
19618
19702
|
"unicorn/error-message"?: Linter.RuleEntry<[]>;
|
|
19619
19703
|
/**
|
|
19620
19704
|
* Require escape sequences to use uppercase values.
|
|
19621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/escape-case.md
|
|
19622
19706
|
*/
|
|
19623
19707
|
"unicorn/escape-case"?: Linter.RuleEntry<[]>;
|
|
19624
19708
|
/**
|
|
19625
19709
|
* Add expiration conditions to TODO comments.
|
|
19626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/expiring-todo-comments.md
|
|
19627
19711
|
*/
|
|
19628
19712
|
"unicorn/expiring-todo-comments"?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
19629
19713
|
/**
|
|
19630
19714
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
19631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/explicit-length-check.md
|
|
19632
19716
|
*/
|
|
19633
19717
|
"unicorn/explicit-length-check"?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
19634
19718
|
/**
|
|
19635
19719
|
* Enforce a case style for filenames.
|
|
19636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/filename-case.md
|
|
19637
19721
|
*/
|
|
19638
19722
|
"unicorn/filename-case"?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
19639
19723
|
/**
|
|
19640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#import-index
|
|
19641
19725
|
* @deprecated
|
|
19642
19726
|
*/
|
|
19643
19727
|
"unicorn/import-index"?: Linter.RuleEntry<[]>;
|
|
19644
19728
|
/**
|
|
19645
19729
|
* Enforce specific import styles per module.
|
|
19646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/import-style.md
|
|
19647
19731
|
*/
|
|
19648
19732
|
"unicorn/import-style"?: Linter.RuleEntry<UnicornImportStyle>;
|
|
19649
19733
|
/**
|
|
19650
19734
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
19651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/new-for-builtins.md
|
|
19652
19736
|
*/
|
|
19653
19737
|
"unicorn/new-for-builtins"?: Linter.RuleEntry<[]>;
|
|
19654
19738
|
/**
|
|
19655
19739
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
19656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
19657
19741
|
*/
|
|
19658
19742
|
"unicorn/no-abusive-eslint-disable"?: Linter.RuleEntry<[]>;
|
|
19659
19743
|
/**
|
|
19660
19744
|
* Disallow anonymous functions and classes as the default export.
|
|
19661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-anonymous-default-export.md
|
|
19662
19746
|
*/
|
|
19663
19747
|
"unicorn/no-anonymous-default-export"?: Linter.RuleEntry<[]>;
|
|
19664
19748
|
/**
|
|
19665
19749
|
* Prevent passing a function reference directly to iterator methods.
|
|
19666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-array-callback-reference.md
|
|
19667
19751
|
*/
|
|
19668
19752
|
"unicorn/no-array-callback-reference"?: Linter.RuleEntry<[]>;
|
|
19669
19753
|
/**
|
|
19670
19754
|
* Prefer `for…of` over the `forEach` method.
|
|
19671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-array-for-each.md
|
|
19672
19756
|
*/
|
|
19673
19757
|
"unicorn/no-array-for-each"?: Linter.RuleEntry<[]>;
|
|
19674
19758
|
/**
|
|
19675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#no-array-instanceof
|
|
19676
19760
|
* @deprecated
|
|
19677
19761
|
*/
|
|
19678
19762
|
"unicorn/no-array-instanceof"?: Linter.RuleEntry<[]>;
|
|
19679
19763
|
/**
|
|
19680
19764
|
* Disallow using the `this` argument in array methods.
|
|
19681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-array-method-this-argument.md
|
|
19682
19766
|
*/
|
|
19683
19767
|
"unicorn/no-array-method-this-argument"?: Linter.RuleEntry<[]>;
|
|
19684
19768
|
/**
|
|
19685
19769
|
* Enforce combining multiple `Array#push()` into one call.
|
|
19686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-array-push-push.md
|
|
19687
19771
|
*/
|
|
19688
19772
|
"unicorn/no-array-push-push"?: Linter.RuleEntry<UnicornNoArrayPushPush>;
|
|
19689
19773
|
/**
|
|
19690
19774
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
19691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-array-reduce.md
|
|
19692
19776
|
*/
|
|
19693
19777
|
"unicorn/no-array-reduce"?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
19694
19778
|
/**
|
|
19695
19779
|
* Disallow member access from await expression.
|
|
19696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-await-expression-member.md
|
|
19697
19781
|
*/
|
|
19698
19782
|
"unicorn/no-await-expression-member"?: Linter.RuleEntry<[]>;
|
|
19699
19783
|
/**
|
|
19700
19784
|
* Disallow using `await` in `Promise` method parameters.
|
|
19701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-await-in-promise-methods.md
|
|
19702
19786
|
*/
|
|
19703
19787
|
"unicorn/no-await-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
19704
19788
|
/**
|
|
19705
19789
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
19706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-console-spaces.md
|
|
19707
19791
|
*/
|
|
19708
19792
|
"unicorn/no-console-spaces"?: Linter.RuleEntry<[]>;
|
|
19709
19793
|
/**
|
|
19710
19794
|
* Do not use `document.cookie` directly.
|
|
19711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-document-cookie.md
|
|
19712
19796
|
*/
|
|
19713
19797
|
"unicorn/no-document-cookie"?: Linter.RuleEntry<[]>;
|
|
19714
19798
|
/**
|
|
19715
19799
|
* Disallow empty files.
|
|
19716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-empty-file.md
|
|
19717
19801
|
*/
|
|
19718
19802
|
"unicorn/no-empty-file"?: Linter.RuleEntry<[]>;
|
|
19719
19803
|
/**
|
|
19720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
19721
19805
|
* @deprecated
|
|
19722
19806
|
*/
|
|
19723
19807
|
"unicorn/no-fn-reference-in-iterator"?: Linter.RuleEntry<[]>;
|
|
19724
19808
|
/**
|
|
19725
19809
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
19726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-for-loop.md
|
|
19727
19811
|
*/
|
|
19728
19812
|
"unicorn/no-for-loop"?: Linter.RuleEntry<[]>;
|
|
19729
19813
|
/**
|
|
19730
19814
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
19731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-hex-escape.md
|
|
19732
19816
|
*/
|
|
19733
19817
|
"unicorn/no-hex-escape"?: Linter.RuleEntry<[]>;
|
|
19734
19818
|
/**
|
|
19735
19819
|
* Require `Array.isArray()` instead of `instanceof Array`.
|
|
19736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-instanceof-array.md
|
|
19737
19821
|
*/
|
|
19738
19822
|
"unicorn/no-instanceof-array"?: Linter.RuleEntry<[]>;
|
|
19823
|
+
/**
|
|
19824
|
+
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
19825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-invalid-fetch-options.md
|
|
19826
|
+
*/
|
|
19827
|
+
"unicorn/no-invalid-fetch-options"?: Linter.RuleEntry<[]>;
|
|
19739
19828
|
/**
|
|
19740
19829
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
19741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
19742
19831
|
*/
|
|
19743
19832
|
"unicorn/no-invalid-remove-event-listener"?: Linter.RuleEntry<[]>;
|
|
19744
19833
|
/**
|
|
19745
19834
|
* Disallow identifiers starting with `new` or `class`.
|
|
19746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-keyword-prefix.md
|
|
19747
19836
|
*/
|
|
19748
19837
|
"unicorn/no-keyword-prefix"?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
19749
19838
|
/**
|
|
19750
19839
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
19751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-lonely-if.md
|
|
19752
19841
|
*/
|
|
19753
19842
|
"unicorn/no-lonely-if"?: Linter.RuleEntry<[]>;
|
|
19843
|
+
/**
|
|
19844
|
+
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
19845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
19846
|
+
*/
|
|
19847
|
+
"unicorn/no-magic-array-flat-depth"?: Linter.RuleEntry<[]>;
|
|
19754
19848
|
/**
|
|
19755
19849
|
* Disallow negated conditions.
|
|
19756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-negated-condition.md
|
|
19757
19851
|
*/
|
|
19758
19852
|
"unicorn/no-negated-condition"?: Linter.RuleEntry<[]>;
|
|
19759
19853
|
/**
|
|
19760
19854
|
* Disallow nested ternary expressions.
|
|
19761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-nested-ternary.md
|
|
19762
19856
|
*/
|
|
19763
19857
|
"unicorn/no-nested-ternary"?: Linter.RuleEntry<[]>;
|
|
19764
19858
|
/**
|
|
19765
19859
|
* Disallow `new Array()`.
|
|
19766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-new-array.md
|
|
19767
19861
|
*/
|
|
19768
19862
|
"unicorn/no-new-array"?: Linter.RuleEntry<[]>;
|
|
19769
19863
|
/**
|
|
19770
19864
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
19771
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-new-buffer.md
|
|
19772
19866
|
*/
|
|
19773
19867
|
"unicorn/no-new-buffer"?: Linter.RuleEntry<[]>;
|
|
19774
19868
|
/**
|
|
19775
19869
|
* Disallow the use of the `null` literal.
|
|
19776
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-null.md
|
|
19777
19871
|
*/
|
|
19778
19872
|
"unicorn/no-null"?: Linter.RuleEntry<UnicornNoNull>;
|
|
19779
19873
|
/**
|
|
19780
19874
|
* Disallow the use of objects as default parameters.
|
|
19781
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-object-as-default-parameter.md
|
|
19782
19876
|
*/
|
|
19783
19877
|
"unicorn/no-object-as-default-parameter"?: Linter.RuleEntry<[]>;
|
|
19784
19878
|
/**
|
|
19785
19879
|
* Disallow `process.exit()`.
|
|
19786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-process-exit.md
|
|
19787
19881
|
*/
|
|
19788
19882
|
"unicorn/no-process-exit"?: Linter.RuleEntry<[]>;
|
|
19789
19883
|
/**
|
|
19790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#no-reduce
|
|
19791
19885
|
* @deprecated
|
|
19792
19886
|
*/
|
|
19793
19887
|
"unicorn/no-reduce"?: Linter.RuleEntry<[]>;
|
|
19794
19888
|
/**
|
|
19795
19889
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
19796
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
19797
19891
|
*/
|
|
19798
19892
|
"unicorn/no-single-promise-in-promise-methods"?: Linter.RuleEntry<[]>;
|
|
19799
19893
|
/**
|
|
19800
19894
|
* Disallow classes that only have static members.
|
|
19801
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-static-only-class.md
|
|
19802
19896
|
*/
|
|
19803
19897
|
"unicorn/no-static-only-class"?: Linter.RuleEntry<[]>;
|
|
19804
19898
|
/**
|
|
19805
19899
|
* Disallow `then` property.
|
|
19806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-thenable.md
|
|
19807
19901
|
*/
|
|
19808
19902
|
"unicorn/no-thenable"?: Linter.RuleEntry<[]>;
|
|
19809
19903
|
/**
|
|
19810
19904
|
* Disallow assigning `this` to a variable.
|
|
19811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-this-assignment.md
|
|
19812
19906
|
*/
|
|
19813
19907
|
"unicorn/no-this-assignment"?: Linter.RuleEntry<[]>;
|
|
19814
19908
|
/**
|
|
19815
19909
|
* Disallow comparing `undefined` using `typeof`.
|
|
19816
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-typeof-undefined.md
|
|
19817
19911
|
*/
|
|
19818
19912
|
"unicorn/no-typeof-undefined"?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
19819
19913
|
/**
|
|
19820
19914
|
* Disallow awaiting non-promise values.
|
|
19821
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-unnecessary-await.md
|
|
19822
19916
|
*/
|
|
19823
19917
|
"unicorn/no-unnecessary-await"?: Linter.RuleEntry<[]>;
|
|
19824
19918
|
/**
|
|
19825
19919
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
19826
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
19827
19921
|
*/
|
|
19828
19922
|
"unicorn/no-unnecessary-polyfills"?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
19829
19923
|
/**
|
|
19830
19924
|
* Disallow unreadable array destructuring.
|
|
19831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
19832
19926
|
*/
|
|
19833
19927
|
"unicorn/no-unreadable-array-destructuring"?: Linter.RuleEntry<[]>;
|
|
19834
19928
|
/**
|
|
19835
19929
|
* Disallow unreadable IIFEs.
|
|
19836
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-unreadable-iife.md
|
|
19837
19931
|
*/
|
|
19838
19932
|
"unicorn/no-unreadable-iife"?: Linter.RuleEntry<[]>;
|
|
19839
19933
|
/**
|
|
19840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#no-unsafe-regex
|
|
19841
19935
|
* @deprecated
|
|
19842
19936
|
*/
|
|
19843
19937
|
"unicorn/no-unsafe-regex"?: Linter.RuleEntry<[]>;
|
|
19844
19938
|
/**
|
|
19845
19939
|
* Disallow unused object properties.
|
|
19846
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-unused-properties.md
|
|
19847
19941
|
*/
|
|
19848
19942
|
"unicorn/no-unused-properties"?: Linter.RuleEntry<[]>;
|
|
19849
19943
|
/**
|
|
19850
19944
|
* Disallow useless fallback when spreading in object literals.
|
|
19851
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
19852
19946
|
*/
|
|
19853
19947
|
"unicorn/no-useless-fallback-in-spread"?: Linter.RuleEntry<[]>;
|
|
19854
19948
|
/**
|
|
19855
19949
|
* Disallow useless array length check.
|
|
19856
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-useless-length-check.md
|
|
19857
19951
|
*/
|
|
19858
19952
|
"unicorn/no-useless-length-check"?: Linter.RuleEntry<[]>;
|
|
19859
19953
|
/**
|
|
19860
19954
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
19861
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
19862
19956
|
*/
|
|
19863
19957
|
"unicorn/no-useless-promise-resolve-reject"?: Linter.RuleEntry<[]>;
|
|
19864
19958
|
/**
|
|
19865
19959
|
* Disallow unnecessary spread.
|
|
19866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-useless-spread.md
|
|
19867
19961
|
*/
|
|
19868
19962
|
"unicorn/no-useless-spread"?: Linter.RuleEntry<[]>;
|
|
19869
19963
|
/**
|
|
19870
19964
|
* Disallow useless case in switch statements.
|
|
19871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-useless-switch-case.md
|
|
19872
19966
|
*/
|
|
19873
19967
|
"unicorn/no-useless-switch-case"?: Linter.RuleEntry<[]>;
|
|
19874
19968
|
/**
|
|
19875
19969
|
* Disallow useless `undefined`.
|
|
19876
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-useless-undefined.md
|
|
19877
19971
|
*/
|
|
19878
19972
|
"unicorn/no-useless-undefined"?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
19879
19973
|
/**
|
|
19880
19974
|
* Disallow number literals with zero fractions or dangling dots.
|
|
19881
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/no-zero-fractions.md
|
|
19882
19976
|
*/
|
|
19883
19977
|
"unicorn/no-zero-fractions"?: Linter.RuleEntry<[]>;
|
|
19884
19978
|
/**
|
|
19885
19979
|
* Enforce proper case for numeric literals.
|
|
19886
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/number-literal-case.md
|
|
19887
19981
|
*/
|
|
19888
19982
|
"unicorn/number-literal-case"?: Linter.RuleEntry<[]>;
|
|
19889
19983
|
/**
|
|
19890
19984
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
19891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/numeric-separators-style.md
|
|
19892
19986
|
*/
|
|
19893
19987
|
"unicorn/numeric-separators-style"?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
19894
19988
|
/**
|
|
19895
19989
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
19896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-add-event-listener.md
|
|
19897
19991
|
*/
|
|
19898
19992
|
"unicorn/prefer-add-event-listener"?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
19899
19993
|
/**
|
|
19900
19994
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
19901
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
19995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-array-find.md
|
|
19902
19996
|
*/
|
|
19903
19997
|
"unicorn/prefer-array-find"?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
19904
19998
|
/**
|
|
19905
19999
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
19906
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-array-flat.md
|
|
19907
20001
|
*/
|
|
19908
20002
|
"unicorn/prefer-array-flat"?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
19909
20003
|
/**
|
|
19910
20004
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
19911
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-array-flat-map.md
|
|
19912
20006
|
*/
|
|
19913
20007
|
"unicorn/prefer-array-flat-map"?: Linter.RuleEntry<[]>;
|
|
19914
20008
|
/**
|
|
19915
20009
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
19916
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-array-index-of.md
|
|
19917
20011
|
*/
|
|
19918
20012
|
"unicorn/prefer-array-index-of"?: Linter.RuleEntry<[]>;
|
|
19919
20013
|
/**
|
|
19920
20014
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast}(…)`.
|
|
19921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-array-some.md
|
|
19922
20016
|
*/
|
|
19923
20017
|
"unicorn/prefer-array-some"?: Linter.RuleEntry<[]>;
|
|
19924
20018
|
/**
|
|
19925
20019
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
19926
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-at.md
|
|
19927
20021
|
*/
|
|
19928
20022
|
"unicorn/prefer-at"?: Linter.RuleEntry<UnicornPreferAt>;
|
|
19929
20023
|
/**
|
|
19930
20024
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
19931
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
19932
20026
|
*/
|
|
19933
20027
|
"unicorn/prefer-blob-reading-methods"?: Linter.RuleEntry<[]>;
|
|
19934
20028
|
/**
|
|
19935
20029
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
19936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-code-point.md
|
|
19937
20031
|
*/
|
|
19938
20032
|
"unicorn/prefer-code-point"?: Linter.RuleEntry<[]>;
|
|
19939
20033
|
/**
|
|
19940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-dataset
|
|
19941
20035
|
* @deprecated
|
|
19942
20036
|
*/
|
|
19943
20037
|
"unicorn/prefer-dataset"?: Linter.RuleEntry<[]>;
|
|
19944
20038
|
/**
|
|
19945
20039
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
19946
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-date-now.md
|
|
19947
20041
|
*/
|
|
19948
20042
|
"unicorn/prefer-date-now"?: Linter.RuleEntry<[]>;
|
|
19949
20043
|
/**
|
|
19950
20044
|
* Prefer default parameters over reassignment.
|
|
19951
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-default-parameters.md
|
|
19952
20046
|
*/
|
|
19953
20047
|
"unicorn/prefer-default-parameters"?: Linter.RuleEntry<[]>;
|
|
19954
20048
|
/**
|
|
19955
20049
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
19956
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-dom-node-append.md
|
|
19957
20051
|
*/
|
|
19958
20052
|
"unicorn/prefer-dom-node-append"?: Linter.RuleEntry<[]>;
|
|
19959
20053
|
/**
|
|
19960
20054
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
19961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
19962
20056
|
*/
|
|
19963
20057
|
"unicorn/prefer-dom-node-dataset"?: Linter.RuleEntry<[]>;
|
|
19964
20058
|
/**
|
|
19965
20059
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
19966
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-dom-node-remove.md
|
|
19967
20061
|
*/
|
|
19968
20062
|
"unicorn/prefer-dom-node-remove"?: Linter.RuleEntry<[]>;
|
|
19969
20063
|
/**
|
|
19970
20064
|
* Prefer `.textContent` over `.innerText`.
|
|
19971
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
19972
20066
|
*/
|
|
19973
20067
|
"unicorn/prefer-dom-node-text-content"?: Linter.RuleEntry<[]>;
|
|
19974
20068
|
/**
|
|
19975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-event-key
|
|
19976
20070
|
* @deprecated
|
|
19977
20071
|
*/
|
|
19978
20072
|
"unicorn/prefer-event-key"?: Linter.RuleEntry<[]>;
|
|
19979
20073
|
/**
|
|
19980
20074
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
19981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-event-target.md
|
|
19982
20076
|
*/
|
|
19983
20077
|
"unicorn/prefer-event-target"?: Linter.RuleEntry<[]>;
|
|
19984
20078
|
/**
|
|
19985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
19986
20080
|
* @deprecated
|
|
19987
20081
|
*/
|
|
19988
20082
|
"unicorn/prefer-exponentiation-operator"?: Linter.RuleEntry<[]>;
|
|
19989
20083
|
/**
|
|
19990
20084
|
* Prefer `export…from` when re-exporting.
|
|
19991
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-export-from.md
|
|
19992
20086
|
*/
|
|
19993
20087
|
"unicorn/prefer-export-from"?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
19994
20088
|
/**
|
|
19995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-flat-map
|
|
19996
20090
|
* @deprecated
|
|
19997
20091
|
*/
|
|
19998
20092
|
"unicorn/prefer-flat-map"?: Linter.RuleEntry<[]>;
|
|
19999
20093
|
/**
|
|
20000
20094
|
* Prefer `.includes()` over `.indexOf()` and `Array#some()` when checking for existence or non-existence.
|
|
20001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-includes.md
|
|
20002
20096
|
*/
|
|
20003
20097
|
"unicorn/prefer-includes"?: Linter.RuleEntry<[]>;
|
|
20004
20098
|
/**
|
|
20005
20099
|
* Prefer reading a JSON file as a buffer.
|
|
20006
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
20007
20101
|
*/
|
|
20008
20102
|
"unicorn/prefer-json-parse-buffer"?: Linter.RuleEntry<[]>;
|
|
20009
20103
|
/**
|
|
20010
20104
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
20011
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
20012
20106
|
*/
|
|
20013
20107
|
"unicorn/prefer-keyboard-event-key"?: Linter.RuleEntry<[]>;
|
|
20014
20108
|
/**
|
|
20015
20109
|
* Prefer using a logical operator over a ternary.
|
|
20016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
20017
20111
|
*/
|
|
20018
20112
|
"unicorn/prefer-logical-operator-over-ternary"?: Linter.RuleEntry<[]>;
|
|
20019
20113
|
/**
|
|
20020
20114
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
20021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-math-trunc.md
|
|
20022
20116
|
*/
|
|
20023
20117
|
"unicorn/prefer-math-trunc"?: Linter.RuleEntry<[]>;
|
|
20024
20118
|
/**
|
|
20025
20119
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
20026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
20027
20121
|
*/
|
|
20028
20122
|
"unicorn/prefer-modern-dom-apis"?: Linter.RuleEntry<[]>;
|
|
20029
20123
|
/**
|
|
20030
20124
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
20031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-modern-math-apis.md
|
|
20032
20126
|
*/
|
|
20033
20127
|
"unicorn/prefer-modern-math-apis"?: Linter.RuleEntry<[]>;
|
|
20034
20128
|
/**
|
|
20035
20129
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
20036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-module.md
|
|
20037
20131
|
*/
|
|
20038
20132
|
"unicorn/prefer-module"?: Linter.RuleEntry<[]>;
|
|
20039
20133
|
/**
|
|
20040
20134
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
20041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
20042
20136
|
*/
|
|
20043
20137
|
"unicorn/prefer-native-coercion-functions"?: Linter.RuleEntry<[]>;
|
|
20044
20138
|
/**
|
|
20045
20139
|
* Prefer negative index over `.length - index` when possible.
|
|
20046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-negative-index.md
|
|
20047
20141
|
*/
|
|
20048
20142
|
"unicorn/prefer-negative-index"?: Linter.RuleEntry<[]>;
|
|
20049
20143
|
/**
|
|
20050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-node-append
|
|
20051
20145
|
* @deprecated
|
|
20052
20146
|
*/
|
|
20053
20147
|
"unicorn/prefer-node-append"?: Linter.RuleEntry<[]>;
|
|
20054
20148
|
/**
|
|
20055
20149
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
20056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-node-protocol.md
|
|
20057
20151
|
*/
|
|
20058
20152
|
"unicorn/prefer-node-protocol"?: Linter.RuleEntry<[]>;
|
|
20059
20153
|
/**
|
|
20060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-node-remove
|
|
20061
20155
|
* @deprecated
|
|
20062
20156
|
*/
|
|
20063
20157
|
"unicorn/prefer-node-remove"?: Linter.RuleEntry<[]>;
|
|
20064
20158
|
/**
|
|
20065
20159
|
* Prefer `Number` static properties over global ones.
|
|
20066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-number-properties.md
|
|
20067
20161
|
*/
|
|
20068
20162
|
"unicorn/prefer-number-properties"?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
20069
20163
|
/**
|
|
20070
20164
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
20071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-object-from-entries.md
|
|
20072
20166
|
*/
|
|
20073
20167
|
"unicorn/prefer-object-from-entries"?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
20074
20168
|
/**
|
|
20075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-object-has-own
|
|
20076
20170
|
* @deprecated
|
|
20077
20171
|
*/
|
|
20078
20172
|
"unicorn/prefer-object-has-own"?: Linter.RuleEntry<[]>;
|
|
20079
20173
|
/**
|
|
20080
20174
|
* Prefer omitting the `catch` binding parameter.
|
|
20081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
20082
20176
|
*/
|
|
20083
20177
|
"unicorn/prefer-optional-catch-binding"?: Linter.RuleEntry<[]>;
|
|
20084
20178
|
/**
|
|
20085
20179
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
20086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-prototype-methods.md
|
|
20087
20181
|
*/
|
|
20088
20182
|
"unicorn/prefer-prototype-methods"?: Linter.RuleEntry<[]>;
|
|
20089
20183
|
/**
|
|
20090
20184
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
|
|
20091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-query-selector.md
|
|
20092
20186
|
*/
|
|
20093
20187
|
"unicorn/prefer-query-selector"?: Linter.RuleEntry<[]>;
|
|
20094
20188
|
/**
|
|
20095
20189
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
20096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-reflect-apply.md
|
|
20097
20191
|
*/
|
|
20098
20192
|
"unicorn/prefer-reflect-apply"?: Linter.RuleEntry<[]>;
|
|
20099
20193
|
/**
|
|
20100
20194
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
20101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-regexp-test.md
|
|
20102
20196
|
*/
|
|
20103
20197
|
"unicorn/prefer-regexp-test"?: Linter.RuleEntry<[]>;
|
|
20104
20198
|
/**
|
|
20105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-replace-all
|
|
20106
20200
|
* @deprecated
|
|
20107
20201
|
*/
|
|
20108
20202
|
"unicorn/prefer-replace-all"?: Linter.RuleEntry<[]>;
|
|
20109
20203
|
/**
|
|
20110
20204
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
20111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-set-has.md
|
|
20112
20206
|
*/
|
|
20113
20207
|
"unicorn/prefer-set-has"?: Linter.RuleEntry<[]>;
|
|
20114
20208
|
/**
|
|
20115
20209
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
20116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-set-size.md
|
|
20117
20211
|
*/
|
|
20118
20212
|
"unicorn/prefer-set-size"?: Linter.RuleEntry<[]>;
|
|
20119
20213
|
/**
|
|
20120
20214
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
20121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-spread.md
|
|
20122
20216
|
*/
|
|
20123
20217
|
"unicorn/prefer-spread"?: Linter.RuleEntry<[]>;
|
|
20124
20218
|
/**
|
|
20125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
20126
20220
|
* @deprecated
|
|
20127
20221
|
*/
|
|
20128
20222
|
"unicorn/prefer-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
20223
|
+
/**
|
|
20224
|
+
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
20225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-string-raw.md
|
|
20226
|
+
*/
|
|
20227
|
+
"unicorn/prefer-string-raw"?: Linter.RuleEntry<[]>;
|
|
20129
20228
|
/**
|
|
20130
20229
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
20131
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-string-replace-all.md
|
|
20132
20231
|
*/
|
|
20133
20232
|
"unicorn/prefer-string-replace-all"?: Linter.RuleEntry<[]>;
|
|
20134
20233
|
/**
|
|
20135
20234
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
20136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-string-slice.md
|
|
20137
20236
|
*/
|
|
20138
20237
|
"unicorn/prefer-string-slice"?: Linter.RuleEntry<[]>;
|
|
20139
20238
|
/**
|
|
20140
20239
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
20141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
20142
20241
|
*/
|
|
20143
20242
|
"unicorn/prefer-string-starts-ends-with"?: Linter.RuleEntry<[]>;
|
|
20144
20243
|
/**
|
|
20145
20244
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
20146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
20147
20246
|
*/
|
|
20148
20247
|
"unicorn/prefer-string-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
20248
|
+
/**
|
|
20249
|
+
* Prefer using `structuredClone` to create a deep clone.
|
|
20250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-structured-clone.md
|
|
20251
|
+
*/
|
|
20252
|
+
"unicorn/prefer-structured-clone"?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
20149
20253
|
/**
|
|
20150
20254
|
* Prefer `switch` over multiple `else-if`.
|
|
20151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-switch.md
|
|
20152
20256
|
*/
|
|
20153
20257
|
"unicorn/prefer-switch"?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
20154
20258
|
/**
|
|
20155
20259
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
20156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-ternary.md
|
|
20157
20261
|
*/
|
|
20158
20262
|
"unicorn/prefer-ternary"?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
20159
20263
|
/**
|
|
20160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-text-content
|
|
20161
20265
|
* @deprecated
|
|
20162
20266
|
*/
|
|
20163
20267
|
"unicorn/prefer-text-content"?: Linter.RuleEntry<[]>;
|
|
20164
20268
|
/**
|
|
20165
20269
|
* Prefer top-level await over top-level promises and async function calls.
|
|
20166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-top-level-await.md
|
|
20167
20271
|
*/
|
|
20168
20272
|
"unicorn/prefer-top-level-await"?: Linter.RuleEntry<[]>;
|
|
20169
20273
|
/**
|
|
20170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20274
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#prefer-trim-start-end
|
|
20171
20275
|
* @deprecated
|
|
20172
20276
|
*/
|
|
20173
20277
|
"unicorn/prefer-trim-start-end"?: Linter.RuleEntry<[]>;
|
|
20174
20278
|
/**
|
|
20175
20279
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
20176
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prefer-type-error.md
|
|
20177
20281
|
*/
|
|
20178
20282
|
"unicorn/prefer-type-error"?: Linter.RuleEntry<[]>;
|
|
20179
20283
|
/**
|
|
20180
20284
|
* Prevent abbreviations.
|
|
20181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/prevent-abbreviations.md
|
|
20182
20286
|
*/
|
|
20183
20287
|
"unicorn/prevent-abbreviations"?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
20184
20288
|
/**
|
|
20185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20289
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/deprecated-rules.md#regex-shorthand
|
|
20186
20290
|
* @deprecated
|
|
20187
20291
|
*/
|
|
20188
20292
|
"unicorn/regex-shorthand"?: Linter.RuleEntry<[]>;
|
|
20189
20293
|
/**
|
|
20190
20294
|
* Enforce consistent relative URL style.
|
|
20191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/relative-url-style.md
|
|
20192
20296
|
*/
|
|
20193
20297
|
"unicorn/relative-url-style"?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
20194
20298
|
/**
|
|
20195
20299
|
* Enforce using the separator argument with `Array#join()`.
|
|
20196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/require-array-join-separator.md
|
|
20197
20301
|
*/
|
|
20198
20302
|
"unicorn/require-array-join-separator"?: Linter.RuleEntry<[]>;
|
|
20199
20303
|
/**
|
|
20200
20304
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
20201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
20202
20306
|
*/
|
|
20203
20307
|
"unicorn/require-number-to-fixed-digits-argument"?: Linter.RuleEntry<[]>;
|
|
20204
20308
|
/**
|
|
20205
20309
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
20206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/require-post-message-target-origin.md
|
|
20207
20311
|
*/
|
|
20208
20312
|
"unicorn/require-post-message-target-origin"?: Linter.RuleEntry<[]>;
|
|
20209
20313
|
/**
|
|
20210
20314
|
* Enforce better string content.
|
|
20211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/string-content.md
|
|
20212
20316
|
*/
|
|
20213
20317
|
"unicorn/string-content"?: Linter.RuleEntry<UnicornStringContent>;
|
|
20214
20318
|
/**
|
|
20215
20319
|
* Enforce consistent brace style for `case` clauses.
|
|
20216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/switch-case-braces.md
|
|
20217
20321
|
*/
|
|
20218
20322
|
"unicorn/switch-case-braces"?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
20219
20323
|
/**
|
|
20220
20324
|
* Fix whitespace-insensitive template indentation.
|
|
20221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/template-indent.md
|
|
20222
20326
|
*/
|
|
20223
20327
|
"unicorn/template-indent"?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
20224
20328
|
/**
|
|
20225
20329
|
* Enforce consistent case for text encoding identifiers.
|
|
20226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/text-encoding-identifier-case.md
|
|
20227
20331
|
*/
|
|
20228
20332
|
"unicorn/text-encoding-identifier-case"?: Linter.RuleEntry<[]>;
|
|
20229
20333
|
/**
|
|
20230
|
-
* Require `new` when
|
|
20231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
20334
|
+
* Require `new` when creating an error.
|
|
20335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v53.0.0/docs/rules/throw-new-error.md
|
|
20232
20336
|
*/
|
|
20233
20337
|
"unicorn/throw-new-error"?: Linter.RuleEntry<[]>;
|
|
20234
20338
|
}
|
|
@@ -20460,6 +20564,7 @@ type UnicornPreferNumberProperties =
|
|
|
20460
20564
|
| [
|
|
20461
20565
|
{
|
|
20462
20566
|
checkInfinity?: boolean;
|
|
20567
|
+
checkNaN?: boolean;
|
|
20463
20568
|
},
|
|
20464
20569
|
];
|
|
20465
20570
|
// ----- unicorn/prefer-object-from-entries -----
|
|
@@ -20470,6 +20575,14 @@ type UnicornPreferObjectFromEntries =
|
|
|
20470
20575
|
functions?: unknown[];
|
|
20471
20576
|
},
|
|
20472
20577
|
];
|
|
20578
|
+
// ----- unicorn/prefer-structured-clone -----
|
|
20579
|
+
type UnicornPreferStructuredClone =
|
|
20580
|
+
| []
|
|
20581
|
+
| [
|
|
20582
|
+
{
|
|
20583
|
+
functions?: unknown[];
|
|
20584
|
+
},
|
|
20585
|
+
];
|
|
20473
20586
|
// ----- unicorn/prefer-switch -----
|
|
20474
20587
|
type UnicornPreferSwitch =
|
|
20475
20588
|
| []
|