@2digits/eslint-config 5.5.5 → 5.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1351 -317
- package/dist/index.mjs +1 -1
- package/package.json +31 -31
package/dist/index.d.mts
CHANGED
|
@@ -515,6 +515,16 @@ interface RuleOptions {
|
|
|
515
515
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/no-top-level-permissions.html
|
|
516
516
|
*/
|
|
517
517
|
'github-action/no-top-level-permissions'?: Linter.RuleEntry<[]>;
|
|
518
|
+
/**
|
|
519
|
+
* disallow unpinned uses references.
|
|
520
|
+
* @see https://eslint-plugin-github-action.ntnyq.com/rules/no-unpinned-uses.html
|
|
521
|
+
*/
|
|
522
|
+
'github-action/no-unpinned-uses'?: Linter.RuleEntry<[]>;
|
|
523
|
+
/**
|
|
524
|
+
* enforce setting concurrency cancel-in-progress to true.
|
|
525
|
+
* @see https://eslint-plugin-github-action.ntnyq.com/rules/prefer-cancel-in-progress.html
|
|
526
|
+
*/
|
|
527
|
+
'github-action/prefer-cancel-in-progress'?: Linter.RuleEntry<[]>;
|
|
518
528
|
/**
|
|
519
529
|
* enforce workflow file extension.
|
|
520
530
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/prefer-file-extension.html
|
|
@@ -535,6 +545,11 @@ interface RuleOptions {
|
|
|
535
545
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/require-action-run-name.html
|
|
536
546
|
*/
|
|
537
547
|
'github-action/require-action-run-name'?: Linter.RuleEntry<[]>;
|
|
548
|
+
/**
|
|
549
|
+
* require a workflow-level concurrency group.
|
|
550
|
+
* @see https://eslint-plugin-github-action.ntnyq.com/rules/require-concurrency-group.html
|
|
551
|
+
*/
|
|
552
|
+
'github-action/require-concurrency-group'?: Linter.RuleEntry<[]>;
|
|
538
553
|
/**
|
|
539
554
|
* require a string job name.
|
|
540
555
|
* @see https://eslint-plugin-github-action.ntnyq.com/rules/require-job-name.html
|
|
@@ -2023,7 +2038,7 @@ interface RuleOptions {
|
|
|
2023
2038
|
* Disallow expressions where the operation doesn't affect the value
|
|
2024
2039
|
* @see https://eslint.org/docs/latest/rules/no-constant-binary-expression
|
|
2025
2040
|
*/
|
|
2026
|
-
'no-constant-binary-expression'?: Linter.RuleEntry<
|
|
2041
|
+
'no-constant-binary-expression'?: Linter.RuleEntry<NoConstantBinaryExpression>;
|
|
2027
2042
|
/**
|
|
2028
2043
|
* Disallow constant expressions in conditions
|
|
2029
2044
|
* @see https://eslint.org/docs/latest/rules/no-constant-condition
|
|
@@ -3578,6 +3593,11 @@ interface RuleOptions {
|
|
|
3578
3593
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
|
|
3579
3594
|
*/
|
|
3580
3595
|
'react-extra/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
|
|
3596
|
+
/**
|
|
3597
|
+
* Enforces that every 'IntersectionObserver' created in a component or custom hook has a corresponding 'IntersectionObserver.disconnect()'.
|
|
3598
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-intersection-observer
|
|
3599
|
+
*/
|
|
3600
|
+
'react-extra/web-api-no-leaked-intersection-observer'?: Linter.RuleEntry<[]>;
|
|
3581
3601
|
/**
|
|
3582
3602
|
* Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
|
|
3583
3603
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
@@ -4353,12 +4373,17 @@ interface RuleOptions {
|
|
|
4353
4373
|
*/
|
|
4354
4374
|
'sonar/assertions-in-tests'?: Linter.RuleEntry<[]>;
|
|
4355
4375
|
/**
|
|
4356
|
-
*
|
|
4376
|
+
* Async test assertions should be awaited or returned
|
|
4377
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8780/javascript
|
|
4378
|
+
*/
|
|
4379
|
+
'sonar/async-test-assertions'?: Linter.RuleEntry<[]>;
|
|
4380
|
+
/**
|
|
4381
|
+
* AWS API Gateway should require authentication
|
|
4357
4382
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6333/javascript
|
|
4358
4383
|
*/
|
|
4359
4384
|
'sonar/aws-apigateway-public-api'?: Linter.RuleEntry<[]>;
|
|
4360
4385
|
/**
|
|
4361
|
-
*
|
|
4386
|
+
* Public network access to cloud resources should be disabled
|
|
4362
4387
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6329/javascript
|
|
4363
4388
|
*/
|
|
4364
4389
|
'sonar/aws-ec2-rds-dms-public'?: Linter.RuleEntry<[]>;
|
|
@@ -4368,7 +4393,7 @@ interface RuleOptions {
|
|
|
4368
4393
|
*/
|
|
4369
4394
|
'sonar/aws-ec2-unencrypted-ebs-volume'?: Linter.RuleEntry<[]>;
|
|
4370
4395
|
/**
|
|
4371
|
-
*
|
|
4396
|
+
* Amazon EFS file systems should be encrypted
|
|
4372
4397
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6332/javascript
|
|
4373
4398
|
*/
|
|
4374
4399
|
'sonar/aws-efs-unencrypted'?: Linter.RuleEntry<[]>;
|
|
@@ -4378,7 +4403,7 @@ interface RuleOptions {
|
|
|
4378
4403
|
*/
|
|
4379
4404
|
'sonar/aws-iam-all-privileges'?: Linter.RuleEntry<[]>;
|
|
4380
4405
|
/**
|
|
4381
|
-
*
|
|
4406
|
+
* IAM policies should not grant access to all account resources
|
|
4382
4407
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6304/javascript
|
|
4383
4408
|
*/
|
|
4384
4409
|
'sonar/aws-iam-all-resources-accessible'?: Linter.RuleEntry<[]>;
|
|
@@ -4413,33 +4438,27 @@ interface RuleOptions {
|
|
|
4413
4438
|
*/
|
|
4414
4439
|
'sonar/aws-s3-bucket-granted-access'?: Linter.RuleEntry<[]>;
|
|
4415
4440
|
/**
|
|
4416
|
-
*
|
|
4441
|
+
* S3 buckets should enforce HTTPS-only access
|
|
4417
4442
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6249/javascript
|
|
4418
4443
|
*/
|
|
4419
4444
|
'sonar/aws-s3-bucket-insecure-http'?: Linter.RuleEntry<[]>;
|
|
4420
4445
|
/**
|
|
4421
|
-
*
|
|
4446
|
+
* Amazon S3 bucket public access should be fully blocked
|
|
4422
4447
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6281/javascript
|
|
4423
4448
|
*/
|
|
4424
4449
|
'sonar/aws-s3-bucket-public-access'?: Linter.RuleEntry<[]>;
|
|
4425
4450
|
/**
|
|
4426
|
-
*
|
|
4427
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S6245/javascript
|
|
4428
|
-
* @deprecated
|
|
4429
|
-
*/
|
|
4430
|
-
'sonar/aws-s3-bucket-server-encryption'?: Linter.RuleEntry<[]>;
|
|
4431
|
-
/**
|
|
4432
|
-
* Disabling versioning of S3 buckets is security-sensitive
|
|
4451
|
+
* Amazon S3 buckets should have versioning enabled
|
|
4433
4452
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6252/javascript
|
|
4434
4453
|
*/
|
|
4435
4454
|
'sonar/aws-s3-bucket-versioning'?: Linter.RuleEntry<[]>;
|
|
4436
4455
|
/**
|
|
4437
|
-
*
|
|
4456
|
+
* SageMaker notebook instances should be encrypted at rest
|
|
4438
4457
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6319/javascript
|
|
4439
4458
|
*/
|
|
4440
4459
|
'sonar/aws-sagemaker-unencrypted-notebook'?: Linter.RuleEntry<[]>;
|
|
4441
4460
|
/**
|
|
4442
|
-
*
|
|
4461
|
+
* Amazon SNS topics should be encrypted at rest
|
|
4443
4462
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6327/javascript
|
|
4444
4463
|
*/
|
|
4445
4464
|
'sonar/aws-sns-unencrypted-topics'?: Linter.RuleEntry<[]>;
|
|
@@ -4468,12 +4487,6 @@ interface RuleOptions {
|
|
|
4468
4487
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1472/javascript
|
|
4469
4488
|
*/
|
|
4470
4489
|
'sonar/call-argument-line'?: Linter.RuleEntry<[]>;
|
|
4471
|
-
/**
|
|
4472
|
-
* Disabling Certificate Transparency monitoring is security-sensitive
|
|
4473
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S5742/javascript
|
|
4474
|
-
* @deprecated
|
|
4475
|
-
*/
|
|
4476
|
-
'sonar/certificate-transparency'?: Linter.RuleEntry<[]>;
|
|
4477
4490
|
/**
|
|
4478
4491
|
* Chai assertions should have only one reason to succeed
|
|
4479
4492
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6092/javascript
|
|
@@ -4490,7 +4503,7 @@ interface RuleOptions {
|
|
|
4490
4503
|
*/
|
|
4491
4504
|
'sonar/class-prototype'?: Linter.RuleEntry<[]>;
|
|
4492
4505
|
/**
|
|
4493
|
-
*
|
|
4506
|
+
* Dynamic code execution should not use user-controlled data
|
|
4494
4507
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1523/javascript
|
|
4495
4508
|
*/
|
|
4496
4509
|
'sonar/code-eval'?: Linter.RuleEntry<[]>;
|
|
@@ -4521,8 +4534,9 @@ interface RuleOptions {
|
|
|
4521
4534
|
*/
|
|
4522
4535
|
'sonar/conditional-indentation'?: Linter.RuleEntry<[]>;
|
|
4523
4536
|
/**
|
|
4524
|
-
*
|
|
4537
|
+
* Confidential information should not be logged
|
|
4525
4538
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5757/javascript
|
|
4539
|
+
* @deprecated
|
|
4526
4540
|
*/
|
|
4527
4541
|
'sonar/confidential-information-logging'?: Linter.RuleEntry<[]>;
|
|
4528
4542
|
/**
|
|
@@ -4536,28 +4550,22 @@ interface RuleOptions {
|
|
|
4536
4550
|
*/
|
|
4537
4551
|
'sonar/content-length'?: Linter.RuleEntry<SonarContentLength>;
|
|
4538
4552
|
/**
|
|
4539
|
-
*
|
|
4553
|
+
* Content security policy fetch directives should not be disabled
|
|
4540
4554
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5728/javascript
|
|
4541
4555
|
*/
|
|
4542
4556
|
'sonar/content-security-policy'?: Linter.RuleEntry<[]>;
|
|
4543
4557
|
/**
|
|
4544
|
-
*
|
|
4558
|
+
* Cookies should have the "HttpOnly" flag
|
|
4545
4559
|
* @see https://sonarsource.github.io/rspec/#/rspec/S3330/javascript
|
|
4546
4560
|
*/
|
|
4547
4561
|
'sonar/cookie-no-httponly'?: Linter.RuleEntry<[]>;
|
|
4548
|
-
/**
|
|
4549
|
-
* Writing cookies is security-sensitive
|
|
4550
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S2255/javascript
|
|
4551
|
-
* @deprecated
|
|
4552
|
-
*/
|
|
4553
|
-
'sonar/cookies'?: Linter.RuleEntry<[]>;
|
|
4554
4562
|
/**
|
|
4555
4563
|
* Cross-Origin Resource Sharing (CORS) policy should be restricted to trusted origins
|
|
4556
4564
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5122/javascript
|
|
4557
4565
|
*/
|
|
4558
4566
|
'sonar/cors'?: Linter.RuleEntry<[]>;
|
|
4559
4567
|
/**
|
|
4560
|
-
*
|
|
4568
|
+
* CSRF protections should not be disabled
|
|
4561
4569
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4502/javascript
|
|
4562
4570
|
*/
|
|
4563
4571
|
'sonar/csrf'?: Linter.RuleEntry<[]>;
|
|
@@ -4587,12 +4595,12 @@ interface RuleOptions {
|
|
|
4587
4595
|
*/
|
|
4588
4596
|
'sonar/different-types-comparison'?: Linter.RuleEntry<[]>;
|
|
4589
4597
|
/**
|
|
4590
|
-
*
|
|
4598
|
+
* Auto-escaping in HTML template engines should not be disabled
|
|
4591
4599
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5247/javascript
|
|
4592
4600
|
*/
|
|
4593
4601
|
'sonar/disabled-auto-escaping'?: Linter.RuleEntry<[]>;
|
|
4594
4602
|
/**
|
|
4595
|
-
*
|
|
4603
|
+
* Remote artifacts should not be used without integrity checks
|
|
4596
4604
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5725/javascript
|
|
4597
4605
|
*/
|
|
4598
4606
|
'sonar/disabled-resource-integrity'?: Linter.RuleEntry<[]>;
|
|
@@ -4601,12 +4609,6 @@ interface RuleOptions {
|
|
|
4601
4609
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6080/javascript
|
|
4602
4610
|
*/
|
|
4603
4611
|
'sonar/disabled-timeout'?: Linter.RuleEntry<[]>;
|
|
4604
|
-
/**
|
|
4605
|
-
* Allowing browsers to perform DNS prefetching is security-sensitive
|
|
4606
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S5743/javascript
|
|
4607
|
-
* @deprecated
|
|
4608
|
-
*/
|
|
4609
|
-
'sonar/dns-prefetching'?: Linter.RuleEntry<[]>;
|
|
4610
4612
|
/**
|
|
4611
4613
|
* DOMPurify configuration should not be bypassable
|
|
4612
4614
|
* @see https://sonarsource.github.io/rspec/#/rspec/S8479/javascript
|
|
@@ -4632,12 +4634,6 @@ interface RuleOptions {
|
|
|
4632
4634
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5842/javascript
|
|
4633
4635
|
*/
|
|
4634
4636
|
'sonar/empty-string-repetition'?: Linter.RuleEntry<[]>;
|
|
4635
|
-
/**
|
|
4636
|
-
* Encrypting data is security-sensitive
|
|
4637
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S4787/javascript
|
|
4638
|
-
* @deprecated
|
|
4639
|
-
*/
|
|
4640
|
-
'sonar/encryption'?: Linter.RuleEntry<[]>;
|
|
4641
4637
|
/**
|
|
4642
4638
|
* Encryption algorithms should be used with secure mode and padding scheme
|
|
4643
4639
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5542/javascript
|
|
@@ -4689,8 +4685,9 @@ interface RuleOptions {
|
|
|
4689
4685
|
*/
|
|
4690
4686
|
'sonar/for-loop-increment-sign'?: Linter.RuleEntry<[]>;
|
|
4691
4687
|
/**
|
|
4692
|
-
*
|
|
4688
|
+
* Content Security Policy frame-ancestors directive should not be disabled
|
|
4693
4689
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5732/javascript
|
|
4690
|
+
* @deprecated
|
|
4694
4691
|
*/
|
|
4695
4692
|
'sonar/frame-ancestors'?: Linter.RuleEntry<[]>;
|
|
4696
4693
|
/**
|
|
@@ -4724,15 +4721,21 @@ interface RuleOptions {
|
|
|
4724
4721
|
*/
|
|
4725
4722
|
'sonar/hardcoded-secret-signatures'?: Linter.RuleEntry<[]>;
|
|
4726
4723
|
/**
|
|
4727
|
-
*
|
|
4724
|
+
* Weak hashing algorithms should not be used
|
|
4728
4725
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4790/javascript
|
|
4729
4726
|
*/
|
|
4730
4727
|
'sonar/hashing'?: Linter.RuleEntry<[]>;
|
|
4731
4728
|
/**
|
|
4732
|
-
*
|
|
4729
|
+
* Hidden files should not be served statically
|
|
4733
4730
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5691/javascript
|
|
4731
|
+
* @deprecated
|
|
4734
4732
|
*/
|
|
4735
4733
|
'sonar/hidden-files'?: Linter.RuleEntry<[]>;
|
|
4734
|
+
/**
|
|
4735
|
+
* Lifecycle hooks should not be interleaved with test cases or nested suites
|
|
4736
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8782/javascript
|
|
4737
|
+
*/
|
|
4738
|
+
'sonar/hooks-before-test-cases'?: Linter.RuleEntry<[]>;
|
|
4736
4739
|
/**
|
|
4737
4740
|
* "in" should not be used with primitive types
|
|
4738
4741
|
* @see https://sonarsource.github.io/rspec/#/rspec/S3785/javascript
|
|
@@ -4824,7 +4827,7 @@ interface RuleOptions {
|
|
|
4824
4827
|
*/
|
|
4825
4828
|
'sonar/no-alphabetical-sort'?: Linter.RuleEntry<[]>;
|
|
4826
4829
|
/**
|
|
4827
|
-
*
|
|
4830
|
+
* Angular built-in sanitization should not be disabled
|
|
4828
4831
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6268/javascript
|
|
4829
4832
|
*/
|
|
4830
4833
|
'sonar/no-angular-bypass-sanitization'?: Linter.RuleEntry<[]>;
|
|
@@ -4854,7 +4857,7 @@ interface RuleOptions {
|
|
|
4854
4857
|
*/
|
|
4855
4858
|
'sonar/no-case-label-in-switch'?: Linter.RuleEntry<[]>;
|
|
4856
4859
|
/**
|
|
4857
|
-
*
|
|
4860
|
+
* Clear-text protocols should not be used
|
|
4858
4861
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5332/javascript
|
|
4859
4862
|
*/
|
|
4860
4863
|
'sonar/no-clear-text-protocols'?: Linter.RuleEntry<[]>;
|
|
@@ -4903,6 +4906,11 @@ interface RuleOptions {
|
|
|
4903
4906
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1192/javascript
|
|
4904
4907
|
*/
|
|
4905
4908
|
'sonar/no-duplicate-string'?: Linter.RuleEntry<SonarNoDuplicateString>;
|
|
4909
|
+
/**
|
|
4910
|
+
* Test titles should be unique within the same suite
|
|
4911
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8754/javascript
|
|
4912
|
+
*/
|
|
4913
|
+
'sonar/no-duplicate-test-title'?: Linter.RuleEntry<[]>;
|
|
4906
4914
|
/**
|
|
4907
4915
|
* Two branches in a conditional structure should not have exactly the same implementation
|
|
4908
4916
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1871/javascript
|
|
@@ -4943,6 +4951,11 @@ interface RuleOptions {
|
|
|
4943
4951
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2187/javascript
|
|
4944
4952
|
*/
|
|
4945
4953
|
'sonar/no-empty-test-file'?: Linter.RuleEntry<[]>;
|
|
4954
|
+
/**
|
|
4955
|
+
* Test and suite titles should not be empty or whitespace-only
|
|
4956
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8781/javascript
|
|
4957
|
+
*/
|
|
4958
|
+
'sonar/no-empty-test-title'?: Linter.RuleEntry<[]>;
|
|
4946
4959
|
/**
|
|
4947
4960
|
* Equality operators should not be used in "for" loop termination conditions
|
|
4948
4961
|
* @see https://sonarsource.github.io/rspec/#/rspec/S888/javascript
|
|
@@ -4963,11 +4976,21 @@ interface RuleOptions {
|
|
|
4963
4976
|
* @see https://sonarsource.github.io/rspec/#/rspec/S128/javascript
|
|
4964
4977
|
*/
|
|
4965
4978
|
'sonar/no-fallthrough'?: Linter.RuleEntry<[]>;
|
|
4979
|
+
/**
|
|
4980
|
+
* Floating point numbers should not be tested for equality
|
|
4981
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S1244/javascript
|
|
4982
|
+
*/
|
|
4983
|
+
'sonar/no-floating-point-equality'?: Linter.RuleEntry<[]>;
|
|
4966
4984
|
/**
|
|
4967
4985
|
* "for in" should not be used with iterables
|
|
4968
4986
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4139/javascript
|
|
4969
4987
|
*/
|
|
4970
4988
|
'sonar/no-for-in-iterable'?: Linter.RuleEntry<[]>;
|
|
4989
|
+
/**
|
|
4990
|
+
* Forced browser interactions should not bypass actionability checks
|
|
4991
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8783/javascript
|
|
4992
|
+
*/
|
|
4993
|
+
'sonar/no-forced-browser-interaction'?: Linter.RuleEntry<[]>;
|
|
4971
4994
|
/**
|
|
4972
4995
|
* Function declarations should not be made within blocks
|
|
4973
4996
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1530/javascript
|
|
@@ -5048,6 +5071,11 @@ interface RuleOptions {
|
|
|
5048
5071
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4619/javascript
|
|
5049
5072
|
*/
|
|
5050
5073
|
'sonar/no-in-misuse'?: Linter.RuleEntry<[]>;
|
|
5074
|
+
/**
|
|
5075
|
+
* Assertions comparing incompatible types should not be made
|
|
5076
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S5845/javascript
|
|
5077
|
+
*/
|
|
5078
|
+
'sonar/no-incompatible-assertion-types'?: Linter.RuleEntry<[]>;
|
|
5051
5079
|
/**
|
|
5052
5080
|
* Assertions should be complete
|
|
5053
5081
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2970/javascript
|
|
@@ -5069,8 +5097,9 @@ interface RuleOptions {
|
|
|
5069
5097
|
*/
|
|
5070
5098
|
'sonar/no-internal-api-use'?: Linter.RuleEntry<[]>;
|
|
5071
5099
|
/**
|
|
5072
|
-
*
|
|
5100
|
+
* Sensitive permissions should not be requested unnecessarily
|
|
5073
5101
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5604/javascript
|
|
5102
|
+
* @deprecated
|
|
5074
5103
|
*/
|
|
5075
5104
|
'sonar/no-intrusive-permissions'?: Linter.RuleEntry<SonarNoIntrusivePermissions>;
|
|
5076
5105
|
/**
|
|
@@ -5089,8 +5118,9 @@ interface RuleOptions {
|
|
|
5089
5118
|
*/
|
|
5090
5119
|
'sonar/no-inverted-boolean-check'?: Linter.RuleEntry<[]>;
|
|
5091
5120
|
/**
|
|
5092
|
-
*
|
|
5121
|
+
* Client IP address should not be forwarded to proxies
|
|
5093
5122
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5759/javascript
|
|
5123
|
+
* @deprecated
|
|
5094
5124
|
*/
|
|
5095
5125
|
'sonar/no-ip-forward'?: Linter.RuleEntry<[]>;
|
|
5096
5126
|
/**
|
|
@@ -5104,7 +5134,7 @@ interface RuleOptions {
|
|
|
5104
5134
|
*/
|
|
5105
5135
|
'sonar/no-literal-call'?: Linter.RuleEntry<[]>;
|
|
5106
5136
|
/**
|
|
5107
|
-
*
|
|
5137
|
+
* Browsers should not be allowed to perform MIME type sniffing
|
|
5108
5138
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5734/javascript
|
|
5109
5139
|
*/
|
|
5110
5140
|
'sonar/no-mime-sniff'?: Linter.RuleEntry<[]>;
|
|
@@ -5119,8 +5149,9 @@ interface RuleOptions {
|
|
|
5119
5149
|
*/
|
|
5120
5150
|
'sonar/no-misleading-character-class'?: Linter.RuleEntry<[]>;
|
|
5121
5151
|
/**
|
|
5122
|
-
*
|
|
5152
|
+
* Content Security Policy should block mixed-content
|
|
5123
5153
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5730/javascript
|
|
5154
|
+
* @deprecated
|
|
5124
5155
|
*/
|
|
5125
5156
|
'sonar/no-mixed-content'?: Linter.RuleEntry<[]>;
|
|
5126
5157
|
/**
|
|
@@ -5154,7 +5185,7 @@ interface RuleOptions {
|
|
|
5154
5185
|
*/
|
|
5155
5186
|
'sonar/no-nested-template-literals'?: Linter.RuleEntry<[]>;
|
|
5156
5187
|
/**
|
|
5157
|
-
*
|
|
5188
|
+
* OS commands should not rely on PATH resolution
|
|
5158
5189
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4036/javascript
|
|
5159
5190
|
*/
|
|
5160
5191
|
'sonar/no-os-command-from-path'?: Linter.RuleEntry<[]>;
|
|
@@ -5200,7 +5231,7 @@ interface RuleOptions {
|
|
|
5200
5231
|
*/
|
|
5201
5232
|
'sonar/no-reference-error'?: Linter.RuleEntry<[]>;
|
|
5202
5233
|
/**
|
|
5203
|
-
*
|
|
5234
|
+
* HTTP Referrer-Policy should not be set to an unsafe value
|
|
5204
5235
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5736/javascript
|
|
5205
5236
|
*/
|
|
5206
5237
|
'sonar/no-referrer-policy'?: Linter.RuleEntry<[]>;
|
|
@@ -5265,6 +5296,11 @@ interface RuleOptions {
|
|
|
5265
5296
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5257/javascript
|
|
5266
5297
|
*/
|
|
5267
5298
|
'sonar/no-table-as-layout'?: Linter.RuleEntry<[]>;
|
|
5299
|
+
/**
|
|
5300
|
+
* Assertions should not fail or succeed unconditionally
|
|
5301
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S5914/javascript
|
|
5302
|
+
*/
|
|
5303
|
+
'sonar/no-trivial-assertions'?: Linter.RuleEntry<[]>;
|
|
5268
5304
|
/**
|
|
5269
5305
|
* Promise rejections should not be caught by "try" blocks
|
|
5270
5306
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4822/javascript
|
|
@@ -5346,12 +5382,6 @@ interface RuleOptions {
|
|
|
5346
5382
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1526/javascript
|
|
5347
5383
|
*/
|
|
5348
5384
|
'sonar/no-variable-usage-before-declaration'?: Linter.RuleEntry<[]>;
|
|
5349
|
-
/**
|
|
5350
|
-
* Disabling Vue.js built-in escaping is security-sensitive
|
|
5351
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S6299/javascript
|
|
5352
|
-
* @deprecated
|
|
5353
|
-
*/
|
|
5354
|
-
'sonar/no-vue-bypass-sanitization'?: Linter.RuleEntry<[]>;
|
|
5355
5385
|
/**
|
|
5356
5386
|
* Cipher algorithms should be robust
|
|
5357
5387
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5547/javascript
|
|
@@ -5393,8 +5423,9 @@ interface RuleOptions {
|
|
|
5393
5423
|
*/
|
|
5394
5424
|
'sonar/operation-returning-nan'?: Linter.RuleEntry<[]>;
|
|
5395
5425
|
/**
|
|
5396
|
-
*
|
|
5426
|
+
* OS commands should not be executed using a shell interpreter
|
|
5397
5427
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4721/javascript
|
|
5428
|
+
* @deprecated
|
|
5398
5429
|
*/
|
|
5399
5430
|
'sonar/os-command'?: Linter.RuleEntry<[]>;
|
|
5400
5431
|
/**
|
|
@@ -5437,6 +5468,11 @@ interface RuleOptions {
|
|
|
5437
5468
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1126/javascript
|
|
5438
5469
|
*/
|
|
5439
5470
|
'sonar/prefer-single-boolean-return'?: Linter.RuleEntry<[]>;
|
|
5471
|
+
/**
|
|
5472
|
+
* The most specific assertion should be used
|
|
5473
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S5906/javascript
|
|
5474
|
+
*/
|
|
5475
|
+
'sonar/prefer-specific-assertions'?: Linter.RuleEntry<[]>;
|
|
5440
5476
|
/**
|
|
5441
5477
|
* Type predicates should be used
|
|
5442
5478
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4322/javascript
|
|
@@ -5448,18 +5484,12 @@ interface RuleOptions {
|
|
|
5448
5484
|
*/
|
|
5449
5485
|
'sonar/prefer-while'?: Linter.RuleEntry<[]>;
|
|
5450
5486
|
/**
|
|
5451
|
-
*
|
|
5452
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S4823/javascript
|
|
5453
|
-
* @deprecated
|
|
5454
|
-
*/
|
|
5455
|
-
'sonar/process-argv'?: Linter.RuleEntry<[]>;
|
|
5456
|
-
/**
|
|
5457
|
-
* Delivering code in production with debug features activated is security-sensitive
|
|
5487
|
+
* Debugging features should not be enabled in production
|
|
5458
5488
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4507/javascript
|
|
5459
5489
|
*/
|
|
5460
5490
|
'sonar/production-debug'?: Linter.RuleEntry<[]>;
|
|
5461
5491
|
/**
|
|
5462
|
-
*
|
|
5492
|
+
* Pseudorandom number generators (PRNGs) should not be used in security contexts
|
|
5463
5493
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2245/javascript
|
|
5464
5494
|
*/
|
|
5465
5495
|
'sonar/pseudo-random'?: Linter.RuleEntry<[]>;
|
|
@@ -5488,12 +5518,6 @@ interface RuleOptions {
|
|
|
5488
5518
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5843/javascript
|
|
5489
5519
|
*/
|
|
5490
5520
|
'sonar/regex-complexity'?: Linter.RuleEntry<SonarRegexComplexity>;
|
|
5491
|
-
/**
|
|
5492
|
-
* Using regular expressions is security-sensitive
|
|
5493
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S4784/javascript
|
|
5494
|
-
* @deprecated
|
|
5495
|
-
*/
|
|
5496
|
-
'sonar/regular-expr'?: Linter.RuleEntry<[]>;
|
|
5497
5521
|
/**
|
|
5498
5522
|
* Wallet phrases should not be hard-coded
|
|
5499
5523
|
* @see https://sonarsource.github.io/rspec/#/rspec/S7639/javascript
|
|
@@ -5520,18 +5544,12 @@ interface RuleOptions {
|
|
|
5520
5544
|
*/
|
|
5521
5545
|
'sonar/single-character-alternation'?: Linter.RuleEntry<[]>;
|
|
5522
5546
|
/**
|
|
5523
|
-
*
|
|
5547
|
+
* Regular expressions should not cause catastrophic backtracking
|
|
5524
5548
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5852/javascript
|
|
5525
5549
|
*/
|
|
5526
5550
|
'sonar/slow-regex'?: Linter.RuleEntry<[]>;
|
|
5527
5551
|
/**
|
|
5528
|
-
*
|
|
5529
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S4818/javascript
|
|
5530
|
-
* @deprecated
|
|
5531
|
-
*/
|
|
5532
|
-
'sonar/sockets'?: Linter.RuleEntry<[]>;
|
|
5533
|
-
/**
|
|
5534
|
-
* Formatting SQL queries is security-sensitive
|
|
5552
|
+
* SQL queries should not be dynamically formatted
|
|
5535
5553
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2077/javascript
|
|
5536
5554
|
*/
|
|
5537
5555
|
'sonar/sql-queries'?: Linter.RuleEntry<[]>;
|
|
@@ -5540,19 +5558,13 @@ interface RuleOptions {
|
|
|
5540
5558
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5973/javascript
|
|
5541
5559
|
*/
|
|
5542
5560
|
'sonar/stable-tests'?: Linter.RuleEntry<[]>;
|
|
5543
|
-
/**
|
|
5544
|
-
* Reading the Standard Input is security-sensitive
|
|
5545
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S4829/javascript
|
|
5546
|
-
* @deprecated
|
|
5547
|
-
*/
|
|
5548
|
-
'sonar/standard-input'?: Linter.RuleEntry<[]>;
|
|
5549
5561
|
/**
|
|
5550
5562
|
* Regular expressions with the global flag should be used with caution
|
|
5551
5563
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6351/javascript
|
|
5552
5564
|
*/
|
|
5553
5565
|
'sonar/stateful-regex'?: Linter.RuleEntry<[]>;
|
|
5554
5566
|
/**
|
|
5555
|
-
*
|
|
5567
|
+
* HTTP Strict-Transport-Security policy should not be disabled
|
|
5556
5568
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5739/javascript
|
|
5557
5569
|
*/
|
|
5558
5570
|
'sonar/strict-transport-security'?: Linter.RuleEntry<[]>;
|
|
@@ -5561,6 +5573,11 @@ interface RuleOptions {
|
|
|
5561
5573
|
* @see https://sonarsource.github.io/rspec/#/rspec/S3003/javascript
|
|
5562
5574
|
*/
|
|
5563
5575
|
'sonar/strings-comparison'?: Linter.RuleEntry<[]>;
|
|
5576
|
+
/**
|
|
5577
|
+
* Regular expressions should not cause non-linear backtracking
|
|
5578
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8786/javascript
|
|
5579
|
+
*/
|
|
5580
|
+
'sonar/super-linear-regex'?: Linter.RuleEntry<[]>;
|
|
5564
5581
|
/**
|
|
5565
5582
|
* Tables should have headers
|
|
5566
5583
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5256/javascript
|
|
@@ -5668,12 +5685,6 @@ interface RuleOptions {
|
|
|
5668
5685
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2755/javascript
|
|
5669
5686
|
*/
|
|
5670
5687
|
'sonar/xml-parser-xxe'?: Linter.RuleEntry<[]>;
|
|
5671
|
-
/**
|
|
5672
|
-
* Executing XPath expressions is security-sensitive
|
|
5673
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S4817/javascript
|
|
5674
|
-
* @deprecated
|
|
5675
|
-
*/
|
|
5676
|
-
'sonar/xpath'?: Linter.RuleEntry<[]>;
|
|
5677
5688
|
/**
|
|
5678
5689
|
* Enforce sorted `import` declarations within modules
|
|
5679
5690
|
* @see https://eslint.org/docs/latest/rules/sort-imports
|
|
@@ -7220,753 +7231,1623 @@ interface RuleOptions {
|
|
|
7220
7231
|
*/
|
|
7221
7232
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7222
7233
|
/**
|
|
7223
|
-
*
|
|
7224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7234
|
+
* Prefer better DOM traversal APIs.
|
|
7235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/better-dom-traversing.md
|
|
7225
7236
|
*/
|
|
7226
|
-
'unicorn/better-
|
|
7237
|
+
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7238
|
+
/**
|
|
7239
|
+
* Removed. Prefer `eslint-plugin-regexp`
|
|
7240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7241
|
+
* @deprecated
|
|
7242
|
+
*/
|
|
7243
|
+
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7227
7244
|
/**
|
|
7228
7245
|
* Enforce a specific parameter name in catch clauses.
|
|
7229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/catch-error-name.md
|
|
7230
7247
|
*/
|
|
7231
7248
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7249
|
+
/**
|
|
7250
|
+
* Enforce consistent class references in static methods.
|
|
7251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/class-reference-in-static-methods.md
|
|
7252
|
+
*/
|
|
7253
|
+
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7254
|
+
/**
|
|
7255
|
+
* Enforce better comment content.
|
|
7256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/comment-content.md
|
|
7257
|
+
*/
|
|
7258
|
+
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7232
7259
|
/**
|
|
7233
7260
|
* Enforce consistent assertion style with `node:assert`.
|
|
7234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-assert.md
|
|
7235
7262
|
*/
|
|
7236
7263
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7264
|
+
/**
|
|
7265
|
+
* Enforce consistent naming for boolean names.
|
|
7266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-boolean-name.md
|
|
7267
|
+
*/
|
|
7268
|
+
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7269
|
+
/**
|
|
7270
|
+
* Enforce consistent class member order.
|
|
7271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-class-member-order.md
|
|
7272
|
+
*/
|
|
7273
|
+
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7274
|
+
/**
|
|
7275
|
+
* Enforce consistent spelling of compound words in identifiers.
|
|
7276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-compound-words.md
|
|
7277
|
+
*/
|
|
7278
|
+
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7279
|
+
/**
|
|
7280
|
+
* Enforce consistent conditional object spread style.
|
|
7281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
7282
|
+
*/
|
|
7283
|
+
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7237
7284
|
/**
|
|
7238
7285
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-date-clone.md
|
|
7240
7287
|
*/
|
|
7241
7288
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7242
7289
|
/**
|
|
7243
7290
|
* Use destructured variables over properties.
|
|
7244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-destructuring.md
|
|
7245
7292
|
*/
|
|
7246
7293
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7247
7294
|
/**
|
|
7248
7295
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-empty-array-spread.md
|
|
7250
7297
|
*/
|
|
7251
7298
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7252
7299
|
/**
|
|
7253
7300
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-existence-index-check.md
|
|
7255
7302
|
*/
|
|
7256
7303
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7304
|
+
/**
|
|
7305
|
+
* Enforce consistent decorator position on exported classes.
|
|
7306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-export-decorator-position.md
|
|
7307
|
+
*/
|
|
7308
|
+
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7257
7309
|
/**
|
|
7258
7310
|
* Move function definitions to the highest possible scope.
|
|
7259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-function-scoping.md
|
|
7260
7312
|
*/
|
|
7261
7313
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7314
|
+
/**
|
|
7315
|
+
* Enforce function syntax by role.
|
|
7316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-function-style.md
|
|
7317
|
+
*/
|
|
7318
|
+
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7319
|
+
/**
|
|
7320
|
+
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-json-file-read.md
|
|
7322
|
+
*/
|
|
7323
|
+
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7324
|
+
/**
|
|
7325
|
+
* Enforce consistent optional chaining for same-base member access.
|
|
7326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-optional-chaining.md
|
|
7327
|
+
*/
|
|
7328
|
+
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7262
7329
|
/**
|
|
7263
7330
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7265
7332
|
*/
|
|
7266
7333
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7334
|
+
/**
|
|
7335
|
+
* Enforce consistent labels on tuple type elements.
|
|
7336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/consistent-tuple-labels.md
|
|
7337
|
+
*/
|
|
7338
|
+
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7267
7339
|
/**
|
|
7268
7340
|
* Enforce correct `Error` subclassing.
|
|
7269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/custom-error-definition.md
|
|
7270
7342
|
*/
|
|
7271
7343
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7344
|
+
/**
|
|
7345
|
+
* Enforce consistent default export declarations.
|
|
7346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/default-export-style.md
|
|
7347
|
+
*/
|
|
7348
|
+
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7349
|
+
/**
|
|
7350
|
+
* Enforce consistent style for DOM element dataset access.
|
|
7351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/dom-node-dataset.md
|
|
7352
|
+
*/
|
|
7353
|
+
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7272
7354
|
/**
|
|
7273
7355
|
* Enforce no spaces between braces.
|
|
7274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/empty-brace-spaces.md
|
|
7275
7357
|
*/
|
|
7276
7358
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7277
7359
|
/**
|
|
7278
7360
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/error-message.md
|
|
7280
7362
|
*/
|
|
7281
7363
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7282
7364
|
/**
|
|
7283
7365
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/escape-case.md
|
|
7285
7367
|
*/
|
|
7286
7368
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7287
7369
|
/**
|
|
7288
7370
|
* Add expiration conditions to TODO comments.
|
|
7289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/expiring-todo-comments.md
|
|
7290
7372
|
*/
|
|
7291
7373
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7292
7374
|
/**
|
|
7293
7375
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/explicit-length-check.md
|
|
7295
7377
|
*/
|
|
7296
7378
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7297
7379
|
/**
|
|
7298
|
-
* Enforce
|
|
7299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7380
|
+
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/explicit-timer-delay.md
|
|
7382
|
+
*/
|
|
7383
|
+
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7384
|
+
/**
|
|
7385
|
+
* Enforce a case style for filenames and directory names.
|
|
7386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/filename-case.md
|
|
7300
7387
|
*/
|
|
7301
7388
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7389
|
+
/**
|
|
7390
|
+
* Require identifiers to match a specified regular expression.
|
|
7391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/id-match.md
|
|
7392
|
+
*/
|
|
7393
|
+
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7302
7394
|
/**
|
|
7303
7395
|
* Enforce specific import styles per module.
|
|
7304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/import-style.md
|
|
7305
7397
|
*/
|
|
7306
7398
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7307
7399
|
/**
|
|
7308
7400
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/isolated-functions.md
|
|
7310
7402
|
*/
|
|
7311
7403
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7312
7404
|
/**
|
|
7313
|
-
*
|
|
7314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7405
|
+
* Require or disallow logical assignment operator shorthand
|
|
7406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/logical-assignment-operators.md
|
|
7407
|
+
*/
|
|
7408
|
+
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7409
|
+
/**
|
|
7410
|
+
* Limit the depth of nested calls.
|
|
7411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/max-nested-calls.md
|
|
7412
|
+
*/
|
|
7413
|
+
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7414
|
+
/**
|
|
7415
|
+
* Enforce replacements for variable, property, and filenames.
|
|
7416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/name-replacements.md
|
|
7417
|
+
*/
|
|
7418
|
+
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7419
|
+
/**
|
|
7420
|
+
* Enforce correct use of `new` for builtin constructors.
|
|
7421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/new-for-builtins.md
|
|
7315
7422
|
*/
|
|
7316
7423
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7317
7424
|
/**
|
|
7318
7425
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7320
7427
|
*/
|
|
7321
7428
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7322
7429
|
/**
|
|
7323
7430
|
* Disallow recursive access to `this` within getters and setters.
|
|
7324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-accessor-recursion.md
|
|
7325
7432
|
*/
|
|
7326
7433
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7434
|
+
/**
|
|
7435
|
+
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7437
|
+
*/
|
|
7438
|
+
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7327
7439
|
/**
|
|
7328
7440
|
* Disallow anonymous functions and classes as the default export.
|
|
7329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-anonymous-default-export.md
|
|
7330
7442
|
*/
|
|
7331
7443
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7332
7444
|
/**
|
|
7333
7445
|
* Prevent passing a function reference directly to iterator methods.
|
|
7334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-callback-reference.md
|
|
7335
7447
|
*/
|
|
7336
|
-
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<
|
|
7448
|
+
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7337
7449
|
/**
|
|
7338
|
-
*
|
|
7339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7450
|
+
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-concat-in-loop.md
|
|
7452
|
+
*/
|
|
7453
|
+
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7454
|
+
/**
|
|
7455
|
+
* Disallow using reference values as `Array#fill()` values.
|
|
7456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7340
7457
|
*/
|
|
7341
|
-
'unicorn/no-array-
|
|
7458
|
+
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7459
|
+
/**
|
|
7460
|
+
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-from-fill.md
|
|
7462
|
+
*/
|
|
7463
|
+
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7464
|
+
/**
|
|
7465
|
+
* Disallow front-of-array mutation.
|
|
7466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-front-mutation.md
|
|
7467
|
+
*/
|
|
7468
|
+
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7342
7469
|
/**
|
|
7343
7470
|
* Disallow using the `this` argument in array methods.
|
|
7344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-method-this-argument.md
|
|
7345
7472
|
*/
|
|
7346
7473
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7347
7474
|
/**
|
|
7348
7475
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7350
7477
|
* @deprecated
|
|
7351
7478
|
*/
|
|
7352
7479
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7353
7480
|
/**
|
|
7354
7481
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-reduce.md
|
|
7356
7483
|
*/
|
|
7357
7484
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7358
7485
|
/**
|
|
7359
7486
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-reverse.md
|
|
7361
7488
|
*/
|
|
7362
7489
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7363
7490
|
/**
|
|
7364
7491
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-sort.md
|
|
7366
7493
|
*/
|
|
7367
7494
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7495
|
+
/**
|
|
7496
|
+
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
7498
|
+
*/
|
|
7499
|
+
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7500
|
+
/**
|
|
7501
|
+
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-array-splice.md
|
|
7503
|
+
*/
|
|
7504
|
+
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7505
|
+
/**
|
|
7506
|
+
* Disallow asterisk prefixes in documentation comments.
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7508
|
+
*/
|
|
7509
|
+
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7368
7510
|
/**
|
|
7369
7511
|
* Disallow member access from await expression.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-await-expression-member.md
|
|
7371
7513
|
*/
|
|
7372
7514
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7373
7515
|
/**
|
|
7374
7516
|
* Disallow using `await` in `Promise` method parameters.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7376
7518
|
*/
|
|
7377
7519
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7520
|
+
/**
|
|
7521
|
+
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-blob-to-file.md
|
|
7523
|
+
*/
|
|
7524
|
+
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7525
|
+
/**
|
|
7526
|
+
* Disallow boolean-returning sort comparators.
|
|
7527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
7528
|
+
*/
|
|
7529
|
+
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7530
|
+
/**
|
|
7531
|
+
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-break-in-nested-loop.md
|
|
7533
|
+
*/
|
|
7534
|
+
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7535
|
+
/**
|
|
7536
|
+
* Prefer drawing canvases directly instead of converting them to images.
|
|
7537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-canvas-to-image.md
|
|
7538
|
+
*/
|
|
7539
|
+
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7540
|
+
/**
|
|
7541
|
+
* Disallow chained comparisons such as `a < b < c`.
|
|
7542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-chained-comparison.md
|
|
7543
|
+
*/
|
|
7544
|
+
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7545
|
+
/**
|
|
7546
|
+
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-collection-bracket-access.md
|
|
7548
|
+
*/
|
|
7549
|
+
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7550
|
+
/**
|
|
7551
|
+
* Disallow dynamic object property existence checks.
|
|
7552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-computed-property-existence-check.md
|
|
7553
|
+
*/
|
|
7554
|
+
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7555
|
+
/**
|
|
7556
|
+
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-confusing-array-splice.md
|
|
7558
|
+
*/
|
|
7559
|
+
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7560
|
+
/**
|
|
7561
|
+
* Disallow confusing uses of `Array#with()`.
|
|
7562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-confusing-array-with.md
|
|
7563
|
+
*/
|
|
7564
|
+
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7378
7565
|
/**
|
|
7379
7566
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-console-spaces.md
|
|
7381
7568
|
*/
|
|
7382
7569
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7570
|
+
/**
|
|
7571
|
+
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-constant-zero-expression.md
|
|
7573
|
+
*/
|
|
7574
|
+
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7575
|
+
/**
|
|
7576
|
+
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
7578
|
+
*/
|
|
7579
|
+
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7383
7580
|
/**
|
|
7384
7581
|
* Do not use `document.cookie` directly.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-document-cookie.md
|
|
7386
7583
|
*/
|
|
7387
7584
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7585
|
+
/**
|
|
7586
|
+
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-double-comparison.md
|
|
7588
|
+
*/
|
|
7589
|
+
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7590
|
+
/**
|
|
7591
|
+
* Disallow duplicate adjacent branches in if chains.
|
|
7592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-if-branches.md
|
|
7593
|
+
*/
|
|
7594
|
+
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7595
|
+
/**
|
|
7596
|
+
* Disallow adjacent duplicate operands in logical expressions.
|
|
7597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
7598
|
+
*/
|
|
7599
|
+
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7600
|
+
/**
|
|
7601
|
+
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-loops.md
|
|
7603
|
+
*/
|
|
7604
|
+
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7605
|
+
/**
|
|
7606
|
+
* Disallow duplicate values in `Set` constructor array literals.
|
|
7607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-duplicate-set-values.md
|
|
7608
|
+
*/
|
|
7609
|
+
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7388
7610
|
/**
|
|
7389
7611
|
* Disallow empty files.
|
|
7390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-empty-file.md
|
|
7613
|
+
*/
|
|
7614
|
+
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7615
|
+
/**
|
|
7616
|
+
* Disallow assigning to built-in error properties.
|
|
7617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-error-property-assignment.md
|
|
7618
|
+
*/
|
|
7619
|
+
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7620
|
+
/**
|
|
7621
|
+
* Disallow exports in scripts.
|
|
7622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-exports-in-scripts.md
|
|
7391
7623
|
*/
|
|
7392
|
-
'unicorn/no-
|
|
7624
|
+
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7625
|
+
/**
|
|
7626
|
+
* Prefer `for…of` over the `forEach` method.
|
|
7627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-for-each.md
|
|
7628
|
+
*/
|
|
7629
|
+
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7393
7630
|
/**
|
|
7394
7631
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-for-loop.md
|
|
7396
7633
|
*/
|
|
7397
7634
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7398
7635
|
/**
|
|
7399
|
-
*
|
|
7400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7636
|
+
* Disallow assigning properties on the global object.
|
|
7637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-global-object-property-assignment.md
|
|
7638
|
+
*/
|
|
7639
|
+
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7640
|
+
/**
|
|
7641
|
+
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7643
|
+
* @deprecated
|
|
7401
7644
|
*/
|
|
7402
7645
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7403
7646
|
/**
|
|
7404
7647
|
* Disallow immediate mutation after variable assignment.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-immediate-mutation.md
|
|
7406
7649
|
*/
|
|
7407
7650
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7651
|
+
/**
|
|
7652
|
+
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-impossible-length-comparison.md
|
|
7654
|
+
*/
|
|
7655
|
+
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7656
|
+
/**
|
|
7657
|
+
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-incorrect-query-selector.md
|
|
7659
|
+
*/
|
|
7660
|
+
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7661
|
+
/**
|
|
7662
|
+
* Disallow incorrect template literal interpolation syntax.
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7664
|
+
*/
|
|
7665
|
+
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7408
7666
|
/**
|
|
7409
7667
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7411
7669
|
* @deprecated
|
|
7412
7670
|
*/
|
|
7413
7671
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7414
7672
|
/**
|
|
7415
7673
|
* Disallow `instanceof` with built-in objects
|
|
7416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-instanceof-builtins.md
|
|
7417
7675
|
*/
|
|
7418
7676
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7677
|
+
/**
|
|
7678
|
+
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-argument-count.md
|
|
7680
|
+
*/
|
|
7681
|
+
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7682
|
+
/**
|
|
7683
|
+
* Disallow comparing a single character from a string to a multi-character string.
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-character-comparison.md
|
|
7685
|
+
*/
|
|
7686
|
+
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7419
7687
|
/**
|
|
7420
7688
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7422
7690
|
*/
|
|
7423
7691
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7692
|
+
/**
|
|
7693
|
+
* Disallow invalid `accept` values on file inputs.
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
7695
|
+
*/
|
|
7696
|
+
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7424
7697
|
/**
|
|
7425
7698
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7427
7700
|
*/
|
|
7428
7701
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7702
|
+
/**
|
|
7703
|
+
* Disallow invalid implementations of well-known symbol methods.
|
|
7704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7705
|
+
*/
|
|
7706
|
+
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7429
7707
|
/**
|
|
7430
7708
|
* Disallow identifiers starting with `new` or `class`.
|
|
7431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-keyword-prefix.md
|
|
7432
7710
|
*/
|
|
7433
7711
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7712
|
+
/**
|
|
7713
|
+
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-late-current-target-access.md
|
|
7715
|
+
*/
|
|
7716
|
+
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7717
|
+
/**
|
|
7718
|
+
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-late-event-control.md
|
|
7720
|
+
*/
|
|
7721
|
+
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7434
7722
|
/**
|
|
7435
7723
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7437
7725
|
* @deprecated
|
|
7438
7726
|
*/
|
|
7439
7727
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7440
7728
|
/**
|
|
7441
7729
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-lonely-if.md
|
|
7443
7731
|
*/
|
|
7444
7732
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7733
|
+
/**
|
|
7734
|
+
* Disallow mutating a loop iterable during iteration.
|
|
7735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
7736
|
+
*/
|
|
7737
|
+
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7445
7738
|
/**
|
|
7446
7739
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7448
7741
|
*/
|
|
7449
7742
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7743
|
+
/**
|
|
7744
|
+
* Disallow manually wrapped comments.
|
|
7745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
7746
|
+
*/
|
|
7747
|
+
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7748
|
+
/**
|
|
7749
|
+
* Disallow checking a Map key before accessing a different key.
|
|
7750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-mismatched-map-key.md
|
|
7751
|
+
*/
|
|
7752
|
+
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7753
|
+
/**
|
|
7754
|
+
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-misrefactored-assignment.md
|
|
7756
|
+
*/
|
|
7757
|
+
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7450
7758
|
/**
|
|
7451
7759
|
* Disallow named usage of default import and export.
|
|
7452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-named-default.md
|
|
7453
7761
|
*/
|
|
7454
7762
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7763
|
+
/**
|
|
7764
|
+
* Disallow negated array predicate calls.
|
|
7765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-array-predicate.md
|
|
7766
|
+
*/
|
|
7767
|
+
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7768
|
+
/**
|
|
7769
|
+
* Disallow negated comparisons.
|
|
7770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-comparison.md
|
|
7771
|
+
*/
|
|
7772
|
+
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7455
7773
|
/**
|
|
7456
7774
|
* Disallow negated conditions.
|
|
7457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negated-condition.md
|
|
7458
7776
|
*/
|
|
7459
7777
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7460
7778
|
/**
|
|
7461
7779
|
* Disallow negated expression in equality check.
|
|
7462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7463
7781
|
*/
|
|
7464
7782
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7465
7783
|
/**
|
|
7466
7784
|
* Disallow nested ternary expressions.
|
|
7467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-nested-ternary.md
|
|
7468
7786
|
*/
|
|
7469
7787
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7470
7788
|
/**
|
|
7471
7789
|
* Disallow `new Array()`.
|
|
7472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-new-array.md
|
|
7473
7791
|
*/
|
|
7474
7792
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7475
7793
|
/**
|
|
7476
7794
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-new-buffer.md
|
|
7478
7796
|
*/
|
|
7479
7797
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7798
|
+
/**
|
|
7799
|
+
* Disallow non-function values with function-style verb prefixes.
|
|
7800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
7801
|
+
*/
|
|
7802
|
+
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7803
|
+
/**
|
|
7804
|
+
* Disallow non-standard properties on built-in objects.
|
|
7805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7806
|
+
*/
|
|
7807
|
+
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7480
7808
|
/**
|
|
7481
7809
|
* Disallow the use of the `null` literal.
|
|
7482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-null.md
|
|
7483
7811
|
*/
|
|
7484
7812
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7485
7813
|
/**
|
|
7486
7814
|
* Disallow the use of objects as default parameters.
|
|
7487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7488
7816
|
*/
|
|
7489
7817
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7818
|
+
/**
|
|
7819
|
+
* Disallow `Object` methods with `Map` or `Set`.
|
|
7820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-object-methods-with-collections.md
|
|
7821
|
+
*/
|
|
7822
|
+
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7823
|
+
/**
|
|
7824
|
+
* Disallow optional chaining on undeclared variables.
|
|
7825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7826
|
+
*/
|
|
7827
|
+
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7490
7828
|
/**
|
|
7491
7829
|
* Disallow `process.exit()`.
|
|
7492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-process-exit.md
|
|
7493
7831
|
*/
|
|
7494
7832
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7833
|
+
/**
|
|
7834
|
+
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-redundant-comparison.md
|
|
7836
|
+
*/
|
|
7837
|
+
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7838
|
+
/**
|
|
7839
|
+
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-return-array-push.md
|
|
7841
|
+
*/
|
|
7842
|
+
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7843
|
+
/**
|
|
7844
|
+
* Disallow selector syntax in DOM names.
|
|
7845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-selector-as-dom-name.md
|
|
7846
|
+
*/
|
|
7847
|
+
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7495
7848
|
/**
|
|
7496
7849
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7498
7851
|
*/
|
|
7499
7852
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7500
7853
|
/**
|
|
7501
7854
|
* Disallow classes that only have static members.
|
|
7502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-static-only-class.md
|
|
7503
7856
|
*/
|
|
7504
7857
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7858
|
+
/**
|
|
7859
|
+
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-subtraction-comparison.md
|
|
7861
|
+
*/
|
|
7862
|
+
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7505
7863
|
/**
|
|
7506
7864
|
* Disallow `then` property.
|
|
7507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-thenable.md
|
|
7508
7866
|
*/
|
|
7509
7867
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7510
7868
|
/**
|
|
7511
7869
|
* Disallow assigning `this` to a variable.
|
|
7512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-this-assignment.md
|
|
7513
7871
|
*/
|
|
7514
7872
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7873
|
+
/**
|
|
7874
|
+
* Disallow `this` outside of classes.
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-this-outside-of-class.md
|
|
7876
|
+
*/
|
|
7877
|
+
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7878
|
+
/**
|
|
7879
|
+
* Disallow assigning to top-level variables from inside functions.
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7881
|
+
*/
|
|
7882
|
+
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7883
|
+
/**
|
|
7884
|
+
* Disallow top-level side effects in exported modules.
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-top-level-side-effects.md
|
|
7886
|
+
*/
|
|
7887
|
+
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7515
7888
|
/**
|
|
7516
7889
|
* Disallow comparing `undefined` using `typeof`.
|
|
7517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-typeof-undefined.md
|
|
7518
7891
|
*/
|
|
7519
7892
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7893
|
+
/**
|
|
7894
|
+
* Disallow referencing methods without calling them.
|
|
7895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-uncalled-method.md
|
|
7896
|
+
*/
|
|
7897
|
+
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7898
|
+
/**
|
|
7899
|
+
* Require class members to be declared.
|
|
7900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-undeclared-class-members.md
|
|
7901
|
+
*/
|
|
7902
|
+
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7520
7903
|
/**
|
|
7521
7904
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7523
7906
|
*/
|
|
7524
7907
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7525
7908
|
/**
|
|
7526
7909
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7528
7911
|
*/
|
|
7529
7912
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7530
7913
|
/**
|
|
7531
7914
|
* Disallow awaiting non-promise values.
|
|
7532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-await.md
|
|
7533
7916
|
*/
|
|
7534
7917
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7918
|
+
/**
|
|
7919
|
+
* Disallow unnecessary comparisons against boolean literals.
|
|
7920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7921
|
+
*/
|
|
7922
|
+
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7923
|
+
/**
|
|
7924
|
+
* Disallow unnecessary `globalThis` references.
|
|
7925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-global-this.md
|
|
7926
|
+
*/
|
|
7927
|
+
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
7928
|
+
/**
|
|
7929
|
+
* Disallow unnecessary nested ternary expressions.
|
|
7930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
7931
|
+
*/
|
|
7932
|
+
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7535
7933
|
/**
|
|
7536
7934
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7538
7936
|
*/
|
|
7539
7937
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7540
7938
|
/**
|
|
7541
7939
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7543
7941
|
*/
|
|
7544
7942
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7943
|
+
/**
|
|
7944
|
+
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
7945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unnecessary-splice.md
|
|
7946
|
+
*/
|
|
7947
|
+
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
7545
7948
|
/**
|
|
7546
7949
|
* Disallow unreadable array destructuring.
|
|
7547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7951
|
+
*/
|
|
7952
|
+
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7953
|
+
/**
|
|
7954
|
+
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7548
7956
|
*/
|
|
7549
|
-
'unicorn/no-unreadable-
|
|
7957
|
+
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
7550
7958
|
/**
|
|
7551
7959
|
* Disallow unreadable IIFEs.
|
|
7552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-iife.md
|
|
7553
7961
|
*/
|
|
7554
7962
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7963
|
+
/**
|
|
7964
|
+
* Disallow unreadable `new` expressions.
|
|
7965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-new-expression.md
|
|
7966
|
+
*/
|
|
7967
|
+
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
7968
|
+
/**
|
|
7969
|
+
* Disallow unreadable object destructuring.
|
|
7970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
7971
|
+
*/
|
|
7972
|
+
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7973
|
+
/**
|
|
7974
|
+
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
7975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
7976
|
+
*/
|
|
7977
|
+
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
7978
|
+
/**
|
|
7979
|
+
* Disallow unsafe DOM HTML APIs.
|
|
7980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-dom-html.md
|
|
7981
|
+
*/
|
|
7982
|
+
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
7983
|
+
/**
|
|
7984
|
+
* Disallow unsafe values as property keys.
|
|
7985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-property-key.md
|
|
7986
|
+
*/
|
|
7987
|
+
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
7988
|
+
/**
|
|
7989
|
+
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
7990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
7991
|
+
*/
|
|
7992
|
+
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
7993
|
+
/**
|
|
7994
|
+
* Disallow ignoring the return value of selected array methods.
|
|
7995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unused-array-method-return.md
|
|
7996
|
+
*/
|
|
7997
|
+
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
7555
7998
|
/**
|
|
7556
7999
|
* Disallow unused object properties.
|
|
7557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-unused-properties.md
|
|
7558
8001
|
*/
|
|
7559
8002
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8003
|
+
/**
|
|
8004
|
+
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-boolean-cast.md
|
|
8006
|
+
*/
|
|
8007
|
+
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8008
|
+
/**
|
|
8009
|
+
* Disallow useless type coercions of values that are already of the target type.
|
|
8010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-coercion.md
|
|
8011
|
+
*/
|
|
8012
|
+
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
7560
8013
|
/**
|
|
7561
8014
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-collection-argument.md
|
|
7563
8016
|
*/
|
|
7564
8017
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8018
|
+
/**
|
|
8019
|
+
* Disallow useless compound assignments such as `x += 0`.
|
|
8020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-compound-assignment.md
|
|
8021
|
+
*/
|
|
8022
|
+
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8023
|
+
/**
|
|
8024
|
+
* Disallow useless concatenation of literals.
|
|
8025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-concat.md
|
|
8026
|
+
*/
|
|
8027
|
+
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8028
|
+
/**
|
|
8029
|
+
* Disallow useless `continue` statements.
|
|
8030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-continue.md
|
|
8031
|
+
*/
|
|
8032
|
+
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8033
|
+
/**
|
|
8034
|
+
* Disallow unnecessary existence checks before deletion.
|
|
8035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-delete-check.md
|
|
8036
|
+
*/
|
|
8037
|
+
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8038
|
+
/**
|
|
8039
|
+
* Disallow `else` after a statement that exits.
|
|
8040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-else.md
|
|
8041
|
+
*/
|
|
8042
|
+
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7565
8043
|
/**
|
|
7566
8044
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7568
8046
|
*/
|
|
7569
8047
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7570
8048
|
/**
|
|
7571
8049
|
* Disallow useless fallback when spreading in object literals.
|
|
7572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7573
8051
|
*/
|
|
7574
8052
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7575
8053
|
/**
|
|
7576
8054
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7578
8056
|
*/
|
|
7579
8057
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7580
8058
|
/**
|
|
7581
8059
|
* Disallow useless array length check.
|
|
7582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-length-check.md
|
|
7583
8061
|
*/
|
|
7584
8062
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8063
|
+
/**
|
|
8064
|
+
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-logical-operand.md
|
|
8066
|
+
*/
|
|
8067
|
+
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8068
|
+
/**
|
|
8069
|
+
* Disallow useless overrides of class methods.
|
|
8070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-override.md
|
|
8071
|
+
*/
|
|
8072
|
+
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7585
8073
|
/**
|
|
7586
8074
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7588
8076
|
*/
|
|
7589
8077
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8078
|
+
/**
|
|
8079
|
+
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-recursion.md
|
|
8081
|
+
*/
|
|
8082
|
+
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7590
8083
|
/**
|
|
7591
8084
|
* Disallow unnecessary spread.
|
|
7592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-spread.md
|
|
7593
8086
|
*/
|
|
7594
8087
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7595
8088
|
/**
|
|
7596
8089
|
* Disallow useless case in switch statements.
|
|
7597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-switch-case.md
|
|
7598
8091
|
*/
|
|
7599
8092
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8093
|
+
/**
|
|
8094
|
+
* Disallow useless template literal expressions.
|
|
8095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-template-literals.md
|
|
8096
|
+
*/
|
|
8097
|
+
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7600
8098
|
/**
|
|
7601
8099
|
* Disallow useless `undefined`.
|
|
7602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-useless-undefined.md
|
|
7603
8101
|
*/
|
|
7604
8102
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8103
|
+
/**
|
|
8104
|
+
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
8106
|
+
*/
|
|
8107
|
+
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7605
8108
|
/**
|
|
7606
8109
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/no-zero-fractions.md
|
|
7608
8111
|
*/
|
|
7609
8112
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7610
8113
|
/**
|
|
7611
8114
|
* Enforce proper case for numeric literals.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/number-literal-case.md
|
|
7613
8116
|
*/
|
|
7614
8117
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7615
8118
|
/**
|
|
7616
8119
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/numeric-separators-style.md
|
|
7618
8121
|
*/
|
|
7619
8122
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8123
|
+
/**
|
|
8124
|
+
* Require assignment operator shorthand where possible.
|
|
8125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/operator-assignment.md
|
|
8126
|
+
*/
|
|
8127
|
+
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8128
|
+
/**
|
|
8129
|
+
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8131
|
+
*/
|
|
8132
|
+
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7620
8133
|
/**
|
|
7621
8134
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-add-event-listener.md
|
|
7623
8136
|
*/
|
|
7624
8137
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8138
|
+
/**
|
|
8139
|
+
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
8141
|
+
*/
|
|
8142
|
+
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8143
|
+
/**
|
|
8144
|
+
* Prefer `AggregateError` when throwing collected errors.
|
|
8145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-aggregate-error.md
|
|
8146
|
+
*/
|
|
8147
|
+
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7625
8148
|
/**
|
|
7626
8149
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-find.md
|
|
7628
8151
|
*/
|
|
7629
8152
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7630
8153
|
/**
|
|
7631
8154
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-flat.md
|
|
7633
8156
|
*/
|
|
7634
8157
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7635
8158
|
/**
|
|
7636
|
-
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8159
|
+
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-flat-map.md
|
|
7638
8161
|
*/
|
|
7639
8162
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8163
|
+
/**
|
|
8164
|
+
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-from-async.md
|
|
8166
|
+
*/
|
|
8167
|
+
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8168
|
+
/**
|
|
8169
|
+
* Prefer using the `Array.from()` mapping function argument.
|
|
8170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-from-map.md
|
|
8171
|
+
*/
|
|
8172
|
+
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7640
8173
|
/**
|
|
7641
8174
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-index-of.md
|
|
7643
8176
|
*/
|
|
7644
8177
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8178
|
+
/**
|
|
8179
|
+
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
8181
|
+
*/
|
|
8182
|
+
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8183
|
+
/**
|
|
8184
|
+
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-last-methods.md
|
|
8186
|
+
*/
|
|
8187
|
+
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8188
|
+
/**
|
|
8189
|
+
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-slice.md
|
|
8191
|
+
*/
|
|
8192
|
+
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7645
8193
|
/**
|
|
7646
8194
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-array-some.md
|
|
7648
8196
|
*/
|
|
7649
8197
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7650
8198
|
/**
|
|
7651
8199
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-at.md
|
|
7653
8201
|
*/
|
|
7654
8202
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8203
|
+
/**
|
|
8204
|
+
* Prefer `await` over promise chaining.
|
|
8205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-await.md
|
|
8206
|
+
*/
|
|
8207
|
+
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7655
8208
|
/**
|
|
7656
8209
|
* Prefer `BigInt` literals over the constructor.
|
|
7657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-bigint-literals.md
|
|
7658
8211
|
*/
|
|
7659
8212
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7660
8213
|
/**
|
|
7661
8214
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7663
8216
|
*/
|
|
7664
8217
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8218
|
+
/**
|
|
8219
|
+
* Prefer directly returning boolean expressions over `if` statements.
|
|
8220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-boolean-return.md
|
|
8221
|
+
*/
|
|
8222
|
+
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7665
8223
|
/**
|
|
7666
8224
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-class-fields.md
|
|
7668
8226
|
*/
|
|
7669
8227
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7670
8228
|
/**
|
|
7671
8229
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7673
8231
|
*/
|
|
7674
8232
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7675
8233
|
/**
|
|
7676
8234
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-code-point.md
|
|
7678
8236
|
*/
|
|
7679
8237
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8238
|
+
/**
|
|
8239
|
+
* Prefer early continues over whole-loop conditional wrapping.
|
|
8240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-continue.md
|
|
8241
|
+
*/
|
|
8242
|
+
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7680
8243
|
/**
|
|
7681
8244
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-date-now.md
|
|
7683
8246
|
*/
|
|
7684
8247
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7685
8248
|
/**
|
|
7686
8249
|
* Prefer default parameters over reassignment.
|
|
7687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-default-parameters.md
|
|
7688
8251
|
*/
|
|
7689
8252
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7690
8253
|
/**
|
|
7691
|
-
* Prefer
|
|
7692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8254
|
+
* Prefer direct iteration over default iterator method calls.
|
|
8255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-direct-iteration.md
|
|
8256
|
+
*/
|
|
8257
|
+
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8258
|
+
/**
|
|
8259
|
+
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dispose.md
|
|
8261
|
+
*/
|
|
8262
|
+
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8263
|
+
/**
|
|
8264
|
+
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-append.md
|
|
7693
8266
|
*/
|
|
7694
8267
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7695
8268
|
/**
|
|
7696
|
-
*
|
|
7697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8269
|
+
* Renamed to `unicorn/dom-node-dataset`.
|
|
8270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8271
|
+
* @deprecated
|
|
7698
8272
|
*/
|
|
7699
8273
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8274
|
+
/**
|
|
8275
|
+
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8277
|
+
*/
|
|
8278
|
+
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
7700
8279
|
/**
|
|
7701
8280
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7703
8282
|
*/
|
|
7704
8283
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8284
|
+
/**
|
|
8285
|
+
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8287
|
+
*/
|
|
8288
|
+
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7705
8289
|
/**
|
|
7706
8290
|
* Prefer `.textContent` over `.innerText`.
|
|
7707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7708
8292
|
*/
|
|
7709
8293
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8294
|
+
/**
|
|
8295
|
+
* Prefer early returns over full-function conditional wrapping.
|
|
8296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-early-return.md
|
|
8297
|
+
*/
|
|
8298
|
+
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8299
|
+
/**
|
|
8300
|
+
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-else-if.md
|
|
8302
|
+
*/
|
|
8303
|
+
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8304
|
+
/**
|
|
8305
|
+
* Prefer `Error.isError()` when checking for errors.
|
|
8306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-error-is-error.md
|
|
8307
|
+
*/
|
|
8308
|
+
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7710
8309
|
/**
|
|
7711
8310
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-event-target.md
|
|
7713
8312
|
*/
|
|
7714
8313
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7715
8314
|
/**
|
|
7716
8315
|
* Prefer `export…from` when re-exporting.
|
|
7717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-export-from.md
|
|
7718
8317
|
*/
|
|
7719
8318
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8319
|
+
/**
|
|
8320
|
+
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
8322
|
+
*/
|
|
8323
|
+
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8324
|
+
/**
|
|
8325
|
+
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8327
|
+
*/
|
|
8328
|
+
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8329
|
+
/**
|
|
8330
|
+
* Prefer global numeric constants over `Number` static properties.
|
|
8331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-global-number-constants.md
|
|
8332
|
+
*/
|
|
8333
|
+
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7720
8334
|
/**
|
|
7721
8335
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-global-this.md
|
|
7723
8337
|
*/
|
|
7724
8338
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8339
|
+
/**
|
|
8340
|
+
* Prefer `.has()` when checking existence.
|
|
8341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-has-check.md
|
|
8342
|
+
*/
|
|
8343
|
+
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8344
|
+
/**
|
|
8345
|
+
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8347
|
+
*/
|
|
8348
|
+
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8349
|
+
/**
|
|
8350
|
+
* Prefer HTTPS over HTTP.
|
|
8351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-https.md
|
|
8352
|
+
*/
|
|
8353
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
8354
|
+
/**
|
|
8355
|
+
* Prefer identifiers over string literals in import and export specifiers.
|
|
8356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8357
|
+
*/
|
|
8358
|
+
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7725
8359
|
/**
|
|
7726
8360
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7728
8362
|
*/
|
|
7729
8363
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7730
8364
|
/**
|
|
7731
8365
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-includes.md
|
|
7733
8367
|
*/
|
|
7734
8368
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7735
8369
|
/**
|
|
7736
|
-
* Prefer
|
|
7737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8370
|
+
* Prefer `.includes()` over repeated equality comparisons.
|
|
8371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8372
|
+
*/
|
|
8373
|
+
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8374
|
+
/**
|
|
8375
|
+
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8377
|
+
*/
|
|
8378
|
+
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8379
|
+
/**
|
|
8380
|
+
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-concat.md
|
|
8382
|
+
*/
|
|
8383
|
+
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8384
|
+
/**
|
|
8385
|
+
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-to-array.md
|
|
8387
|
+
*/
|
|
8388
|
+
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8389
|
+
/**
|
|
8390
|
+
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8392
|
+
*/
|
|
8393
|
+
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8394
|
+
/**
|
|
8395
|
+
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8397
|
+
* @deprecated
|
|
7738
8398
|
*/
|
|
7739
8399
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7740
8400
|
/**
|
|
7741
|
-
* Prefer `KeyboardEvent#key` over
|
|
7742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8401
|
+
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7743
8403
|
*/
|
|
7744
8404
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8405
|
+
/**
|
|
8406
|
+
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-location-assign.md
|
|
8408
|
+
*/
|
|
8409
|
+
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7745
8410
|
/**
|
|
7746
8411
|
* Prefer using a logical operator over a ternary.
|
|
7747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7748
8413
|
*/
|
|
7749
8414
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8415
|
+
/**
|
|
8416
|
+
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-map-from-entries.md
|
|
8418
|
+
*/
|
|
8419
|
+
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8420
|
+
/**
|
|
8421
|
+
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8422
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-abs.md
|
|
8423
|
+
*/
|
|
8424
|
+
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8425
|
+
/**
|
|
8426
|
+
* Prefer `Math` constants over their approximate numeric values.
|
|
8427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-constants.md
|
|
8428
|
+
*/
|
|
8429
|
+
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7750
8430
|
/**
|
|
7751
8431
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-min-max.md
|
|
7753
8433
|
*/
|
|
7754
8434
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7755
8435
|
/**
|
|
7756
|
-
*
|
|
7757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8436
|
+
* Prefer `Math.trunc()` for truncating numbers.
|
|
8437
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-math-trunc.md
|
|
7758
8438
|
*/
|
|
7759
8439
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7760
8440
|
/**
|
|
7761
|
-
* Prefer
|
|
7762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8441
|
+
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-minimal-ternary.md
|
|
8443
|
+
*/
|
|
8444
|
+
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8445
|
+
/**
|
|
8446
|
+
* Prefer modern DOM APIs.
|
|
8447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7763
8448
|
*/
|
|
7764
8449
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7765
8450
|
/**
|
|
7766
8451
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7768
8453
|
*/
|
|
7769
8454
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7770
8455
|
/**
|
|
7771
8456
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-module.md
|
|
7773
8458
|
*/
|
|
7774
8459
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7775
8460
|
/**
|
|
7776
8461
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7778
8463
|
*/
|
|
7779
8464
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7780
8465
|
/**
|
|
7781
8466
|
* Prefer negative index over `.length - index` when possible.
|
|
7782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-negative-index.md
|
|
7783
8468
|
*/
|
|
7784
8469
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7785
8470
|
/**
|
|
7786
8471
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-node-protocol.md
|
|
7788
8473
|
*/
|
|
7789
8474
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7790
8475
|
/**
|
|
7791
|
-
* Prefer `Number`
|
|
7792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8476
|
+
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-coercion.md
|
|
8478
|
+
*/
|
|
8479
|
+
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8480
|
+
/**
|
|
8481
|
+
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8483
|
+
*/
|
|
8484
|
+
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8485
|
+
/**
|
|
8486
|
+
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-number-properties.md
|
|
7793
8488
|
*/
|
|
7794
8489
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8490
|
+
/**
|
|
8491
|
+
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-define-properties.md
|
|
8493
|
+
*/
|
|
8494
|
+
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8495
|
+
/**
|
|
8496
|
+
* Prefer object destructuring defaults over default object literals with spread.
|
|
8497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8498
|
+
*/
|
|
8499
|
+
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7795
8500
|
/**
|
|
7796
8501
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-from-entries.md
|
|
7798
8503
|
*/
|
|
7799
8504
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8505
|
+
/**
|
|
8506
|
+
* Prefer the most specific `Object` iterable method.
|
|
8507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
8508
|
+
*/
|
|
8509
|
+
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8510
|
+
/**
|
|
8511
|
+
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-observer-apis.md
|
|
8513
|
+
*/
|
|
8514
|
+
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
7800
8515
|
/**
|
|
7801
8516
|
* Prefer omitting the `catch` binding parameter.
|
|
7802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7803
8518
|
*/
|
|
7804
8519
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8520
|
+
/**
|
|
8521
|
+
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-path2d.md
|
|
8523
|
+
*/
|
|
8524
|
+
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8525
|
+
/**
|
|
8526
|
+
* Prefer private class fields over the underscore-prefix convention.
|
|
8527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-private-class-fields.md
|
|
8528
|
+
*/
|
|
8529
|
+
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8530
|
+
/**
|
|
8531
|
+
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-promise-try.md
|
|
8533
|
+
*/
|
|
8534
|
+
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8535
|
+
/**
|
|
8536
|
+
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8538
|
+
*/
|
|
8539
|
+
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
7805
8540
|
/**
|
|
7806
8541
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-prototype-methods.md
|
|
7808
8543
|
*/
|
|
7809
8544
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7810
8545
|
/**
|
|
7811
|
-
* Prefer `.querySelector()`
|
|
7812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8546
|
+
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-query-selector.md
|
|
7813
8548
|
*/
|
|
7814
|
-
'unicorn/prefer-query-selector'?: Linter.RuleEntry<
|
|
8549
|
+
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8550
|
+
/**
|
|
8551
|
+
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-queue-microtask.md
|
|
8553
|
+
*/
|
|
8554
|
+
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7815
8555
|
/**
|
|
7816
8556
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-reflect-apply.md
|
|
7818
8558
|
*/
|
|
7819
8559
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7820
8560
|
/**
|
|
7821
|
-
* Prefer `RegExp
|
|
7822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8561
|
+
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-regexp-escape.md
|
|
8563
|
+
*/
|
|
8564
|
+
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8565
|
+
/**
|
|
8566
|
+
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-regexp-test.md
|
|
7823
8568
|
*/
|
|
7824
8569
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7825
8570
|
/**
|
|
7826
8571
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-response-static-json.md
|
|
7828
8573
|
*/
|
|
7829
8574
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8575
|
+
/**
|
|
8576
|
+
* Prefer `:scope` when using element query selector methods.
|
|
8577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-scoped-selector.md
|
|
8578
|
+
*/
|
|
8579
|
+
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7830
8580
|
/**
|
|
7831
8581
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-has.md
|
|
8583
|
+
*/
|
|
8584
|
+
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8585
|
+
/**
|
|
8586
|
+
* Prefer `Set` methods for Set operations.
|
|
8587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-methods.md
|
|
7833
8588
|
*/
|
|
7834
|
-
'unicorn/prefer-set-
|
|
8589
|
+
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
7835
8590
|
/**
|
|
7836
8591
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-set-size.md
|
|
7838
8593
|
*/
|
|
7839
8594
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8595
|
+
/**
|
|
8596
|
+
* Prefer arrow function properties over methods with a single return.
|
|
8597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-short-arrow-method.md
|
|
8598
|
+
*/
|
|
8599
|
+
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
7840
8600
|
/**
|
|
7841
8601
|
* Prefer simple conditions first in logical expressions.
|
|
7842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7843
8603
|
*/
|
|
7844
8604
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7845
8605
|
/**
|
|
7846
|
-
*
|
|
7847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8606
|
+
* Prefer a simple comparison function for `Array#sort()`.
|
|
8607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8608
|
+
*/
|
|
8609
|
+
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8610
|
+
/**
|
|
8611
|
+
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-array-predicate.md
|
|
8613
|
+
*/
|
|
8614
|
+
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8615
|
+
/**
|
|
8616
|
+
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-call.md
|
|
7848
8618
|
*/
|
|
7849
8619
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7850
8620
|
/**
|
|
7851
|
-
* Prefer
|
|
7852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8621
|
+
* Prefer a single object destructuring declaration per local const source.
|
|
8622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
8623
|
+
*/
|
|
8624
|
+
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8625
|
+
/**
|
|
8626
|
+
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-single-replace.md
|
|
8628
|
+
*/
|
|
8629
|
+
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8630
|
+
/**
|
|
8631
|
+
* Prefer declaring variables in the smallest possible scope.
|
|
8632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-smaller-scope.md
|
|
8633
|
+
*/
|
|
8634
|
+
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8635
|
+
/**
|
|
8636
|
+
* Prefer `String#split()` with a limit.
|
|
8637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-split-limit.md
|
|
8638
|
+
*/
|
|
8639
|
+
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8640
|
+
/**
|
|
8641
|
+
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-spread.md
|
|
7853
8643
|
*/
|
|
7854
8644
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8645
|
+
/**
|
|
8646
|
+
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-match-all.md
|
|
8648
|
+
*/
|
|
8649
|
+
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8650
|
+
/**
|
|
8651
|
+
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
8653
|
+
*/
|
|
8654
|
+
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7855
8655
|
/**
|
|
7856
8656
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-raw.md
|
|
7858
8658
|
*/
|
|
7859
8659
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7860
8660
|
/**
|
|
7861
|
-
* Prefer `String#
|
|
7862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8661
|
+
* Prefer `String#repeat()` for repeated whitespace.
|
|
8662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-repeat.md
|
|
8663
|
+
*/
|
|
8664
|
+
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8665
|
+
/**
|
|
8666
|
+
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-replace-all.md
|
|
7863
8668
|
*/
|
|
7864
8669
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7865
8670
|
/**
|
|
7866
8671
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-slice.md
|
|
7868
8673
|
*/
|
|
7869
8674
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7870
8675
|
/**
|
|
7871
|
-
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8676
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
8677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7873
8678
|
*/
|
|
7874
8679
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7875
8680
|
/**
|
|
7876
8681
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7878
8683
|
*/
|
|
7879
8684
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7880
8685
|
/**
|
|
7881
8686
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-structured-clone.md
|
|
7883
8688
|
*/
|
|
7884
8689
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7885
8690
|
/**
|
|
7886
8691
|
* Prefer `switch` over multiple `else-if`.
|
|
7887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-switch.md
|
|
7888
8693
|
*/
|
|
7889
8694
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7890
8695
|
/**
|
|
7891
|
-
* Prefer
|
|
7892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8696
|
+
* Prefer `Temporal` over `Date`.
|
|
8697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-temporal.md
|
|
8698
|
+
*/
|
|
8699
|
+
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8700
|
+
/**
|
|
8701
|
+
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-ternary.md
|
|
7893
8703
|
*/
|
|
7894
8704
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8705
|
+
/**
|
|
8706
|
+
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-toggle-attribute.md
|
|
8708
|
+
*/
|
|
8709
|
+
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
7895
8710
|
/**
|
|
7896
8711
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-top-level-await.md
|
|
7898
8713
|
*/
|
|
7899
8714
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7900
8715
|
/**
|
|
7901
8716
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-type-error.md
|
|
7903
8718
|
*/
|
|
7904
8719
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7905
8720
|
/**
|
|
7906
|
-
*
|
|
7907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8721
|
+
* Require type literals to be last in union types.
|
|
8722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-type-literal-last.md
|
|
8723
|
+
*/
|
|
8724
|
+
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8725
|
+
/**
|
|
8726
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-uint8array-base64.md
|
|
8728
|
+
*/
|
|
8729
|
+
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8730
|
+
/**
|
|
8731
|
+
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-unary-minus.md
|
|
8733
|
+
*/
|
|
8734
|
+
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8735
|
+
/**
|
|
8736
|
+
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8738
|
+
*/
|
|
8739
|
+
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8740
|
+
/**
|
|
8741
|
+
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-can-parse.md
|
|
8743
|
+
*/
|
|
8744
|
+
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8745
|
+
/**
|
|
8746
|
+
* Prefer `URL#href` over stringifying a `URL`.
|
|
8747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-href.md
|
|
8748
|
+
*/
|
|
8749
|
+
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8750
|
+
/**
|
|
8751
|
+
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-url-search-parameters.md
|
|
8753
|
+
*/
|
|
8754
|
+
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8755
|
+
/**
|
|
8756
|
+
* Prefer putting the condition in the while statement.
|
|
8757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/prefer-while-loop-condition.md
|
|
8758
|
+
*/
|
|
8759
|
+
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8760
|
+
/**
|
|
8761
|
+
* Renamed to `unicorn/name-replacements`.
|
|
8762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8763
|
+
* @deprecated
|
|
7908
8764
|
*/
|
|
7909
|
-
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<
|
|
8765
|
+
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
7910
8766
|
/**
|
|
7911
8767
|
* Enforce consistent relative URL style.
|
|
7912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/relative-url-style.md
|
|
7913
8769
|
*/
|
|
7914
8770
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7915
8771
|
/**
|
|
7916
8772
|
* Enforce using the separator argument with `Array#join()`.
|
|
7917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-array-join-separator.md
|
|
7918
8774
|
*/
|
|
7919
8775
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8776
|
+
/**
|
|
8777
|
+
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-array-sort-compare.md
|
|
8779
|
+
*/
|
|
8780
|
+
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8781
|
+
/**
|
|
8782
|
+
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-css-escape.md
|
|
8784
|
+
*/
|
|
8785
|
+
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7920
8786
|
/**
|
|
7921
8787
|
* Require non-empty module attributes for imports and exports
|
|
7922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-module-attributes.md
|
|
7923
8789
|
*/
|
|
7924
8790
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7925
8791
|
/**
|
|
7926
8792
|
* Require non-empty specifier list in import and export statements.
|
|
7927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-module-specifiers.md
|
|
7928
8794
|
*/
|
|
7929
8795
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7930
8796
|
/**
|
|
7931
8797
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7933
8799
|
*/
|
|
7934
8800
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8801
|
+
/**
|
|
8802
|
+
* Require passive event listeners for high-frequency events.
|
|
8803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-passive-events.md
|
|
8804
|
+
*/
|
|
8805
|
+
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7935
8806
|
/**
|
|
7936
8807
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-post-message-target-origin.md
|
|
7938
8809
|
*/
|
|
7939
8810
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8811
|
+
/**
|
|
8812
|
+
* Require boolean-returning Proxy traps to return booleans.
|
|
8813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8814
|
+
*/
|
|
8815
|
+
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7940
8816
|
/**
|
|
7941
8817
|
* Enforce better string content.
|
|
7942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/string-content.md
|
|
7943
8819
|
*/
|
|
7944
8820
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7945
8821
|
/**
|
|
7946
8822
|
* Enforce consistent brace style for `case` clauses.
|
|
7947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/switch-case-braces.md
|
|
7948
8824
|
*/
|
|
7949
8825
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7950
8826
|
/**
|
|
7951
8827
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/switch-case-break-position.md
|
|
7953
8829
|
*/
|
|
7954
8830
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7955
8831
|
/**
|
|
7956
8832
|
* Fix whitespace-insensitive template indentation.
|
|
7957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/template-indent.md
|
|
7958
8834
|
*/
|
|
7959
8835
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7960
8836
|
/**
|
|
7961
8837
|
* Enforce consistent case for text encoding identifiers.
|
|
7962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7963
8839
|
*/
|
|
7964
8840
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7965
8841
|
/**
|
|
7966
8842
|
* Require `new` when creating an error.
|
|
7967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/throw-new-error.md
|
|
7968
8844
|
*/
|
|
7969
8845
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8846
|
+
/**
|
|
8847
|
+
* Limit the complexity of `try` blocks.
|
|
8848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v69.0.0/docs/rules/try-complexity.md
|
|
8849
|
+
*/
|
|
8850
|
+
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7970
8851
|
/**
|
|
7971
8852
|
* Require calls to `isNaN()` when checking for `NaN`
|
|
7972
8853
|
* @see https://eslint.org/docs/latest/rules/use-isnan
|
|
@@ -8511,6 +9392,11 @@ interface RuleOptions {
|
|
|
8511
9392
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
|
|
8512
9393
|
*/
|
|
8513
9394
|
'yml/no-tab-indent'?: Linter.RuleEntry<[]>;
|
|
9395
|
+
/**
|
|
9396
|
+
* disallow trailing whitespace at the end of lines
|
|
9397
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-spaces.html
|
|
9398
|
+
*/
|
|
9399
|
+
'yml/no-trailing-spaces'?: Linter.RuleEntry<YmlNoTrailingSpaces>;
|
|
8514
9400
|
/**
|
|
8515
9401
|
* disallow trailing zeros for floats
|
|
8516
9402
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
|
|
@@ -8591,6 +9477,11 @@ interface RuleOptions {
|
|
|
8591
9477
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-any-schema.md
|
|
8592
9478
|
*/
|
|
8593
9479
|
'zod/no-any-schema'?: Linter.RuleEntry<[]>;
|
|
9480
|
+
/**
|
|
9481
|
+
* Disallow `z.coerce.boolean()` because it treats any non-empty string as `true`.
|
|
9482
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-coerce-boolean.md
|
|
9483
|
+
*/
|
|
9484
|
+
'zod/no-coerce-boolean'?: Linter.RuleEntry<[]>;
|
|
8594
9485
|
/**
|
|
8595
9486
|
* Disallow calling the same schema method more than once in a single chain
|
|
8596
9487
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-duplicate-schema-methods.md
|
|
@@ -10917,6 +11808,9 @@ type NoConfusingArrow = [] | [{
|
|
|
10917
11808
|
}]; // ----- no-console -----
|
|
10918
11809
|
type NoConsole = [] | [{
|
|
10919
11810
|
allow?: [string, ...(string)[]];
|
|
11811
|
+
}]; // ----- no-constant-binary-expression -----
|
|
11812
|
+
type NoConstantBinaryExpression = [] | [{
|
|
11813
|
+
checkRelationalComparisons?: boolean;
|
|
10920
11814
|
}]; // ----- no-constant-condition -----
|
|
10921
11815
|
type NoConstantCondition = [] | [{
|
|
10922
11816
|
checkLoops?: ("all" | "allExceptWhileTrue" | "none" | true | false);
|
|
@@ -14201,43 +15095,110 @@ type TurboNoUndeclaredEnvVars = [] | [{
|
|
|
14201
15095
|
cwd?: string;
|
|
14202
15096
|
allowList?: string[];
|
|
14203
15097
|
}]; // ----- unicode-bom -----
|
|
14204
|
-
type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/
|
|
14205
|
-
type UnicornBetterRegex = [] | [{
|
|
14206
|
-
sortCharacterClasses?: boolean;
|
|
14207
|
-
}]; // ----- unicorn/catch-error-name -----
|
|
15098
|
+
type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/catch-error-name -----
|
|
14208
15099
|
type UnicornCatchErrorName = [] | [{
|
|
14209
15100
|
name?: string;
|
|
14210
15101
|
ignore?: unknown[];
|
|
14211
|
-
}]; // ----- unicorn/
|
|
15102
|
+
}]; // ----- unicorn/class-reference-in-static-methods -----
|
|
15103
|
+
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
15104
|
+
preferThis?: boolean;
|
|
15105
|
+
preferSuper?: boolean;
|
|
15106
|
+
}]; // ----- unicorn/comment-content -----
|
|
15107
|
+
type UnicornCommentContent = [] | [{
|
|
15108
|
+
checkUniformCase?: boolean;
|
|
15109
|
+
extendDefaultReplacements?: boolean;
|
|
15110
|
+
replacements?: {
|
|
15111
|
+
[k: string]: (false | string | {
|
|
15112
|
+
replacement: string;
|
|
15113
|
+
caseSensitive?: boolean;
|
|
15114
|
+
}) | undefined;
|
|
15115
|
+
};
|
|
15116
|
+
}]; // ----- unicorn/consistent-boolean-name -----
|
|
15117
|
+
type UnicornConsistentBooleanName = [] | [{
|
|
15118
|
+
checkProperties?: boolean;
|
|
15119
|
+
prefixes?: {
|
|
15120
|
+
[k: string]: boolean | undefined;
|
|
15121
|
+
};
|
|
15122
|
+
ignore?: unknown[];
|
|
15123
|
+
}]; // ----- unicorn/consistent-class-member-order -----
|
|
15124
|
+
type UnicornConsistentClassMemberOrder = [] | [{
|
|
15125
|
+
order?: [("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method"), ("static-field" | "static-block" | "static-method" | "private-field" | "public-field" | "constructor" | "private-method" | "public-method")];
|
|
15126
|
+
}]; // ----- unicorn/consistent-compound-words -----
|
|
15127
|
+
type UnicornConsistentCompoundWords = [] | [{
|
|
15128
|
+
checkProperties?: boolean;
|
|
15129
|
+
checkVariables?: boolean;
|
|
15130
|
+
checkDefaultAndNamespaceImports?: (boolean | "internal");
|
|
15131
|
+
checkShorthandImports?: (boolean | "internal");
|
|
15132
|
+
checkShorthandProperties?: boolean;
|
|
15133
|
+
extendDefaultReplacements?: boolean;
|
|
15134
|
+
replacements?: _UnicornConsistentCompoundWords_Replacements;
|
|
15135
|
+
allowList?: _UnicornConsistentCompoundWords_TrueObject;
|
|
15136
|
+
}];
|
|
15137
|
+
interface _UnicornConsistentCompoundWords_Replacements {
|
|
15138
|
+
[k: string]: (false | string) | undefined;
|
|
15139
|
+
}
|
|
15140
|
+
interface _UnicornConsistentCompoundWords_TrueObject {
|
|
15141
|
+
[k: string]: true | undefined;
|
|
15142
|
+
} // ----- unicorn/consistent-conditional-object-spread -----
|
|
15143
|
+
type UnicornConsistentConditionalObjectSpread = [] | [("logical" | "ternary")]; // ----- unicorn/consistent-export-decorator-position -----
|
|
15144
|
+
type UnicornConsistentExportDecoratorPosition = [] | [("above" | "before" | "after")]; // ----- unicorn/consistent-function-scoping -----
|
|
14212
15145
|
type UnicornConsistentFunctionScoping = [] | [{
|
|
14213
15146
|
checkArrowFunctions?: boolean;
|
|
15147
|
+
}]; // ----- unicorn/consistent-function-style -----
|
|
15148
|
+
type UnicornConsistentFunctionStyle = [] | [{
|
|
15149
|
+
default?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
15150
|
+
namedFunctions?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
15151
|
+
namedExports?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
|
|
15152
|
+
callbacks?: ("function-expression" | "arrow-function" | "ignore");
|
|
15153
|
+
objectProperties?: ("method" | "function-expression" | "arrow-function" | "ignore");
|
|
15154
|
+
reassignedVariables?: ("function-expression" | "arrow-function" | "ignore");
|
|
15155
|
+
typedVariables?: ("function-expression" | "arrow-function" | "ignore");
|
|
15156
|
+
}]; // ----- unicorn/consistent-json-file-read -----
|
|
15157
|
+
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/default-export-style -----
|
|
15158
|
+
type UnicornDefaultExportStyle = [] | [{
|
|
15159
|
+
functions?: ("inline" | "separate" | "ignore");
|
|
15160
|
+
classes?: ("inline" | "separate" | "ignore");
|
|
15161
|
+
}]; // ----- unicorn/dom-node-dataset -----
|
|
15162
|
+
type UnicornDomNodeDataset = [] | [{
|
|
15163
|
+
preferAttributes?: boolean;
|
|
14214
15164
|
}]; // ----- unicorn/escape-case -----
|
|
14215
15165
|
type UnicornEscapeCase = [] | [("uppercase" | "lowercase")]; // ----- unicorn/expiring-todo-comments -----
|
|
14216
15166
|
type UnicornExpiringTodoComments = [] | [{
|
|
14217
15167
|
terms?: string[];
|
|
14218
15168
|
ignore?: unknown[];
|
|
14219
|
-
|
|
14220
|
-
|
|
15169
|
+
checkDates?: boolean;
|
|
15170
|
+
checkDatesOnPullRequests?: boolean;
|
|
14221
15171
|
allowWarningComments?: boolean;
|
|
14222
15172
|
date?: string;
|
|
14223
15173
|
}]; // ----- unicorn/explicit-length-check -----
|
|
14224
15174
|
type UnicornExplicitLengthCheck = [] | [{
|
|
14225
15175
|
"non-zero"?: ("greater-than" | "not-equal");
|
|
14226
|
-
}]; // ----- unicorn/
|
|
15176
|
+
}]; // ----- unicorn/explicit-timer-delay -----
|
|
15177
|
+
type UnicornExplicitTimerDelay = [] | [("always" | "never")]; // ----- unicorn/filename-case -----
|
|
14227
15178
|
type UnicornFilenameCase = [] | [({
|
|
14228
|
-
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
15179
|
+
case?: ("camelCase" | "camelCaseWithAcronyms" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
14229
15180
|
ignore?: unknown[];
|
|
14230
15181
|
multipleFileExtensions?: boolean;
|
|
15182
|
+
checkDirectories?: boolean;
|
|
14231
15183
|
} | {
|
|
14232
15184
|
cases?: {
|
|
14233
15185
|
camelCase?: boolean;
|
|
15186
|
+
camelCaseWithAcronyms?: boolean;
|
|
14234
15187
|
snakeCase?: boolean;
|
|
14235
15188
|
kebabCase?: boolean;
|
|
14236
15189
|
pascalCase?: boolean;
|
|
14237
15190
|
};
|
|
14238
15191
|
ignore?: unknown[];
|
|
14239
15192
|
multipleFileExtensions?: boolean;
|
|
14240
|
-
|
|
15193
|
+
checkDirectories?: boolean;
|
|
15194
|
+
})]; // ----- unicorn/id-match -----
|
|
15195
|
+
type UnicornIdMatch = [] | [string] | [string, {
|
|
15196
|
+
properties?: boolean;
|
|
15197
|
+
classFields?: boolean;
|
|
15198
|
+
onlyDeclarations?: boolean;
|
|
15199
|
+
ignoreDestructuring?: boolean;
|
|
15200
|
+
checkNamedSpecifiers?: boolean;
|
|
15201
|
+
}]; // ----- unicorn/import-style -----
|
|
14241
15202
|
type UnicornImportStyle = [] | [{
|
|
14242
15203
|
checkImport?: boolean;
|
|
14243
15204
|
checkDynamicImport?: boolean;
|
|
@@ -14260,6 +15221,38 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
14260
15221
|
functions?: string[];
|
|
14261
15222
|
selectors?: string[];
|
|
14262
15223
|
comments?: string[];
|
|
15224
|
+
}]; // ----- unicorn/logical-assignment-operators -----
|
|
15225
|
+
type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
15226
|
+
enforceForIfStatements?: boolean;
|
|
15227
|
+
}] | ["never"]) & unknown[]); // ----- unicorn/max-nested-calls -----
|
|
15228
|
+
type UnicornMaxNestedCalls = [] | [{
|
|
15229
|
+
max?: number;
|
|
15230
|
+
}]; // ----- unicorn/name-replacements -----
|
|
15231
|
+
type UnicornNameReplacements = [] | [{
|
|
15232
|
+
checkProperties?: boolean;
|
|
15233
|
+
checkVariables?: boolean;
|
|
15234
|
+
checkDefaultAndNamespaceImports?: (boolean | string);
|
|
15235
|
+
checkShorthandImports?: (boolean | string);
|
|
15236
|
+
checkShorthandProperties?: boolean;
|
|
15237
|
+
checkFilenames?: boolean;
|
|
15238
|
+
extendDefaultReplacements?: boolean;
|
|
15239
|
+
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
15240
|
+
extendDefaultAllowList?: boolean;
|
|
15241
|
+
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
15242
|
+
ignore?: unknown[];
|
|
15243
|
+
}];
|
|
15244
|
+
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
15245
|
+
interface _UnicornNameReplacements_NameReplacements {
|
|
15246
|
+
[k: string]: _UnicornNameReplacementsReplacements | undefined;
|
|
15247
|
+
}
|
|
15248
|
+
interface _UnicornNameReplacements_BooleanObject {
|
|
15249
|
+
[k: string]: boolean | undefined;
|
|
15250
|
+
}
|
|
15251
|
+
interface _UnicornNameReplacements_BooleanObject {
|
|
15252
|
+
[k: string]: boolean | undefined;
|
|
15253
|
+
} // ----- unicorn/no-array-callback-reference -----
|
|
15254
|
+
type UnicornNoArrayCallbackReference = [] | [{
|
|
15255
|
+
ignore?: string[];
|
|
14263
15256
|
}]; // ----- unicorn/no-array-reduce -----
|
|
14264
15257
|
type UnicornNoArrayReduce = [] | [{
|
|
14265
15258
|
allowSimpleOperations?: boolean;
|
|
@@ -14269,28 +15262,47 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
14269
15262
|
}]; // ----- unicorn/no-array-sort -----
|
|
14270
15263
|
type UnicornNoArraySort = [] | [{
|
|
14271
15264
|
allowExpressionStatement?: boolean;
|
|
15265
|
+
}]; // ----- unicorn/no-empty-file -----
|
|
15266
|
+
type UnicornNoEmptyFile = [] | [{
|
|
15267
|
+
allowComments?: boolean;
|
|
14272
15268
|
}]; // ----- unicorn/no-instanceof-builtins -----
|
|
14273
15269
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
14274
15270
|
useErrorIsError?: boolean;
|
|
14275
15271
|
strategy?: ("loose" | "strict");
|
|
14276
15272
|
include?: string[];
|
|
14277
15273
|
exclude?: string[];
|
|
15274
|
+
}]; // ----- unicorn/no-invalid-argument-count -----
|
|
15275
|
+
type UnicornNoInvalidArgumentCount = [] | [{
|
|
15276
|
+
[k: string]: (number | [number, ...(number)[]] | {
|
|
15277
|
+
min?: number;
|
|
15278
|
+
max?: number;
|
|
15279
|
+
}) | undefined;
|
|
14278
15280
|
}]; // ----- unicorn/no-keyword-prefix -----
|
|
14279
15281
|
type UnicornNoKeywordPrefix = [] | [{
|
|
14280
15282
|
disallowedPrefixes?: [] | [string];
|
|
14281
15283
|
checkProperties?: boolean;
|
|
14282
15284
|
onlyCamelCase?: boolean;
|
|
15285
|
+
}]; // ----- unicorn/no-negated-comparison -----
|
|
15286
|
+
type UnicornNoNegatedComparison = [] | [{
|
|
15287
|
+
checkLogicalExpressions?: boolean;
|
|
15288
|
+
}]; // ----- unicorn/no-non-function-verb-prefix -----
|
|
15289
|
+
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
15290
|
+
verbs?: string[];
|
|
14283
15291
|
}]; // ----- unicorn/no-null -----
|
|
14284
15292
|
type UnicornNoNull = [] | [{
|
|
15293
|
+
checkArguments?: boolean;
|
|
14285
15294
|
checkStrictEquality?: boolean;
|
|
14286
15295
|
}]; // ----- unicorn/no-typeof-undefined -----
|
|
14287
15296
|
type UnicornNoTypeofUndefined = [] | [{
|
|
14288
15297
|
checkGlobalVariables?: boolean;
|
|
14289
15298
|
}]; // ----- unicorn/no-unnecessary-polyfills -----
|
|
14290
15299
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
14291
|
-
targets
|
|
15300
|
+
targets?: (string | unknown[] | {
|
|
14292
15301
|
[k: string]: unknown | undefined;
|
|
14293
15302
|
});
|
|
15303
|
+
}]; // ----- unicorn/no-unreadable-array-destructuring -----
|
|
15304
|
+
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
15305
|
+
maximumIgnoredElements?: number;
|
|
14294
15306
|
}]; // ----- unicorn/no-useless-undefined -----
|
|
14295
15307
|
type UnicornNoUselessUndefined = [] | [{
|
|
14296
15308
|
checkArguments?: boolean;
|
|
@@ -14319,9 +15331,11 @@ type UnicornNumericSeparatorsStyle = [] | [{
|
|
|
14319
15331
|
onlyIfContainsSeparator?: boolean;
|
|
14320
15332
|
minimumDigits?: number;
|
|
14321
15333
|
groupLength?: number;
|
|
15334
|
+
fractionGroupLength?: number;
|
|
14322
15335
|
};
|
|
14323
15336
|
onlyIfContainsSeparator?: boolean;
|
|
14324
|
-
}]; // ----- unicorn/
|
|
15337
|
+
}]; // ----- unicorn/operator-assignment -----
|
|
15338
|
+
type UnicornOperatorAssignment = [] | [("always" | "never")]; // ----- unicorn/prefer-add-event-listener -----
|
|
14325
15339
|
type UnicornPreferAddEventListener = [] | [{
|
|
14326
15340
|
excludedPackages?: string[];
|
|
14327
15341
|
}]; // ----- unicorn/prefer-array-find -----
|
|
@@ -14334,9 +15348,22 @@ type UnicornPreferArrayFlat = [] | [{
|
|
|
14334
15348
|
type UnicornPreferAt = [] | [{
|
|
14335
15349
|
getLastElementFunctions?: unknown[];
|
|
14336
15350
|
checkAllIndexAccess?: boolean;
|
|
15351
|
+
}]; // ----- unicorn/prefer-continue -----
|
|
15352
|
+
type UnicornPreferContinue = [] | [{
|
|
15353
|
+
maximumStatements?: number;
|
|
15354
|
+
}]; // ----- unicorn/prefer-early-return -----
|
|
15355
|
+
type UnicornPreferEarlyReturn = [] | [{
|
|
15356
|
+
maximumStatements?: number;
|
|
14337
15357
|
}]; // ----- unicorn/prefer-export-from -----
|
|
14338
15358
|
type UnicornPreferExportFrom = [] | [{
|
|
14339
|
-
|
|
15359
|
+
checkUsedVariables?: boolean;
|
|
15360
|
+
}]; // ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
15361
|
+
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
15362
|
+
minimumComparisons?: number;
|
|
15363
|
+
}]; // ----- unicorn/prefer-minimal-ternary -----
|
|
15364
|
+
type UnicornPreferMinimalTernary = [] | [{
|
|
15365
|
+
checkVaryingCallee?: boolean;
|
|
15366
|
+
checkComputedMemberAccess?: boolean;
|
|
14340
15367
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
14341
15368
|
type UnicornPreferNumberProperties = [] | [{
|
|
14342
15369
|
checkInfinity?: boolean;
|
|
@@ -14344,9 +15371,22 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
14344
15371
|
}]; // ----- unicorn/prefer-object-from-entries -----
|
|
14345
15372
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
14346
15373
|
functions?: unknown[];
|
|
15374
|
+
}]; // ----- unicorn/prefer-query-selector -----
|
|
15375
|
+
type UnicornPreferQuerySelector = [] | [{
|
|
15376
|
+
allowWithVariables?: boolean;
|
|
15377
|
+
}]; // ----- unicorn/prefer-queue-microtask -----
|
|
15378
|
+
type UnicornPreferQueueMicrotask = [] | [{
|
|
15379
|
+
checkSetImmediate?: boolean;
|
|
15380
|
+
checkSetTimeout?: boolean;
|
|
15381
|
+
}]; // ----- unicorn/prefer-set-has -----
|
|
15382
|
+
type UnicornPreferSetHas = [] | [{
|
|
15383
|
+
minimumItems?: number;
|
|
14347
15384
|
}]; // ----- unicorn/prefer-single-call -----
|
|
14348
15385
|
type UnicornPreferSingleCall = [] | [{
|
|
14349
15386
|
ignore?: unknown[];
|
|
15387
|
+
}]; // ----- unicorn/prefer-string-repeat -----
|
|
15388
|
+
type UnicornPreferStringRepeat = [] | [{
|
|
15389
|
+
minimumRepetitions?: number;
|
|
14350
15390
|
}]; // ----- unicorn/prefer-structured-clone -----
|
|
14351
15391
|
type UnicornPreferStructuredClone = [] | [{
|
|
14352
15392
|
functions?: unknown[];
|
|
@@ -14354,42 +15394,29 @@ type UnicornPreferStructuredClone = [] | [{
|
|
|
14354
15394
|
type UnicornPreferSwitch = [] | [{
|
|
14355
15395
|
minimumCases?: number;
|
|
14356
15396
|
emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case");
|
|
15397
|
+
}]; // ----- unicorn/prefer-temporal -----
|
|
15398
|
+
type UnicornPreferTemporal = [] | [{
|
|
15399
|
+
checkDateNow?: boolean;
|
|
15400
|
+
checkReferences?: boolean;
|
|
15401
|
+
checkMethods?: boolean;
|
|
14357
15402
|
}]; // ----- unicorn/prefer-ternary -----
|
|
14358
|
-
type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/
|
|
14359
|
-
type
|
|
14360
|
-
|
|
14361
|
-
|
|
14362
|
-
|
|
14363
|
-
checkShorthandImports?: (boolean | string);
|
|
14364
|
-
checkShorthandProperties?: boolean;
|
|
14365
|
-
checkFilenames?: boolean;
|
|
14366
|
-
extendDefaultReplacements?: boolean;
|
|
14367
|
-
replacements?: _UnicornPreventAbbreviations_Abbreviations;
|
|
14368
|
-
extendDefaultAllowList?: boolean;
|
|
14369
|
-
allowList?: _UnicornPreventAbbreviations_BooleanObject;
|
|
14370
|
-
ignore?: unknown[];
|
|
14371
|
-
}];
|
|
14372
|
-
type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined;
|
|
14373
|
-
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
14374
|
-
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
|
|
14375
|
-
}
|
|
14376
|
-
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
14377
|
-
[k: string]: boolean | undefined;
|
|
14378
|
-
}
|
|
14379
|
-
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
14380
|
-
[k: string]: boolean | undefined;
|
|
14381
|
-
} // ----- unicorn/relative-url-style -----
|
|
14382
|
-
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/string-content -----
|
|
15403
|
+
type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/relative-url-style -----
|
|
15404
|
+
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/require-css-escape -----
|
|
15405
|
+
type UnicornRequireCssEscape = [] | [{
|
|
15406
|
+
checkAllSelectors?: boolean;
|
|
15407
|
+
}]; // ----- unicorn/string-content -----
|
|
14383
15408
|
type UnicornStringContent = [] | [{
|
|
14384
15409
|
patterns?: {
|
|
14385
15410
|
[k: string]: (string | {
|
|
14386
15411
|
suggest: string;
|
|
14387
15412
|
fix?: boolean;
|
|
15413
|
+
caseSensitive?: boolean;
|
|
14388
15414
|
message?: string;
|
|
14389
15415
|
}) | undefined;
|
|
14390
15416
|
};
|
|
15417
|
+
selectors?: string[];
|
|
14391
15418
|
}]; // ----- unicorn/switch-case-braces -----
|
|
14392
|
-
type UnicornSwitchCaseBraces = [] | [("always" | "avoid")]; // ----- unicorn/template-indent -----
|
|
15419
|
+
type UnicornSwitchCaseBraces = [] | [("always" | "avoid" | "single-statement")]; // ----- unicorn/template-indent -----
|
|
14393
15420
|
type UnicornTemplateIndent = [] | [{
|
|
14394
15421
|
indent?: (string | number);
|
|
14395
15422
|
tags?: string[];
|
|
@@ -14399,6 +15426,9 @@ type UnicornTemplateIndent = [] | [{
|
|
|
14399
15426
|
}]; // ----- unicorn/text-encoding-identifier-case -----
|
|
14400
15427
|
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
14401
15428
|
withDash?: boolean;
|
|
15429
|
+
}]; // ----- unicorn/try-complexity -----
|
|
15430
|
+
type UnicornTryComplexity = [] | [{
|
|
15431
|
+
max?: number;
|
|
14402
15432
|
}]; // ----- use-isnan -----
|
|
14403
15433
|
type UseIsnan = [] | [{
|
|
14404
15434
|
enforceForSwitchCase?: boolean;
|
|
@@ -14610,6 +15640,10 @@ type YmlNoMultipleEmptyLines = [] | [{
|
|
|
14610
15640
|
max: number;
|
|
14611
15641
|
maxEOF?: number;
|
|
14612
15642
|
maxBOF?: number;
|
|
15643
|
+
}]; // ----- yml/no-trailing-spaces -----
|
|
15644
|
+
type YmlNoTrailingSpaces = [] | [{
|
|
15645
|
+
skipBlankLines?: boolean;
|
|
15646
|
+
ignoreComments?: boolean;
|
|
14613
15647
|
}]; // ----- yml/plain-scalar -----
|
|
14614
15648
|
type YmlPlainScalar = [] | [("always" | "never")] | [("always" | "never"), {
|
|
14615
15649
|
ignorePatterns?: string[];
|