@infernodesign/eslint-config 2.8.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -322,6 +322,11 @@ interface RuleOptions {
322
322
  * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/
323
323
  */
324
324
  'astro/no-exports-from-components'?: Linter.RuleEntry<[]>;
325
+ /**
326
+ * disallow omitted end tags
327
+ * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-omitted-end-tags/
328
+ */
329
+ 'astro/no-omitted-end-tags'?: Linter.RuleEntry<[]>;
325
330
  /**
326
331
  * disallow `prerender` export outside of pages/ directory
327
332
  * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/
@@ -552,6 +557,14 @@ interface RuleOptions {
552
557
  * Prefer the exponentiation operator ** over Math.pow()
553
558
  */
554
559
  'e18e/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>;
560
+ /**
561
+ * Prefer Array.prototype.flatMap() over .map(fn).flat() to avoid the intermediate array
562
+ */
563
+ 'e18e/prefer-flatmap-over-map-flat'?: Linter.RuleEntry<[]>;
564
+ /**
565
+ * Prefer `Map.prototype.getOrInsert()` over reading an entry with a default and writing it back
566
+ */
567
+ 'e18e/prefer-get-or-insert'?: Linter.RuleEntry<[]>;
555
568
  /**
556
569
  * Prefer .includes() over indexOf() comparisons for arrays and strings
557
570
  */
@@ -3737,6 +3750,11 @@ interface RuleOptions {
3737
3750
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
3738
3751
  */
3739
3752
  'react/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
3753
+ /**
3754
+ * Enforces that every 'IntersectionObserver' created in a component or custom hook has a corresponding 'IntersectionObserver.disconnect()'.
3755
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-intersection-observer
3756
+ */
3757
+ 'react/web-api-no-leaked-intersection-observer'?: Linter.RuleEntry<[]>;
3740
3758
  /**
3741
3759
  * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
3742
3760
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
@@ -4453,6 +4471,122 @@ interface RuleOptions {
4453
4471
  * @deprecated
4454
4472
  */
4455
4473
  'rest-spread-spacing'?: Linter.RuleEntry<RestSpreadSpacing>;
4474
+ /**
4475
+ * Avoid computed values in filters. Indices cannot be used.
4476
+ */
4477
+ 'sanity/groq-computed-value-in-filter'?: Linter.RuleEntry<[]>;
4478
+ /**
4479
+ * count() on correlated subquery can be slow.
4480
+ */
4481
+ 'sanity/groq-count-in-correlated-subquery'?: Linter.RuleEntry<[]>;
4482
+ /**
4483
+ * Deep pagination with large offsets is slow.
4484
+ */
4485
+ 'sanity/groq-deep-pagination'?: Linter.RuleEntry<[]>;
4486
+ /**
4487
+ * Slice offset uses a parameter which could cause deep pagination.
4488
+ */
4489
+ 'sanity/groq-deep-pagination-param'?: Linter.RuleEntry<[]>;
4490
+ /**
4491
+ * This query is extremely large and will likely execute very slowly.
4492
+ */
4493
+ 'sanity/groq-extremely-large-query'?: Linter.RuleEntry<[]>;
4494
+ /**
4495
+ * Document type in filter does not exist in schema
4496
+ */
4497
+ 'sanity/groq-invalid-type-filter'?: Linter.RuleEntry<[]>;
4498
+ /**
4499
+ * Avoid `->` inside filters. It prevents optimization.
4500
+ */
4501
+ 'sanity/groq-join-in-filter'?: Linter.RuleEntry<[]>;
4502
+ /**
4503
+ * Avoid using `->` to retrieve `_id`.
4504
+ */
4505
+ 'sanity/groq-join-to-get-id'?: Linter.RuleEntry<[]>;
4506
+ /**
4507
+ * Fetching many results at once can be slow.
4508
+ */
4509
+ 'sanity/groq-large-pages'?: Linter.RuleEntry<[]>;
4510
+ /**
4511
+ * This query uses many joins and may have poor performance.
4512
+ */
4513
+ 'sanity/groq-many-joins'?: Linter.RuleEntry<[]>;
4514
+ /**
4515
+ * `match` on `_id` may not work as expected.
4516
+ */
4517
+ 'sanity/groq-match-on-id'?: Linter.RuleEntry<[]>;
4518
+ /**
4519
+ * Comparisons between two non-literal fields are slow.
4520
+ */
4521
+ 'sanity/groq-non-literal-comparison'?: Linter.RuleEntry<[]>;
4522
+ /**
4523
+ * Ordering on computed values is slow.
4524
+ */
4525
+ 'sanity/groq-order-on-expr'?: Linter.RuleEntry<[]>;
4526
+ /**
4527
+ * Repeatedly resolving the same reference is inefficient.
4528
+ */
4529
+ 'sanity/groq-repeated-dereference'?: Linter.RuleEntry<[]>;
4530
+ /**
4531
+ * Field in projection does not exist in schema
4532
+ */
4533
+ 'sanity/groq-unknown-field'?: Linter.RuleEntry<[]>;
4534
+ /**
4535
+ * This query is very large and may execute slowly.
4536
+ */
4537
+ 'sanity/groq-very-large-query'?: Linter.RuleEntry<[]>;
4538
+ /**
4539
+ * Array fields should have min/max/unique validation constraints
4540
+ */
4541
+ 'sanity/schema-array-missing-constraints'?: Linter.RuleEntry<[]>;
4542
+ /**
4543
+ * Consider using options.list instead of boolean for expandable states
4544
+ */
4545
+ 'sanity/schema-boolean-instead-of-list'?: Linter.RuleEntry<[]>;
4546
+ /**
4547
+ * Heading levels should be computed dynamically, not stored in schema
4548
+ */
4549
+ 'sanity/schema-heading-level-in-schema'?: Linter.RuleEntry<[]>;
4550
+ /**
4551
+ * Fields should use defineField() wrapper
4552
+ */
4553
+ 'sanity/schema-missing-define-field'?: Linter.RuleEntry<[]>;
4554
+ /**
4555
+ * Schema types should use defineType() wrapper
4556
+ */
4557
+ 'sanity/schema-missing-define-type'?: Linter.RuleEntry<[]>;
4558
+ /**
4559
+ * Fields should have descriptions for better editor UX
4560
+ */
4561
+ 'sanity/schema-missing-description'?: Linter.RuleEntry<[]>;
4562
+ /**
4563
+ * Document types should have an icon
4564
+ */
4565
+ 'sanity/schema-missing-icon'?: Linter.RuleEntry<[]>;
4566
+ /**
4567
+ * Critical fields should have validation rules
4568
+ */
4569
+ 'sanity/schema-missing-required-validation'?: Linter.RuleEntry<[]>;
4570
+ /**
4571
+ * Slug fields should have options.source for auto-generation
4572
+ */
4573
+ 'sanity/schema-missing-slug-source'?: Linter.RuleEntry<[]>;
4574
+ /**
4575
+ * Schema types should have a title property
4576
+ */
4577
+ 'sanity/schema-missing-title'?: Linter.RuleEntry<[]>;
4578
+ /**
4579
+ * Avoid presentation-focused field names; use semantic names instead
4580
+ */
4581
+ 'sanity/schema-presentation-field-name'?: Linter.RuleEntry<[]>;
4582
+ /**
4583
+ * Field names starting with _ are reserved by Sanity
4584
+ */
4585
+ 'sanity/schema-reserved-field-name'?: Linter.RuleEntry<[]>;
4586
+ /**
4587
+ * Consider using an embedded object instead of a reference for non-shared content
4588
+ */
4589
+ 'sanity/schema-unnecessary-reference'?: Linter.RuleEntry<[]>;
4456
4590
  /**
4457
4591
  * Require or disallow semicolons instead of ASI
4458
4592
  * @see https://eslint.org/docs/latest/rules/semi
@@ -5292,6 +5426,11 @@ interface RuleOptions {
5292
5426
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-add-event-listener/
5293
5427
  */
5294
5428
  'svelte/no-add-event-listener'?: Linter.RuleEntry<[]>;
5429
+ /**
5430
+ * disallow the use of `{@const}` in favor of `{const ...}` declaration tags
5431
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-const-tags/
5432
+ */
5433
+ 'svelte/no-at-const-tags'?: Linter.RuleEntry<[]>;
5295
5434
  /**
5296
5435
  * disallow the use of `{@debug}`
5297
5436
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-debug-tags/
@@ -5601,7 +5740,7 @@ interface RuleOptions {
5601
5740
  */
5602
5741
  'svelte/valid-each-key'?: Linter.RuleEntry<[]>;
5603
5742
  /**
5604
- * disallow props other than data or errors in SvelteKit page components.
5743
+ * disallow invalid props in SvelteKit route components.
5605
5744
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
5606
5745
  */
5607
5746
  'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>;
@@ -6853,753 +6992,1673 @@ interface RuleOptions {
6853
6992
  */
6854
6993
  'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
6855
6994
  /**
6856
- * Improve regexes by making them shorter, consistent, and safer.
6857
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/better-regex.md
6995
+ * Prefer better DOM traversal APIs.
6996
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/better-dom-traversing.md
6858
6997
  */
6859
- 'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
6998
+ 'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
6999
+ /**
7000
+ * Removed. Prefer `eslint-plugin-regexp`
7001
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#better-regex
7002
+ * @deprecated
7003
+ */
7004
+ 'unicorn/better-regex'?: Linter.RuleEntry<[]>;
6860
7005
  /**
6861
7006
  * Enforce a specific parameter name in catch clauses.
6862
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/catch-error-name.md
7007
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/catch-error-name.md
6863
7008
  */
6864
7009
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
7010
+ /**
7011
+ * Enforce consistent class references in static methods.
7012
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/class-reference-in-static-methods.md
7013
+ */
7014
+ 'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
7015
+ /**
7016
+ * Enforce better comment content.
7017
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/comment-content.md
7018
+ */
7019
+ 'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
6865
7020
  /**
6866
7021
  * Enforce consistent assertion style with `node:assert`.
6867
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-assert.md
7022
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-assert.md
6868
7023
  */
6869
7024
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
7025
+ /**
7026
+ * Enforce consistent naming for boolean names.
7027
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-boolean-name.md
7028
+ */
7029
+ 'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
7030
+ /**
7031
+ * Enforce consistent class member order.
7032
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-class-member-order.md
7033
+ */
7034
+ 'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
7035
+ /**
7036
+ * Enforce consistent spelling of compound words in identifiers.
7037
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-compound-words.md
7038
+ */
7039
+ 'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
7040
+ /**
7041
+ * Enforce consistent conditional object spread style.
7042
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-conditional-object-spread.md
7043
+ */
7044
+ 'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
6870
7045
  /**
6871
7046
  * Prefer passing `Date` directly to the constructor when cloning.
6872
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-date-clone.md
7047
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-date-clone.md
6873
7048
  */
6874
7049
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
6875
7050
  /**
6876
7051
  * Use destructured variables over properties.
6877
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-destructuring.md
7052
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-destructuring.md
6878
7053
  */
6879
7054
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
6880
7055
  /**
6881
7056
  * Prefer consistent types when spreading a ternary in an array literal.
6882
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-empty-array-spread.md
7057
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-empty-array-spread.md
6883
7058
  */
6884
7059
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
6885
7060
  /**
6886
7061
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
6887
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-existence-index-check.md
7062
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-existence-index-check.md
6888
7063
  */
6889
7064
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
7065
+ /**
7066
+ * Enforce consistent decorator position on exported classes.
7067
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-export-decorator-position.md
7068
+ */
7069
+ 'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
6890
7070
  /**
6891
7071
  * Move function definitions to the highest possible scope.
6892
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-function-scoping.md
7072
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-function-scoping.md
6893
7073
  */
6894
7074
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
7075
+ /**
7076
+ * Enforce function syntax by role.
7077
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-function-style.md
7078
+ */
7079
+ 'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
7080
+ /**
7081
+ * Enforce consistent JSON file reads before `JSON.parse()`.
7082
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-json-file-read.md
7083
+ */
7084
+ 'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
7085
+ /**
7086
+ * Enforce consistent optional chaining for same-base member access.
7087
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-optional-chaining.md
7088
+ */
7089
+ 'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
6895
7090
  /**
6896
7091
  * Enforce consistent style for escaping `${` in template literals.
6897
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-template-literal-escape.md
7092
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-template-literal-escape.md
6898
7093
  */
6899
7094
  'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
7095
+ /**
7096
+ * Enforce consistent labels on tuple type elements.
7097
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/consistent-tuple-labels.md
7098
+ */
7099
+ 'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
6900
7100
  /**
6901
7101
  * Enforce correct `Error` subclassing.
6902
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/custom-error-definition.md
7102
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/custom-error-definition.md
6903
7103
  */
6904
7104
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
7105
+ /**
7106
+ * Enforce consistent default export declarations.
7107
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/default-export-style.md
7108
+ */
7109
+ 'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
7110
+ /**
7111
+ * Enforce consistent style for DOM element dataset access.
7112
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/dom-node-dataset.md
7113
+ */
7114
+ 'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
6905
7115
  /**
6906
7116
  * Enforce no spaces between braces.
6907
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/empty-brace-spaces.md
7117
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/empty-brace-spaces.md
6908
7118
  */
6909
7119
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
6910
7120
  /**
6911
7121
  * Enforce passing a `message` value when creating a built-in error.
6912
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/error-message.md
7122
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/error-message.md
6913
7123
  */
6914
7124
  'unicorn/error-message'?: Linter.RuleEntry<[]>;
6915
7125
  /**
6916
7126
  * Require escape sequences to use uppercase or lowercase values.
6917
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/escape-case.md
7127
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/escape-case.md
6918
7128
  */
6919
7129
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
6920
7130
  /**
6921
7131
  * Add expiration conditions to TODO comments.
6922
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/expiring-todo-comments.md
7132
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/expiring-todo-comments.md
6923
7133
  */
6924
7134
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
6925
7135
  /**
6926
7136
  * Enforce explicitly comparing the `length` or `size` property of a value.
6927
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/explicit-length-check.md
7137
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/explicit-length-check.md
6928
7138
  */
6929
7139
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
6930
7140
  /**
6931
- * Enforce a case style for filenames.
6932
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/filename-case.md
7141
+ * Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
7142
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/explicit-timer-delay.md
7143
+ */
7144
+ 'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
7145
+ /**
7146
+ * Enforce a case style for filenames and directory names.
7147
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/filename-case.md
6933
7148
  */
6934
7149
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
7150
+ /**
7151
+ * Require identifiers to match a specified regular expression.
7152
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/id-match.md
7153
+ */
7154
+ 'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
6935
7155
  /**
6936
7156
  * Enforce specific import styles per module.
6937
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/import-style.md
7157
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/import-style.md
6938
7158
  */
6939
7159
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
6940
7160
  /**
6941
7161
  * Prevent usage of variables from outside the scope of isolated functions.
6942
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/isolated-functions.md
7162
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/isolated-functions.md
6943
7163
  */
6944
7164
  'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
6945
7165
  /**
6946
- * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
6947
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/new-for-builtins.md
7166
+ * Require or disallow logical assignment operator shorthand
7167
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/logical-assignment-operators.md
7168
+ */
7169
+ 'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
7170
+ /**
7171
+ * Limit the depth of nested calls.
7172
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/max-nested-calls.md
7173
+ */
7174
+ 'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
7175
+ /**
7176
+ * Enforce replacements for variable, property, and filenames.
7177
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/name-replacements.md
7178
+ */
7179
+ 'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
7180
+ /**
7181
+ * Enforce correct use of `new` for builtin constructors.
7182
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/new-for-builtins.md
6948
7183
  */
6949
7184
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
6950
7185
  /**
6951
7186
  * Enforce specifying rules to disable in `eslint-disable` comments.
6952
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-abusive-eslint-disable.md
7187
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-abusive-eslint-disable.md
6953
7188
  */
6954
7189
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
6955
7190
  /**
6956
7191
  * Disallow recursive access to `this` within getters and setters.
6957
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-accessor-recursion.md
7192
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-accessor-recursion.md
6958
7193
  */
6959
7194
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
7195
+ /**
7196
+ * Disallow bitwise operators where a logical operator was likely intended.
7197
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-accidental-bitwise-operator.md
7198
+ */
7199
+ 'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
6960
7200
  /**
6961
7201
  * Disallow anonymous functions and classes as the default export.
6962
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-anonymous-default-export.md
7202
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-anonymous-default-export.md
6963
7203
  */
6964
7204
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
6965
7205
  /**
6966
7206
  * Prevent passing a function reference directly to iterator methods.
6967
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-callback-reference.md
7207
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-callback-reference.md
6968
7208
  */
6969
- 'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
7209
+ 'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
6970
7210
  /**
6971
- * Prefer `for…of` over the `forEach` method.
6972
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-for-each.md
7211
+ * Disallow array accumulation with `Array#concat()` in loops.
7212
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-concat-in-loop.md
7213
+ */
7214
+ 'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
7215
+ /**
7216
+ * Disallow using reference values as `Array#fill()` values.
7217
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-fill-with-reference-type.md
7218
+ */
7219
+ 'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
7220
+ /**
7221
+ * Disallow `.fill()` after `Array.from({length: …})`.
7222
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-from-fill.md
7223
+ */
7224
+ 'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
7225
+ /**
7226
+ * Disallow front-of-array mutation.
7227
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-front-mutation.md
6973
7228
  */
6974
- 'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
7229
+ 'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
6975
7230
  /**
6976
7231
  * Disallow using the `this` argument in array methods.
6977
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-method-this-argument.md
7232
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-method-this-argument.md
6978
7233
  */
6979
7234
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
6980
7235
  /**
6981
7236
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
6982
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
7237
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
6983
7238
  * @deprecated
6984
7239
  */
6985
7240
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
6986
7241
  /**
6987
7242
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
6988
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reduce.md
7243
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-reduce.md
6989
7244
  */
6990
7245
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
6991
7246
  /**
6992
7247
  * Prefer `Array#toReversed()` over `Array#reverse()`.
6993
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reverse.md
7248
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-reverse.md
6994
7249
  */
6995
7250
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
6996
7251
  /**
6997
7252
  * Prefer `Array#toSorted()` over `Array#sort()`.
6998
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-sort.md
7253
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-sort.md
6999
7254
  */
7000
7255
  'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
7256
+ /**
7257
+ * Disallow sorting arrays to get the minimum or maximum value.
7258
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-sort-for-min-max.md
7259
+ */
7260
+ 'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
7261
+ /**
7262
+ * Prefer `Array#toSpliced()` over `Array#splice()`.
7263
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-array-splice.md
7264
+ */
7265
+ 'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
7266
+ /**
7267
+ * Disallow asterisk prefixes in documentation comments.
7268
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
7269
+ */
7270
+ 'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
7271
+ /**
7272
+ * Disallow async functions as `Promise#finally()` callbacks.
7273
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-async-promise-finally.md
7274
+ */
7275
+ 'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
7001
7276
  /**
7002
7277
  * Disallow member access from await expression.
7003
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-expression-member.md
7278
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-await-expression-member.md
7004
7279
  */
7005
7280
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
7006
7281
  /**
7007
7282
  * Disallow using `await` in `Promise` method parameters.
7008
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-in-promise-methods.md
7283
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-await-in-promise-methods.md
7009
7284
  */
7010
7285
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
7286
+ /**
7287
+ * Disallow unnecessary `Blob` to `File` conversion.
7288
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-blob-to-file.md
7289
+ */
7290
+ 'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
7291
+ /**
7292
+ * Disallow boolean-returning sort comparators.
7293
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-boolean-sort-comparator.md
7294
+ */
7295
+ 'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
7296
+ /**
7297
+ * Disallow `break` and `continue` in nested loops and switches inside loops.
7298
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-break-in-nested-loop.md
7299
+ */
7300
+ 'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
7301
+ /**
7302
+ * Prefer drawing canvases directly instead of converting them to images.
7303
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-canvas-to-image.md
7304
+ */
7305
+ 'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
7306
+ /**
7307
+ * Disallow chained comparisons such as `a < b < c`.
7308
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-chained-comparison.md
7309
+ */
7310
+ 'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
7311
+ /**
7312
+ * Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
7313
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-collection-bracket-access.md
7314
+ */
7315
+ 'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
7316
+ /**
7317
+ * Disallow dynamic object property existence checks.
7318
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-computed-property-existence-check.md
7319
+ */
7320
+ 'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
7321
+ /**
7322
+ * Disallow confusing uses of `Array#{splice,toSpliced}()`.
7323
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-confusing-array-splice.md
7324
+ */
7325
+ 'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
7326
+ /**
7327
+ * Disallow confusing uses of `Array#with()`.
7328
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-confusing-array-with.md
7329
+ */
7330
+ 'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
7011
7331
  /**
7012
7332
  * Do not use leading/trailing space between `console.log` parameters.
7013
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-console-spaces.md
7333
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-console-spaces.md
7014
7334
  */
7015
7335
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
7336
+ /**
7337
+ * Disallow arithmetic and bitwise operations that always evaluate to `0`.
7338
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-constant-zero-expression.md
7339
+ */
7340
+ 'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
7341
+ /**
7342
+ * Disallow declarations before conditional early exits when they are only used after the exit.
7343
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-declarations-before-early-exit.md
7344
+ */
7345
+ 'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
7016
7346
  /**
7017
7347
  * Do not use `document.cookie` directly.
7018
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-document-cookie.md
7348
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-document-cookie.md
7019
7349
  */
7020
7350
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
7351
+ /**
7352
+ * Disallow two comparisons of the same operands that can be combined into one.
7353
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-double-comparison.md
7354
+ */
7355
+ 'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
7356
+ /**
7357
+ * Disallow duplicate adjacent branches in if chains.
7358
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-duplicate-if-branches.md
7359
+ */
7360
+ 'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
7361
+ /**
7362
+ * Disallow adjacent duplicate operands in logical expressions.
7363
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-duplicate-logical-operands.md
7364
+ */
7365
+ 'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
7366
+ /**
7367
+ * Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
7368
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-duplicate-loops.md
7369
+ */
7370
+ 'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
7371
+ /**
7372
+ * Disallow duplicate values in `Set` constructor array literals.
7373
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-duplicate-set-values.md
7374
+ */
7375
+ 'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
7021
7376
  /**
7022
7377
  * Disallow empty files.
7023
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-empty-file.md
7378
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-empty-file.md
7379
+ */
7380
+ 'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
7381
+ /**
7382
+ * Disallow assigning to built-in error properties.
7383
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-error-property-assignment.md
7384
+ */
7385
+ 'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
7386
+ /**
7387
+ * Disallow exports in scripts.
7388
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-exports-in-scripts.md
7024
7389
  */
7025
- 'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
7390
+ 'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
7391
+ /**
7392
+ * Prefer `for…of` over the `forEach` method.
7393
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-for-each.md
7394
+ */
7395
+ 'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
7026
7396
  /**
7027
7397
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
7028
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-for-loop.md
7398
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-for-loop.md
7029
7399
  */
7030
7400
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
7031
7401
  /**
7032
- * Enforce the use of Unicode escapes instead of hexadecimal escapes.
7033
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-hex-escape.md
7402
+ * Disallow assigning properties on the global object.
7403
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-global-object-property-assignment.md
7404
+ */
7405
+ 'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
7406
+ /**
7407
+ * Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
7408
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
7409
+ * @deprecated
7034
7410
  */
7035
7411
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
7036
7412
  /**
7037
7413
  * Disallow immediate mutation after variable assignment.
7038
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-immediate-mutation.md
7414
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-immediate-mutation.md
7039
7415
  */
7040
7416
  'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
7417
+ /**
7418
+ * Disallow impossible comparisons against `.length` or `.size`.
7419
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-impossible-length-comparison.md
7420
+ */
7421
+ 'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
7422
+ /**
7423
+ * Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
7424
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-incorrect-query-selector.md
7425
+ */
7426
+ 'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
7427
+ /**
7428
+ * Disallow incorrect template literal interpolation syntax.
7429
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-incorrect-template-string-interpolation.md
7430
+ */
7431
+ 'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
7041
7432
  /**
7042
7433
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
7043
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
7434
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
7044
7435
  * @deprecated
7045
7436
  */
7046
7437
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
7047
7438
  /**
7048
7439
  * Disallow `instanceof` with built-in objects
7049
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-instanceof-builtins.md
7440
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-instanceof-builtins.md
7050
7441
  */
7051
7442
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
7443
+ /**
7444
+ * Disallow calling functions and constructors with an invalid number of arguments.
7445
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-argument-count.md
7446
+ */
7447
+ 'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
7448
+ /**
7449
+ * Disallow comparing a single character from a string to a multi-character string.
7450
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-character-comparison.md
7451
+ */
7452
+ 'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
7052
7453
  /**
7053
7454
  * Disallow invalid options in `fetch()` and `new Request()`.
7054
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-fetch-options.md
7455
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-fetch-options.md
7055
7456
  */
7056
7457
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
7458
+ /**
7459
+ * Disallow invalid `accept` values on file inputs.
7460
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-file-input-accept.md
7461
+ */
7462
+ 'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
7057
7463
  /**
7058
7464
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
7059
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-remove-event-listener.md
7465
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-remove-event-listener.md
7060
7466
  */
7061
7467
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
7468
+ /**
7469
+ * Disallow invalid implementations of well-known symbol methods.
7470
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
7471
+ */
7472
+ 'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
7062
7473
  /**
7063
7474
  * Disallow identifiers starting with `new` or `class`.
7064
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-keyword-prefix.md
7475
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-keyword-prefix.md
7065
7476
  */
7066
7477
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
7478
+ /**
7479
+ * Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
7480
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-late-current-target-access.md
7481
+ */
7482
+ 'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
7483
+ /**
7484
+ * Disallow event-control method calls after the synchronous event dispatch has finished.
7485
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-late-event-control.md
7486
+ */
7487
+ 'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
7067
7488
  /**
7068
7489
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
7069
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
7490
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
7070
7491
  * @deprecated
7071
7492
  */
7072
7493
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
7073
7494
  /**
7074
7495
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
7075
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-lonely-if.md
7496
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-lonely-if.md
7076
7497
  */
7077
7498
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
7499
+ /**
7500
+ * Disallow mutating a loop iterable during iteration.
7501
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-loop-iterable-mutation.md
7502
+ */
7503
+ 'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
7078
7504
  /**
7079
7505
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
7080
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-magic-array-flat-depth.md
7506
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-magic-array-flat-depth.md
7081
7507
  */
7082
7508
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
7509
+ /**
7510
+ * Disallow manually wrapped comments.
7511
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-manually-wrapped-comments.md
7512
+ */
7513
+ 'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
7514
+ /**
7515
+ * Disallow checking a Map key before accessing a different key.
7516
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-mismatched-map-key.md
7517
+ */
7518
+ 'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
7519
+ /**
7520
+ * Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
7521
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-misrefactored-assignment.md
7522
+ */
7523
+ 'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
7083
7524
  /**
7084
7525
  * Disallow named usage of default import and export.
7085
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-named-default.md
7526
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-named-default.md
7086
7527
  */
7087
7528
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
7529
+ /**
7530
+ * Disallow negated array predicate calls.
7531
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-negated-array-predicate.md
7532
+ */
7533
+ 'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
7534
+ /**
7535
+ * Disallow negated comparisons.
7536
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-negated-comparison.md
7537
+ */
7538
+ 'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
7088
7539
  /**
7089
7540
  * Disallow negated conditions.
7090
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negated-condition.md
7541
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-negated-condition.md
7091
7542
  */
7092
7543
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
7093
7544
  /**
7094
7545
  * Disallow negated expression in equality check.
7095
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negation-in-equality-check.md
7546
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-negation-in-equality-check.md
7096
7547
  */
7097
7548
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
7098
7549
  /**
7099
7550
  * Disallow nested ternary expressions.
7100
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-nested-ternary.md
7551
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-nested-ternary.md
7101
7552
  */
7102
7553
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
7103
7554
  /**
7104
7555
  * Disallow `new Array()`.
7105
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-array.md
7556
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-new-array.md
7106
7557
  */
7107
7558
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
7108
7559
  /**
7109
7560
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
7110
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-buffer.md
7561
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-new-buffer.md
7111
7562
  */
7112
7563
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
7564
+ /**
7565
+ * Disallow non-function values with function-style verb prefixes.
7566
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-non-function-verb-prefix.md
7567
+ */
7568
+ 'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
7569
+ /**
7570
+ * Disallow non-standard properties on built-in objects.
7571
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-nonstandard-builtin-properties.md
7572
+ */
7573
+ 'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
7113
7574
  /**
7114
7575
  * Disallow the use of the `null` literal.
7115
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-null.md
7576
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-null.md
7116
7577
  */
7117
7578
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
7118
7579
  /**
7119
7580
  * Disallow the use of objects as default parameters.
7120
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-object-as-default-parameter.md
7581
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-object-as-default-parameter.md
7121
7582
  */
7122
7583
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
7584
+ /**
7585
+ * Disallow `Object` methods with `Map` or `Set`.
7586
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-object-methods-with-collections.md
7587
+ */
7588
+ 'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
7589
+ /**
7590
+ * Disallow optional chaining on undeclared variables.
7591
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
7592
+ */
7593
+ 'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
7123
7594
  /**
7124
7595
  * Disallow `process.exit()`.
7125
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-process-exit.md
7596
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-process-exit.md
7126
7597
  */
7127
7598
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
7599
+ /**
7600
+ * Disallow comparisons made redundant by an equality check in the same logical AND.
7601
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-redundant-comparison.md
7602
+ */
7603
+ 'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
7604
+ /**
7605
+ * Disallow using the return value of `Array#push()` and `Array#unshift()`.
7606
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-return-array-push.md
7607
+ */
7608
+ 'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
7609
+ /**
7610
+ * Disallow selector syntax in DOM names.
7611
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-selector-as-dom-name.md
7612
+ */
7613
+ 'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
7128
7614
  /**
7129
7615
  * Disallow passing single-element arrays to `Promise` methods.
7130
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-single-promise-in-promise-methods.md
7616
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-single-promise-in-promise-methods.md
7131
7617
  */
7132
7618
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
7133
7619
  /**
7134
7620
  * Disallow classes that only have static members.
7135
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-static-only-class.md
7621
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-static-only-class.md
7136
7622
  */
7137
7623
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
7624
+ /**
7625
+ * Prefer comparing values directly over subtracting and comparing to `0`.
7626
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-subtraction-comparison.md
7627
+ */
7628
+ 'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
7138
7629
  /**
7139
7630
  * Disallow `then` property.
7140
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-thenable.md
7631
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-thenable.md
7141
7632
  */
7142
7633
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
7143
7634
  /**
7144
7635
  * Disallow assigning `this` to a variable.
7145
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-this-assignment.md
7636
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-this-assignment.md
7146
7637
  */
7147
7638
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
7639
+ /**
7640
+ * Disallow `this` outside of classes.
7641
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-this-outside-of-class.md
7642
+ */
7643
+ 'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
7644
+ /**
7645
+ * Disallow assigning to top-level variables from inside functions.
7646
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-top-level-assignment-in-function.md
7647
+ */
7648
+ 'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
7649
+ /**
7650
+ * Disallow top-level side effects in exported modules.
7651
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-top-level-side-effects.md
7652
+ */
7653
+ 'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
7148
7654
  /**
7149
7655
  * Disallow comparing `undefined` using `typeof`.
7150
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-typeof-undefined.md
7656
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-typeof-undefined.md
7151
7657
  */
7152
7658
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
7659
+ /**
7660
+ * Disallow referencing methods without calling them.
7661
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-uncalled-method.md
7662
+ */
7663
+ 'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
7664
+ /**
7665
+ * Require class members to be declared.
7666
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-undeclared-class-members.md
7667
+ */
7668
+ 'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
7153
7669
  /**
7154
7670
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
7155
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-flat-depth.md
7671
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-array-flat-depth.md
7156
7672
  */
7157
7673
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
7674
+ /**
7675
+ * Disallow `Array#flatMap()` callbacks that only wrap a single item.
7676
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-array-flat-map.md
7677
+ */
7678
+ 'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
7158
7679
  /**
7159
7680
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
7160
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-splice-count.md
7681
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-array-splice-count.md
7161
7682
  */
7162
7683
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
7163
7684
  /**
7164
7685
  * Disallow awaiting non-promise values.
7165
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-await.md
7686
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-await.md
7166
7687
  */
7167
7688
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
7689
+ /**
7690
+ * Disallow unnecessary comparisons against boolean literals.
7691
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-boolean-comparison.md
7692
+ */
7693
+ 'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
7694
+ /**
7695
+ * Disallow unnecessary options in `fetch()` and `new Request()`.
7696
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-fetch-options.md
7697
+ */
7698
+ 'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
7699
+ /**
7700
+ * Disallow unnecessary `globalThis` references.
7701
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-global-this.md
7702
+ */
7703
+ 'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
7704
+ /**
7705
+ * Disallow unnecessary nested ternary expressions.
7706
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-nested-ternary.md
7707
+ */
7708
+ 'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
7168
7709
  /**
7169
7710
  * Enforce the use of built-in methods instead of unnecessary polyfills.
7170
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-polyfills.md
7711
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-polyfills.md
7171
7712
  */
7172
7713
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
7173
7714
  /**
7174
7715
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
7175
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-slice-end.md
7716
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-slice-end.md
7176
7717
  */
7177
7718
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
7719
+ /**
7720
+ * Disallow `Array#splice()` when simpler alternatives exist.
7721
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unnecessary-splice.md
7722
+ */
7723
+ 'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
7178
7724
  /**
7179
7725
  * Disallow unreadable array destructuring.
7180
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-array-destructuring.md
7726
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-array-destructuring.md
7181
7727
  */
7182
- 'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
7728
+ 'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
7729
+ /**
7730
+ * Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
7731
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-for-of-expression.md
7732
+ */
7733
+ 'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
7183
7734
  /**
7184
7735
  * Disallow unreadable IIFEs.
7185
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-iife.md
7736
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-iife.md
7186
7737
  */
7187
7738
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
7739
+ /**
7740
+ * Disallow unreadable `new` expressions.
7741
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-new-expression.md
7742
+ */
7743
+ 'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
7744
+ /**
7745
+ * Disallow unreadable object destructuring.
7746
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unreadable-object-destructuring.md
7747
+ */
7748
+ 'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
7749
+ /**
7750
+ * Prevent unsafe use of ArrayBuffer view `.buffer`.
7751
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-buffer-conversion.md
7752
+ */
7753
+ 'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
7754
+ /**
7755
+ * Disallow unsafe DOM HTML APIs.
7756
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-dom-html.md
7757
+ */
7758
+ 'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
7759
+ /**
7760
+ * Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
7761
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
7762
+ */
7763
+ 'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
7764
+ /**
7765
+ * Disallow unsafe values as property keys.
7766
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-property-key.md
7767
+ */
7768
+ 'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
7769
+ /**
7770
+ * Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
7771
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unsafe-string-replacement.md
7772
+ */
7773
+ 'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
7774
+ /**
7775
+ * Disallow ignoring the return value of selected array methods.
7776
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unused-array-method-return.md
7777
+ */
7778
+ 'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
7188
7779
  /**
7189
7780
  * Disallow unused object properties.
7190
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unused-properties.md
7781
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-unused-properties.md
7191
7782
  */
7192
7783
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
7784
+ /**
7785
+ * Disallow unnecessary `Boolean()` casts in array predicate callbacks.
7786
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-boolean-cast.md
7787
+ */
7788
+ 'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
7789
+ /**
7790
+ * Disallow useless type coercions of values that are already of the target type.
7791
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-coercion.md
7792
+ */
7793
+ 'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
7193
7794
  /**
7194
7795
  * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
7195
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-collection-argument.md
7796
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-collection-argument.md
7196
7797
  */
7197
7798
  'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
7799
+ /**
7800
+ * Disallow useless compound assignments such as `x += 0`.
7801
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-compound-assignment.md
7802
+ */
7803
+ 'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
7804
+ /**
7805
+ * Disallow useless concatenation of literals.
7806
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-concat.md
7807
+ */
7808
+ 'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
7809
+ /**
7810
+ * Disallow useless `continue` statements.
7811
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-continue.md
7812
+ */
7813
+ 'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
7814
+ /**
7815
+ * Disallow unnecessary existence checks before deletion.
7816
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-delete-check.md
7817
+ */
7818
+ 'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
7819
+ /**
7820
+ * Disallow `else` after a statement that exits.
7821
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-else.md
7822
+ */
7823
+ 'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
7198
7824
  /**
7199
7825
  * Disallow unnecessary `Error.captureStackTrace(…)`.
7200
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-error-capture-stack-trace.md
7826
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-error-capture-stack-trace.md
7201
7827
  */
7202
7828
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
7203
7829
  /**
7204
7830
  * Disallow useless fallback when spreading in object literals.
7205
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-fallback-in-spread.md
7831
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-fallback-in-spread.md
7206
7832
  */
7207
7833
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
7208
7834
  /**
7209
7835
  * Disallow unnecessary `.toArray()` on iterators.
7210
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-iterator-to-array.md
7836
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-iterator-to-array.md
7211
7837
  */
7212
7838
  'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
7213
7839
  /**
7214
7840
  * Disallow useless array length check.
7215
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-length-check.md
7841
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-length-check.md
7216
7842
  */
7217
7843
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
7844
+ /**
7845
+ * Disallow unnecessary operands in logical expressions involving boolean literals.
7846
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-logical-operand.md
7847
+ */
7848
+ 'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
7849
+ /**
7850
+ * Disallow useless overrides of class methods.
7851
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-override.md
7852
+ */
7853
+ 'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
7218
7854
  /**
7219
7855
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
7220
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-promise-resolve-reject.md
7856
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-promise-resolve-reject.md
7221
7857
  */
7222
7858
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
7859
+ /**
7860
+ * Disallow simple recursive function calls that can be replaced with a loop.
7861
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-recursion.md
7862
+ */
7863
+ 'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
7223
7864
  /**
7224
7865
  * Disallow unnecessary spread.
7225
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-spread.md
7866
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-spread.md
7226
7867
  */
7227
7868
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
7228
7869
  /**
7229
7870
  * Disallow useless case in switch statements.
7230
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-switch-case.md
7871
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-switch-case.md
7231
7872
  */
7232
7873
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
7874
+ /**
7875
+ * Disallow useless template literal expressions.
7876
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-template-literals.md
7877
+ */
7878
+ 'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
7233
7879
  /**
7234
7880
  * Disallow useless `undefined`.
7235
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-undefined.md
7881
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-useless-undefined.md
7236
7882
  */
7237
7883
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
7884
+ /**
7885
+ * Disallow the bitwise XOR operator where exponentiation was likely intended.
7886
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-xor-as-exponentiation.md
7887
+ */
7888
+ 'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
7238
7889
  /**
7239
7890
  * Disallow number literals with zero fractions or dangling dots.
7240
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-zero-fractions.md
7891
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/no-zero-fractions.md
7241
7892
  */
7242
7893
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
7243
7894
  /**
7244
7895
  * Enforce proper case for numeric literals.
7245
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/number-literal-case.md
7896
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/number-literal-case.md
7897
+ */
7898
+ 'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
7899
+ /**
7900
+ * Enforce the style of numeric separators by correctly grouping digits.
7901
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/numeric-separators-style.md
7902
+ */
7903
+ 'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
7904
+ /**
7905
+ * Require assignment operator shorthand where possible.
7906
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/operator-assignment.md
7907
+ */
7908
+ 'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
7909
+ /**
7910
+ * Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
7911
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-abort-signal-any.md
7246
7912
  */
7247
- 'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
7913
+ 'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
7248
7914
  /**
7249
- * Enforce the style of numeric separators by correctly grouping digits.
7250
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/numeric-separators-style.md
7915
+ * Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
7916
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-abort-signal-timeout.md
7251
7917
  */
7252
- 'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
7918
+ 'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
7253
7919
  /**
7254
7920
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
7255
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-add-event-listener.md
7921
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-add-event-listener.md
7256
7922
  */
7257
7923
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
7924
+ /**
7925
+ * Prefer an options object over a boolean in `.addEventListener()`.
7926
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-add-event-listener-options.md
7927
+ */
7928
+ 'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
7929
+ /**
7930
+ * Prefer `AggregateError` when throwing collected errors.
7931
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-aggregate-error.md
7932
+ */
7933
+ 'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
7258
7934
  /**
7259
7935
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
7260
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-find.md
7936
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-find.md
7261
7937
  */
7262
7938
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
7263
7939
  /**
7264
7940
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
7265
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat.md
7941
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-flat.md
7266
7942
  */
7267
7943
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
7268
7944
  /**
7269
- * Prefer `.flatMap(…)` over `.map(…).flat()`.
7270
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat-map.md
7945
+ * Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
7946
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-flat-map.md
7271
7947
  */
7272
7948
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
7949
+ /**
7950
+ * Prefer `Array.fromAsync()` over `for await…of` array accumulation.
7951
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-from-async.md
7952
+ */
7953
+ 'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
7954
+ /**
7955
+ * Prefer using the `Array.from()` mapping function argument.
7956
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-from-map.md
7957
+ */
7958
+ 'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
7959
+ /**
7960
+ * Prefer `Array.from({length}, …)` when creating range arrays.
7961
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-from-range.md
7962
+ */
7963
+ 'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
7273
7964
  /**
7274
7965
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
7275
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-index-of.md
7966
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-index-of.md
7276
7967
  */
7277
7968
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
7969
+ /**
7970
+ * Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
7971
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-iterable-methods.md
7972
+ */
7973
+ 'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
7974
+ /**
7975
+ * Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
7976
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-last-methods.md
7977
+ */
7978
+ 'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
7979
+ /**
7980
+ * Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
7981
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-slice.md
7982
+ */
7983
+ 'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
7278
7984
  /**
7279
7985
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
7280
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-some.md
7986
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-array-some.md
7281
7987
  */
7282
7988
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
7283
7989
  /**
7284
7990
  * Prefer `.at()` method for index access and `String#charAt()`.
7285
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-at.md
7991
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-at.md
7286
7992
  */
7287
7993
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
7994
+ /**
7995
+ * Prefer `await` over promise chaining.
7996
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-await.md
7997
+ */
7998
+ 'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
7288
7999
  /**
7289
8000
  * Prefer `BigInt` literals over the constructor.
7290
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-bigint-literals.md
8001
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-bigint-literals.md
7291
8002
  */
7292
8003
  'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
7293
8004
  /**
7294
8005
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
7295
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-blob-reading-methods.md
8006
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-blob-reading-methods.md
7296
8007
  */
7297
8008
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
8009
+ /**
8010
+ * Prefer block statements over IIFEs used only for scoping.
8011
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-block-statement-over-iife.md
8012
+ */
8013
+ 'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
8014
+ /**
8015
+ * Prefer directly returning boolean expressions over `if` statements.
8016
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-boolean-return.md
8017
+ */
8018
+ 'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
7298
8019
  /**
7299
8020
  * Prefer class field declarations over `this` assignments in constructors.
7300
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-class-fields.md
8021
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-class-fields.md
7301
8022
  */
7302
8023
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
7303
8024
  /**
7304
8025
  * Prefer using `Element#classList.toggle()` to toggle class names.
7305
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-classlist-toggle.md
8026
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-classlist-toggle.md
7306
8027
  */
7307
8028
  'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
7308
8029
  /**
7309
8030
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
7310
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-code-point.md
8031
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-code-point.md
7311
8032
  */
7312
8033
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
8034
+ /**
8035
+ * Prefer early continues over whole-loop conditional wrapping.
8036
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-continue.md
8037
+ */
8038
+ 'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
7313
8039
  /**
7314
8040
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
7315
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-date-now.md
8041
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-date-now.md
7316
8042
  */
7317
8043
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
7318
8044
  /**
7319
8045
  * Prefer default parameters over reassignment.
7320
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-default-parameters.md
8046
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-default-parameters.md
7321
8047
  */
7322
8048
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
7323
8049
  /**
7324
- * Prefer `Node#append()` over `Node#appendChild()`.
7325
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-append.md
8050
+ * Prefer direct iteration over default iterator method calls.
8051
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-direct-iteration.md
8052
+ */
8053
+ 'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
8054
+ /**
8055
+ * Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
8056
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dispose.md
8057
+ */
8058
+ 'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
8059
+ /**
8060
+ * Prefer `Element#append()` over `Node#appendChild()`.
8061
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-append.md
7326
8062
  */
7327
8063
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
7328
8064
  /**
7329
- * Prefer using `.dataset` on DOM elements over calling attribute methods.
7330
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-dataset.md
8065
+ * Renamed to `unicorn/dom-node-dataset`.
8066
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
8067
+ * @deprecated
7331
8068
  */
7332
8069
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
8070
+ /**
8071
+ * Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
8072
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-html-methods.md
8073
+ */
8074
+ 'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
7333
8075
  /**
7334
8076
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
7335
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-remove.md
8077
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-remove.md
7336
8078
  */
7337
8079
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
8080
+ /**
8081
+ * Prefer `.replaceChildren()` when emptying DOM children.
8082
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-replace-children.md
8083
+ */
8084
+ 'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
7338
8085
  /**
7339
8086
  * Prefer `.textContent` over `.innerText`.
7340
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-text-content.md
8087
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-dom-node-text-content.md
7341
8088
  */
7342
8089
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
8090
+ /**
8091
+ * Prefer early returns over full-function conditional wrapping.
8092
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-early-return.md
8093
+ */
8094
+ 'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
8095
+ /**
8096
+ * Prefer `else if` over adjacent `if` statements with related conditions.
8097
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-else-if.md
8098
+ */
8099
+ 'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
8100
+ /**
8101
+ * Prefer `Error.isError()` when checking for errors.
8102
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-error-is-error.md
8103
+ */
8104
+ 'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
7343
8105
  /**
7344
8106
  * Prefer `EventTarget` over `EventEmitter`.
7345
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-event-target.md
8107
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-event-target.md
7346
8108
  */
7347
8109
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
7348
8110
  /**
7349
8111
  * Prefer `export…from` when re-exporting.
7350
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-export-from.md
8112
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-export-from.md
7351
8113
  */
7352
8114
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
8115
+ /**
8116
+ * Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
8117
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-flat-math-min-max.md
8118
+ */
8119
+ 'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
8120
+ /**
8121
+ * Prefer `.getOrInsertComputed()` when the default value has side effects.
8122
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-get-or-insert-computed.md
8123
+ */
8124
+ 'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
8125
+ /**
8126
+ * Prefer global numeric constants over `Number` static properties.
8127
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-global-number-constants.md
8128
+ */
8129
+ 'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
7353
8130
  /**
7354
8131
  * Prefer `globalThis` over `window`, `self`, and `global`.
7355
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-global-this.md
8132
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-global-this.md
7356
8133
  */
7357
8134
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
8135
+ /**
8136
+ * Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
8137
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-group-by.md
8138
+ */
8139
+ 'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
8140
+ /**
8141
+ * Prefer `.has()` when checking existence.
8142
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-has-check.md
8143
+ */
8144
+ 'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
8145
+ /**
8146
+ * Prefer moving code shared by all branches of an `if` statement out of the branches.
8147
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-hoisting-branch-code.md
8148
+ */
8149
+ 'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
8150
+ /**
8151
+ * Prefer HTTPS over HTTP.
8152
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-https.md
8153
+ */
8154
+ 'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
8155
+ /**
8156
+ * Prefer identifiers over string literals in import and export specifiers.
8157
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
8158
+ */
8159
+ 'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
7358
8160
  /**
7359
8161
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
7360
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-import-meta-properties.md
8162
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-import-meta-properties.md
7361
8163
  */
7362
8164
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
7363
8165
  /**
7364
8166
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
7365
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-includes.md
8167
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-includes.md
7366
8168
  */
7367
8169
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
7368
8170
  /**
7369
- * Prefer reading a JSON file as a buffer.
7370
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-json-parse-buffer.md
8171
+ * Prefer `.includes()` over repeated equality comparisons.
8172
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
8173
+ */
8174
+ 'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
8175
+ /**
8176
+ * Prefer passing iterables directly to constructors instead of filling empty collections.
8177
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterable-in-constructor.md
8178
+ */
8179
+ 'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
8180
+ /**
8181
+ * Prefer `Iterator.concat(…)` over temporary spread arrays.
8182
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterator-concat.md
8183
+ */
8184
+ 'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
8185
+ /**
8186
+ * Prefer iterator helpers over temporary arrays from iterators.
8187
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterator-helpers.md
8188
+ */
8189
+ 'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
8190
+ /**
8191
+ * Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
8192
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterator-to-array.md
8193
+ */
8194
+ 'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
8195
+ /**
8196
+ * Prefer moving `.toArray()` to the end of iterator helper chains.
8197
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-iterator-to-array-at-end.md
8198
+ */
8199
+ 'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
8200
+ /**
8201
+ * Renamed to `unicorn/consistent-json-file-read`.
8202
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
8203
+ * @deprecated
7371
8204
  */
7372
8205
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
7373
8206
  /**
7374
- * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
7375
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-keyboard-event-key.md
8207
+ * Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
8208
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-keyboard-event-key.md
7376
8209
  */
7377
8210
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
8211
+ /**
8212
+ * Prefer `location.assign()` over assigning to `location.href`.
8213
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-location-assign.md
8214
+ */
8215
+ 'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
7378
8216
  /**
7379
8217
  * Prefer using a logical operator over a ternary.
7380
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-logical-operator-over-ternary.md
8218
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-logical-operator-over-ternary.md
7381
8219
  */
7382
8220
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
8221
+ /**
8222
+ * Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
8223
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-map-from-entries.md
8224
+ */
8225
+ 'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
8226
+ /**
8227
+ * Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
8228
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-math-abs.md
8229
+ */
8230
+ 'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
8231
+ /**
8232
+ * Prefer `Math` constants over their approximate numeric values.
8233
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-math-constants.md
8234
+ */
8235
+ 'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
7383
8236
  /**
7384
8237
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
7385
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-min-max.md
8238
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-math-min-max.md
7386
8239
  */
7387
8240
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
7388
8241
  /**
7389
- * Enforce the use of `Math.trunc` instead of bitwise operators.
7390
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-trunc.md
8242
+ * Prefer `Math.trunc()` for truncating numbers.
8243
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-math-trunc.md
7391
8244
  */
7392
8245
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
7393
8246
  /**
7394
- * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
7395
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-dom-apis.md
8247
+ * Prefer moving ternaries into the minimal varying part of an expression.
8248
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-minimal-ternary.md
8249
+ */
8250
+ 'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
8251
+ /**
8252
+ * Prefer modern DOM APIs.
8253
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-modern-dom-apis.md
7396
8254
  */
7397
8255
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
7398
8256
  /**
7399
8257
  * Prefer modern `Math` APIs over legacy patterns.
7400
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-math-apis.md
8258
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-modern-math-apis.md
7401
8259
  */
7402
8260
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
7403
8261
  /**
7404
8262
  * Prefer JavaScript modules (ESM) over CommonJS.
7405
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-module.md
8263
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-module.md
7406
8264
  */
7407
8265
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
7408
8266
  /**
7409
8267
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
7410
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-native-coercion-functions.md
8268
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-native-coercion-functions.md
7411
8269
  */
7412
8270
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
7413
8271
  /**
7414
8272
  * Prefer negative index over `.length - index` when possible.
7415
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-negative-index.md
8273
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-negative-index.md
7416
8274
  */
7417
8275
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
7418
8276
  /**
7419
8277
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
7420
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-node-protocol.md
8278
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-node-protocol.md
7421
8279
  */
7422
8280
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
7423
8281
  /**
7424
- * Prefer `Number` static properties over global ones.
7425
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-number-properties.md
8282
+ * Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
8283
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-number-coercion.md
8284
+ */
8285
+ 'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
8286
+ /**
8287
+ * Prefer `Number.isSafeInteger()` over integer checks.
8288
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-number-is-safe-integer.md
8289
+ */
8290
+ 'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
8291
+ /**
8292
+ * Prefer `Number` static methods over global functions and optionally static properties over global constants.
8293
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-number-properties.md
7426
8294
  */
7427
8295
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
8296
+ /**
8297
+ * Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
8298
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-object-define-properties.md
8299
+ */
8300
+ 'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
8301
+ /**
8302
+ * Prefer object destructuring defaults over default object literals with spread.
8303
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-object-destructuring-defaults.md
8304
+ */
8305
+ 'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
7428
8306
  /**
7429
8307
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
7430
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-object-from-entries.md
8308
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-object-from-entries.md
7431
8309
  */
7432
8310
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
8311
+ /**
8312
+ * Prefer the most specific `Object` iterable method.
8313
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-object-iterable-methods.md
8314
+ */
8315
+ 'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
8316
+ /**
8317
+ * Prefer observer APIs over resize and scroll listeners with layout reads.
8318
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-observer-apis.md
8319
+ */
8320
+ 'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
7433
8321
  /**
7434
8322
  * Prefer omitting the `catch` binding parameter.
7435
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-optional-catch-binding.md
8323
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-optional-catch-binding.md
7436
8324
  */
7437
8325
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
8326
+ /**
8327
+ * Prefer `Path2D` for repeatedly drawn canvas paths.
8328
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-path2d.md
8329
+ */
8330
+ 'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
8331
+ /**
8332
+ * Prefer private class fields over the underscore-prefix convention.
8333
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-private-class-fields.md
8334
+ */
8335
+ 'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
8336
+ /**
8337
+ * Prefer `Promise.try()` over promise-wrapping boilerplate.
8338
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-promise-try.md
8339
+ */
8340
+ 'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
8341
+ /**
8342
+ * Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
8343
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-promise-with-resolvers.md
8344
+ */
8345
+ 'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
7438
8346
  /**
7439
8347
  * Prefer borrowing methods from the prototype instead of the instance.
7440
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-prototype-methods.md
8348
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-prototype-methods.md
7441
8349
  */
7442
8350
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
7443
8351
  /**
7444
- * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
7445
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-query-selector.md
8352
+ * Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
8353
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-query-selector.md
8354
+ */
8355
+ 'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
8356
+ /**
8357
+ * Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
8358
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-queue-microtask.md
7446
8359
  */
7447
- 'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
8360
+ 'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
7448
8361
  /**
7449
8362
  * Prefer `Reflect.apply()` over `Function#apply()`.
7450
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-reflect-apply.md
8363
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-reflect-apply.md
7451
8364
  */
7452
8365
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
7453
8366
  /**
7454
- * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
7455
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-regexp-test.md
8367
+ * Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
8368
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-regexp-escape.md
8369
+ */
8370
+ 'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
8371
+ /**
8372
+ * Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
8373
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-regexp-test.md
7456
8374
  */
7457
8375
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
7458
8376
  /**
7459
8377
  * Prefer `Response.json()` over `new Response(JSON.stringify())`.
7460
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-response-static-json.md
8378
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-response-static-json.md
7461
8379
  */
7462
8380
  'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
8381
+ /**
8382
+ * Prefer `:scope` when using element query selector methods.
8383
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-scoped-selector.md
8384
+ */
8385
+ 'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
7463
8386
  /**
7464
8387
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
7465
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-has.md
8388
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-set-has.md
8389
+ */
8390
+ 'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
8391
+ /**
8392
+ * Prefer `Set` methods for Set operations.
8393
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-set-methods.md
7466
8394
  */
7467
- 'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
8395
+ 'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
7468
8396
  /**
7469
8397
  * Prefer using `Set#size` instead of `Array#length`.
7470
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-size.md
8398
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-set-size.md
7471
8399
  */
7472
8400
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
8401
+ /**
8402
+ * Prefer arrow function properties over methods with a single return.
8403
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-short-arrow-method.md
8404
+ */
8405
+ 'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
7473
8406
  /**
7474
8407
  * Prefer simple conditions first in logical expressions.
7475
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-simple-condition-first.md
8408
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-simple-condition-first.md
7476
8409
  */
7477
8410
  'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
7478
8411
  /**
7479
- * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
7480
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-single-call.md
8412
+ * Prefer a simple comparison function for `Array#sort()`.
8413
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-simple-sort-comparator.md
8414
+ */
8415
+ 'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
8416
+ /**
8417
+ * Prefer simplified conditions.
8418
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-simplified-conditions.md
8419
+ */
8420
+ 'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
8421
+ /**
8422
+ * Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
8423
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-single-array-predicate.md
8424
+ */
8425
+ 'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
8426
+ /**
8427
+ * Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
8428
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-single-call.md
7481
8429
  */
7482
8430
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
7483
8431
  /**
7484
- * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
7485
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-spread.md
8432
+ * Prefer a single object destructuring declaration per local const source.
8433
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-single-object-destructuring.md
8434
+ */
8435
+ 'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
8436
+ /**
8437
+ * Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
8438
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-single-replace.md
8439
+ */
8440
+ 'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
8441
+ /**
8442
+ * Prefer declaring variables in the smallest possible scope.
8443
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-smaller-scope.md
8444
+ */
8445
+ 'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
8446
+ /**
8447
+ * Prefer `String#split()` with a limit.
8448
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-split-limit.md
8449
+ */
8450
+ 'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
8451
+ /**
8452
+ * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
8453
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-spread.md
7486
8454
  */
7487
8455
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
8456
+ /**
8457
+ * Prefer `String#matchAll()` over `RegExp#exec()` loops.
8458
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-match-all.md
8459
+ */
8460
+ 'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
8461
+ /**
8462
+ * Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
8463
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-pad-start-end.md
8464
+ */
8465
+ 'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
7488
8466
  /**
7489
8467
  * Prefer using the `String.raw` tag to avoid escaping `\`.
7490
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-raw.md
8468
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-raw.md
7491
8469
  */
7492
8470
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
7493
8471
  /**
7494
- * Prefer `String#replaceAll()` over regex searches with the global flag.
7495
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-replace-all.md
8472
+ * Prefer `String#repeat()` for repeated whitespace.
8473
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-repeat.md
8474
+ */
8475
+ 'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
8476
+ /**
8477
+ * Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
8478
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-replace-all.md
7496
8479
  */
7497
8480
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
7498
8481
  /**
7499
8482
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
7500
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-slice.md
8483
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-slice.md
7501
8484
  */
7502
8485
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
7503
8486
  /**
7504
- * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
7505
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-starts-ends-with.md
8487
+ * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
8488
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-starts-ends-with.md
7506
8489
  */
7507
8490
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
7508
8491
  /**
7509
8492
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
7510
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-trim-start-end.md
8493
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-string-trim-start-end.md
7511
8494
  */
7512
8495
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
7513
8496
  /**
7514
8497
  * Prefer using `structuredClone` to create a deep clone.
7515
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-structured-clone.md
8498
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-structured-clone.md
7516
8499
  */
7517
8500
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
7518
8501
  /**
7519
8502
  * Prefer `switch` over multiple `else-if`.
7520
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-switch.md
8503
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-switch.md
7521
8504
  */
7522
8505
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
7523
8506
  /**
7524
- * Prefer ternary expressions over simple `if-else` statements.
7525
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-ternary.md
8507
+ * Prefer `Temporal` over `Date`.
8508
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-temporal.md
8509
+ */
8510
+ 'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
8511
+ /**
8512
+ * Prefer ternary expressions over simple `if` statements that return or assign values.
8513
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-ternary.md
7526
8514
  */
7527
8515
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
8516
+ /**
8517
+ * Prefer using `Element#toggleAttribute()` to toggle attributes.
8518
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-toggle-attribute.md
8519
+ */
8520
+ 'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
7528
8521
  /**
7529
8522
  * Prefer top-level await over top-level promises and async function calls.
7530
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-top-level-await.md
8523
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-top-level-await.md
7531
8524
  */
7532
8525
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
7533
8526
  /**
7534
8527
  * Enforce throwing `TypeError` in type checking conditions.
7535
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-type-error.md
8528
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-type-error.md
7536
8529
  */
7537
8530
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
7538
8531
  /**
7539
- * Prevent abbreviations.
7540
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prevent-abbreviations.md
8532
+ * Require type literals to be last in union types.
8533
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-type-literal-last.md
8534
+ */
8535
+ 'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
8536
+ /**
8537
+ * Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
8538
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-uint8array-base64.md
8539
+ */
8540
+ 'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
8541
+ /**
8542
+ * Prefer the unary minus operator over multiplying or dividing by `-1`.
8543
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-unary-minus.md
8544
+ */
8545
+ 'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
8546
+ /**
8547
+ * Prefer Unicode code point escapes over legacy escape sequences.
8548
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-unicode-code-point-escapes.md
8549
+ */
8550
+ 'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
8551
+ /**
8552
+ * Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
8553
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-url-can-parse.md
8554
+ */
8555
+ 'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
8556
+ /**
8557
+ * Prefer `URL#href` over stringifying a `URL`.
8558
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-url-href.md
8559
+ */
8560
+ 'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
8561
+ /**
8562
+ * Prefer `URLSearchParams` over manually splitting query strings.
8563
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-url-search-parameters.md
8564
+ */
8565
+ 'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
8566
+ /**
8567
+ * Prefer putting the condition in the while statement.
8568
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/prefer-while-loop-condition.md
8569
+ */
8570
+ 'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
8571
+ /**
8572
+ * Renamed to `unicorn/name-replacements`.
8573
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
8574
+ * @deprecated
7541
8575
  */
7542
- 'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
8576
+ 'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
7543
8577
  /**
7544
8578
  * Enforce consistent relative URL style.
7545
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/relative-url-style.md
8579
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/relative-url-style.md
7546
8580
  */
7547
8581
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
7548
8582
  /**
7549
8583
  * Enforce using the separator argument with `Array#join()`.
7550
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-array-join-separator.md
8584
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-array-join-separator.md
7551
8585
  */
7552
8586
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
8587
+ /**
8588
+ * Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
8589
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-array-sort-compare.md
8590
+ */
8591
+ 'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
8592
+ /**
8593
+ * Require `CSS.escape()` for interpolated values in CSS selectors.
8594
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-css-escape.md
8595
+ */
8596
+ 'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
7553
8597
  /**
7554
8598
  * Require non-empty module attributes for imports and exports
7555
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-attributes.md
8599
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-module-attributes.md
7556
8600
  */
7557
8601
  'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
7558
8602
  /**
7559
8603
  * Require non-empty specifier list in import and export statements.
7560
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-specifiers.md
8604
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-module-specifiers.md
7561
8605
  */
7562
8606
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
7563
8607
  /**
7564
8608
  * Enforce using the digits argument with `Number#toFixed()`.
7565
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-number-to-fixed-digits-argument.md
8609
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-number-to-fixed-digits-argument.md
7566
8610
  */
7567
8611
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
8612
+ /**
8613
+ * Require passive event listeners for high-frequency events.
8614
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-passive-events.md
8615
+ */
8616
+ 'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
7568
8617
  /**
7569
8618
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
7570
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-post-message-target-origin.md
8619
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-post-message-target-origin.md
7571
8620
  */
7572
8621
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
8622
+ /**
8623
+ * Require boolean-returning Proxy traps to return booleans.
8624
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/require-proxy-trap-boolean-return.md
8625
+ */
8626
+ 'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
7573
8627
  /**
7574
8628
  * Enforce better string content.
7575
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/string-content.md
8629
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/string-content.md
7576
8630
  */
7577
8631
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
7578
8632
  /**
7579
8633
  * Enforce consistent brace style for `case` clauses.
7580
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-braces.md
8634
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/switch-case-braces.md
7581
8635
  */
7582
8636
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
7583
8637
  /**
7584
8638
  * Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
7585
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-break-position.md
8639
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/switch-case-break-position.md
7586
8640
  */
7587
8641
  'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
7588
8642
  /**
7589
8643
  * Fix whitespace-insensitive template indentation.
7590
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/template-indent.md
8644
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/template-indent.md
7591
8645
  */
7592
8646
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
7593
8647
  /**
7594
8648
  * Enforce consistent case for text encoding identifiers.
7595
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/text-encoding-identifier-case.md
8649
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/text-encoding-identifier-case.md
7596
8650
  */
7597
8651
  'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
7598
8652
  /**
7599
8653
  * Require `new` when creating an error.
7600
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/throw-new-error.md
8654
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/throw-new-error.md
7601
8655
  */
7602
8656
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
8657
+ /**
8658
+ * Limit the complexity of `try` blocks.
8659
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v70.0.0/docs/rules/try-complexity.md
8660
+ */
8661
+ 'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
7603
8662
  /**
7604
8663
  * Utilities in UnoCSS blocklist
7605
8664
  * @see https://unocss.dev/integrations/eslint#rules
@@ -9114,6 +10173,11 @@ interface RuleOptions {
9114
10173
  * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html
9115
10174
  */
9116
10175
  'yaml/no-tab-indent'?: Linter.RuleEntry<[]>;
10176
+ /**
10177
+ * disallow trailing whitespace at the end of lines
10178
+ * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-spaces.html
10179
+ */
10180
+ 'yaml/no-trailing-spaces'?: Linter.RuleEntry<YamlNoTrailingSpaces>;
9117
10181
  /**
9118
10182
  * disallow trailing zeros for floats
9119
10183
  * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html
@@ -16076,7 +17140,7 @@ type TestNoFocusedTests = [] | [{
16076
17140
  fixable?: boolean;
16077
17141
  }]; // ----- test/no-hooks -----
16078
17142
  type TestNoHooks = [] | [{
16079
- allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[];
17143
+ allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach" | "aroundAll" | "aroundEach")[];
16080
17144
  }]; // ----- test/no-large-snapshots -----
16081
17145
  type TestNoLargeSnapshots = [] | [{
16082
17146
  maxSize?: number;
@@ -17155,43 +18219,110 @@ type TsUnifiedSignatures = [] | [{
17155
18219
  ignoreDifferentlyNamedParameters?: boolean;
17156
18220
  ignoreOverloadsWithDifferentJSDoc?: boolean;
17157
18221
  }]; // ----- unicode-bom -----
17158
- type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/better-regex -----
17159
- type UnicornBetterRegex = [] | [{
17160
- sortCharacterClasses?: boolean;
17161
- }]; // ----- unicorn/catch-error-name -----
18222
+ type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/catch-error-name -----
17162
18223
  type UnicornCatchErrorName = [] | [{
17163
18224
  name?: string;
17164
18225
  ignore?: unknown[];
17165
- }]; // ----- unicorn/consistent-function-scoping -----
18226
+ }]; // ----- unicorn/class-reference-in-static-methods -----
18227
+ type UnicornClassReferenceInStaticMethods = [] | [{
18228
+ preferThis?: boolean;
18229
+ preferSuper?: boolean;
18230
+ }]; // ----- unicorn/comment-content -----
18231
+ type UnicornCommentContent = [] | [{
18232
+ checkUniformCase?: boolean;
18233
+ extendDefaultReplacements?: boolean;
18234
+ replacements?: {
18235
+ [k: string]: (false | string | {
18236
+ replacement: string;
18237
+ caseSensitive?: boolean;
18238
+ }) | undefined;
18239
+ };
18240
+ }]; // ----- unicorn/consistent-boolean-name -----
18241
+ type UnicornConsistentBooleanName = [] | [{
18242
+ checkProperties?: boolean;
18243
+ prefixes?: {
18244
+ [k: string]: boolean | undefined;
18245
+ };
18246
+ ignore?: unknown[];
18247
+ }]; // ----- unicorn/consistent-class-member-order -----
18248
+ type UnicornConsistentClassMemberOrder = [] | [{
18249
+ 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")];
18250
+ }]; // ----- unicorn/consistent-compound-words -----
18251
+ type UnicornConsistentCompoundWords = [] | [{
18252
+ checkProperties?: boolean;
18253
+ checkVariables?: boolean;
18254
+ checkDefaultAndNamespaceImports?: (boolean | "internal");
18255
+ checkShorthandImports?: (boolean | "internal");
18256
+ checkShorthandProperties?: boolean;
18257
+ extendDefaultReplacements?: boolean;
18258
+ replacements?: _UnicornConsistentCompoundWords_Replacements;
18259
+ allowList?: _UnicornConsistentCompoundWords_TrueObject;
18260
+ }];
18261
+ interface _UnicornConsistentCompoundWords_Replacements {
18262
+ [k: string]: (false | string) | undefined;
18263
+ }
18264
+ interface _UnicornConsistentCompoundWords_TrueObject {
18265
+ [k: string]: true | undefined;
18266
+ } // ----- unicorn/consistent-conditional-object-spread -----
18267
+ type UnicornConsistentConditionalObjectSpread = [] | [("logical" | "ternary")]; // ----- unicorn/consistent-export-decorator-position -----
18268
+ type UnicornConsistentExportDecoratorPosition = [] | [("above" | "before" | "after")]; // ----- unicorn/consistent-function-scoping -----
17166
18269
  type UnicornConsistentFunctionScoping = [] | [{
17167
18270
  checkArrowFunctions?: boolean;
18271
+ }]; // ----- unicorn/consistent-function-style -----
18272
+ type UnicornConsistentFunctionStyle = [] | [{
18273
+ default?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
18274
+ namedFunctions?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
18275
+ namedExports?: ("declaration" | "function-expression" | "arrow-function" | "ignore");
18276
+ callbacks?: ("function-expression" | "arrow-function" | "ignore");
18277
+ objectProperties?: ("method" | "function-expression" | "arrow-function" | "ignore");
18278
+ reassignedVariables?: ("function-expression" | "arrow-function" | "ignore");
18279
+ typedVariables?: ("function-expression" | "arrow-function" | "ignore");
18280
+ }]; // ----- unicorn/consistent-json-file-read -----
18281
+ type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/default-export-style -----
18282
+ type UnicornDefaultExportStyle = [] | [{
18283
+ functions?: ("inline" | "separate" | "ignore");
18284
+ classes?: ("inline" | "separate" | "ignore");
18285
+ }]; // ----- unicorn/dom-node-dataset -----
18286
+ type UnicornDomNodeDataset = [] | [{
18287
+ preferAttributes?: boolean;
17168
18288
  }]; // ----- unicorn/escape-case -----
17169
18289
  type UnicornEscapeCase = [] | [("uppercase" | "lowercase")]; // ----- unicorn/expiring-todo-comments -----
17170
18290
  type UnicornExpiringTodoComments = [] | [{
17171
18291
  terms?: string[];
17172
18292
  ignore?: unknown[];
17173
- ignoreDates?: boolean;
17174
- ignoreDatesOnPullRequests?: boolean;
18293
+ checkDates?: boolean;
18294
+ checkDatesOnPullRequests?: boolean;
17175
18295
  allowWarningComments?: boolean;
17176
18296
  date?: string;
17177
18297
  }]; // ----- unicorn/explicit-length-check -----
17178
18298
  type UnicornExplicitLengthCheck = [] | [{
17179
18299
  "non-zero"?: ("greater-than" | "not-equal");
17180
- }]; // ----- unicorn/filename-case -----
18300
+ }]; // ----- unicorn/explicit-timer-delay -----
18301
+ type UnicornExplicitTimerDelay = [] | [("always" | "never")]; // ----- unicorn/filename-case -----
17181
18302
  type UnicornFilenameCase = [] | [({
17182
- case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase");
18303
+ case?: ("camelCase" | "camelCaseWithAcronyms" | "snakeCase" | "kebabCase" | "pascalCase");
17183
18304
  ignore?: unknown[];
17184
18305
  multipleFileExtensions?: boolean;
18306
+ checkDirectories?: boolean;
17185
18307
  } | {
17186
18308
  cases?: {
17187
18309
  camelCase?: boolean;
18310
+ camelCaseWithAcronyms?: boolean;
17188
18311
  snakeCase?: boolean;
17189
18312
  kebabCase?: boolean;
17190
18313
  pascalCase?: boolean;
17191
18314
  };
17192
18315
  ignore?: unknown[];
17193
18316
  multipleFileExtensions?: boolean;
17194
- })]; // ----- unicorn/import-style -----
18317
+ checkDirectories?: boolean;
18318
+ })]; // ----- unicorn/id-match -----
18319
+ type UnicornIdMatch = [] | [string] | [string, {
18320
+ properties?: boolean;
18321
+ classFields?: boolean;
18322
+ onlyDeclarations?: boolean;
18323
+ ignoreDestructuring?: boolean;
18324
+ checkNamedSpecifiers?: boolean;
18325
+ }]; // ----- unicorn/import-style -----
17195
18326
  type UnicornImportStyle = [] | [{
17196
18327
  checkImport?: boolean;
17197
18328
  checkDynamicImport?: boolean;
@@ -17214,6 +18345,38 @@ type UnicornIsolatedFunctions = [] | [{
17214
18345
  functions?: string[];
17215
18346
  selectors?: string[];
17216
18347
  comments?: string[];
18348
+ }]; // ----- unicorn/logical-assignment-operators -----
18349
+ type UnicornLogicalAssignmentOperators = (([] | ["always"] | ["always", {
18350
+ enforceForIfStatements?: boolean;
18351
+ }] | ["never"]) & unknown[]); // ----- unicorn/max-nested-calls -----
18352
+ type UnicornMaxNestedCalls = [] | [{
18353
+ max?: number;
18354
+ }]; // ----- unicorn/name-replacements -----
18355
+ type UnicornNameReplacements = [] | [{
18356
+ checkProperties?: boolean;
18357
+ checkVariables?: boolean;
18358
+ checkDefaultAndNamespaceImports?: (boolean | string);
18359
+ checkShorthandImports?: (boolean | string);
18360
+ checkShorthandProperties?: boolean;
18361
+ checkFilenames?: boolean;
18362
+ extendDefaultReplacements?: boolean;
18363
+ replacements?: _UnicornNameReplacements_NameReplacements;
18364
+ extendDefaultAllowList?: boolean;
18365
+ allowList?: _UnicornNameReplacements_BooleanObject;
18366
+ ignore?: unknown[];
18367
+ }];
18368
+ type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
18369
+ interface _UnicornNameReplacements_NameReplacements {
18370
+ [k: string]: _UnicornNameReplacementsReplacements | undefined;
18371
+ }
18372
+ interface _UnicornNameReplacements_BooleanObject {
18373
+ [k: string]: boolean | undefined;
18374
+ }
18375
+ interface _UnicornNameReplacements_BooleanObject {
18376
+ [k: string]: boolean | undefined;
18377
+ } // ----- unicorn/no-array-callback-reference -----
18378
+ type UnicornNoArrayCallbackReference = [] | [{
18379
+ ignore?: string[];
17217
18380
  }]; // ----- unicorn/no-array-reduce -----
17218
18381
  type UnicornNoArrayReduce = [] | [{
17219
18382
  allowSimpleOperations?: boolean;
@@ -17223,28 +18386,48 @@ type UnicornNoArrayReverse = [] | [{
17223
18386
  }]; // ----- unicorn/no-array-sort -----
17224
18387
  type UnicornNoArraySort = [] | [{
17225
18388
  allowExpressionStatement?: boolean;
18389
+ }]; // ----- unicorn/no-empty-file -----
18390
+ type UnicornNoEmptyFile = [] | [{
18391
+ allowComments?: boolean;
17226
18392
  }]; // ----- unicorn/no-instanceof-builtins -----
17227
18393
  type UnicornNoInstanceofBuiltins = [] | [{
17228
18394
  useErrorIsError?: boolean;
17229
18395
  strategy?: ("loose" | "strict");
17230
18396
  include?: string[];
17231
18397
  exclude?: string[];
18398
+ }]; // ----- unicorn/no-invalid-argument-count -----
18399
+ type UnicornNoInvalidArgumentCount = [] | [{
18400
+ [k: string]: (number | [number, ...(number)[]] | {
18401
+ min?: number;
18402
+ max?: number;
18403
+ }) | undefined;
17232
18404
  }]; // ----- unicorn/no-keyword-prefix -----
17233
18405
  type UnicornNoKeywordPrefix = [] | [{
17234
18406
  disallowedPrefixes?: [] | [string];
17235
18407
  checkProperties?: boolean;
17236
18408
  onlyCamelCase?: boolean;
18409
+ }]; // ----- unicorn/no-negated-comparison -----
18410
+ type UnicornNoNegatedComparison = [] | [{
18411
+ checkLogicalExpressions?: boolean;
18412
+ }]; // ----- unicorn/no-non-function-verb-prefix -----
18413
+ type UnicornNoNonFunctionVerbPrefix = [] | [{
18414
+ verbs?: string[];
18415
+ ignore?: unknown[];
17237
18416
  }]; // ----- unicorn/no-null -----
17238
18417
  type UnicornNoNull = [] | [{
18418
+ checkArguments?: boolean;
17239
18419
  checkStrictEquality?: boolean;
17240
18420
  }]; // ----- unicorn/no-typeof-undefined -----
17241
18421
  type UnicornNoTypeofUndefined = [] | [{
17242
18422
  checkGlobalVariables?: boolean;
17243
18423
  }]; // ----- unicorn/no-unnecessary-polyfills -----
17244
18424
  type UnicornNoUnnecessaryPolyfills = [] | [{
17245
- targets: (string | unknown[] | {
18425
+ targets?: (string | unknown[] | {
17246
18426
  [k: string]: unknown | undefined;
17247
18427
  });
18428
+ }]; // ----- unicorn/no-unreadable-array-destructuring -----
18429
+ type UnicornNoUnreadableArrayDestructuring = [] | [{
18430
+ maximumIgnoredElements?: number;
17248
18431
  }]; // ----- unicorn/no-useless-undefined -----
17249
18432
  type UnicornNoUselessUndefined = [] | [{
17250
18433
  checkArguments?: boolean;
@@ -17273,9 +18456,11 @@ type UnicornNumericSeparatorsStyle = [] | [{
17273
18456
  onlyIfContainsSeparator?: boolean;
17274
18457
  minimumDigits?: number;
17275
18458
  groupLength?: number;
18459
+ fractionGroupLength?: number;
17276
18460
  };
17277
18461
  onlyIfContainsSeparator?: boolean;
17278
- }]; // ----- unicorn/prefer-add-event-listener -----
18462
+ }]; // ----- unicorn/operator-assignment -----
18463
+ type UnicornOperatorAssignment = [] | [("always" | "never")]; // ----- unicorn/prefer-add-event-listener -----
17279
18464
  type UnicornPreferAddEventListener = [] | [{
17280
18465
  excludedPackages?: string[];
17281
18466
  }]; // ----- unicorn/prefer-array-find -----
@@ -17288,9 +18473,22 @@ type UnicornPreferArrayFlat = [] | [{
17288
18473
  type UnicornPreferAt = [] | [{
17289
18474
  getLastElementFunctions?: unknown[];
17290
18475
  checkAllIndexAccess?: boolean;
18476
+ }]; // ----- unicorn/prefer-continue -----
18477
+ type UnicornPreferContinue = [] | [{
18478
+ maximumStatements?: number;
18479
+ }]; // ----- unicorn/prefer-early-return -----
18480
+ type UnicornPreferEarlyReturn = [] | [{
18481
+ maximumStatements?: number;
17291
18482
  }]; // ----- unicorn/prefer-export-from -----
17292
18483
  type UnicornPreferExportFrom = [] | [{
17293
- ignoreUsedVariables?: boolean;
18484
+ checkUsedVariables?: boolean;
18485
+ }]; // ----- unicorn/prefer-includes-over-repeated-comparisons -----
18486
+ type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
18487
+ minimumComparisons?: number;
18488
+ }]; // ----- unicorn/prefer-minimal-ternary -----
18489
+ type UnicornPreferMinimalTernary = [] | [{
18490
+ checkVaryingCallee?: boolean;
18491
+ checkComputedMemberAccess?: boolean;
17294
18492
  }]; // ----- unicorn/prefer-number-properties -----
17295
18493
  type UnicornPreferNumberProperties = [] | [{
17296
18494
  checkInfinity?: boolean;
@@ -17298,9 +18496,22 @@ type UnicornPreferNumberProperties = [] | [{
17298
18496
  }]; // ----- unicorn/prefer-object-from-entries -----
17299
18497
  type UnicornPreferObjectFromEntries = [] | [{
17300
18498
  functions?: unknown[];
18499
+ }]; // ----- unicorn/prefer-query-selector -----
18500
+ type UnicornPreferQuerySelector = [] | [{
18501
+ allowWithVariables?: boolean;
18502
+ }]; // ----- unicorn/prefer-queue-microtask -----
18503
+ type UnicornPreferQueueMicrotask = [] | [{
18504
+ checkSetImmediate?: boolean;
18505
+ checkSetTimeout?: boolean;
18506
+ }]; // ----- unicorn/prefer-set-has -----
18507
+ type UnicornPreferSetHas = [] | [{
18508
+ minimumItems?: number;
17301
18509
  }]; // ----- unicorn/prefer-single-call -----
17302
18510
  type UnicornPreferSingleCall = [] | [{
17303
18511
  ignore?: unknown[];
18512
+ }]; // ----- unicorn/prefer-string-repeat -----
18513
+ type UnicornPreferStringRepeat = [] | [{
18514
+ minimumRepetitions?: number;
17304
18515
  }]; // ----- unicorn/prefer-structured-clone -----
17305
18516
  type UnicornPreferStructuredClone = [] | [{
17306
18517
  functions?: unknown[];
@@ -17308,42 +18519,29 @@ type UnicornPreferStructuredClone = [] | [{
17308
18519
  type UnicornPreferSwitch = [] | [{
17309
18520
  minimumCases?: number;
17310
18521
  emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case");
18522
+ }]; // ----- unicorn/prefer-temporal -----
18523
+ type UnicornPreferTemporal = [] | [{
18524
+ checkDateNow?: boolean;
18525
+ checkReferences?: boolean;
18526
+ checkMethods?: boolean;
17311
18527
  }]; // ----- unicorn/prefer-ternary -----
17312
- type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/prevent-abbreviations -----
17313
- type UnicornPreventAbbreviations = [] | [{
17314
- checkProperties?: boolean;
17315
- checkVariables?: boolean;
17316
- checkDefaultAndNamespaceImports?: (boolean | string);
17317
- checkShorthandImports?: (boolean | string);
17318
- checkShorthandProperties?: boolean;
17319
- checkFilenames?: boolean;
17320
- extendDefaultReplacements?: boolean;
17321
- replacements?: _UnicornPreventAbbreviations_Abbreviations;
17322
- extendDefaultAllowList?: boolean;
17323
- allowList?: _UnicornPreventAbbreviations_BooleanObject;
17324
- ignore?: unknown[];
17325
- }];
17326
- type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined;
17327
- interface _UnicornPreventAbbreviations_Abbreviations {
17328
- [k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
17329
- }
17330
- interface _UnicornPreventAbbreviations_BooleanObject {
17331
- [k: string]: boolean | undefined;
17332
- }
17333
- interface _UnicornPreventAbbreviations_BooleanObject {
17334
- [k: string]: boolean | undefined;
17335
- } // ----- unicorn/relative-url-style -----
17336
- type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/string-content -----
18528
+ type UnicornPreferTernary = [] | [("always" | "only-single-line")]; // ----- unicorn/relative-url-style -----
18529
+ type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/require-css-escape -----
18530
+ type UnicornRequireCssEscape = [] | [{
18531
+ checkAllSelectors?: boolean;
18532
+ }]; // ----- unicorn/string-content -----
17337
18533
  type UnicornStringContent = [] | [{
17338
18534
  patterns?: {
17339
18535
  [k: string]: (string | {
17340
18536
  suggest: string;
17341
18537
  fix?: boolean;
18538
+ caseSensitive?: boolean;
17342
18539
  message?: string;
17343
18540
  }) | undefined;
17344
18541
  };
18542
+ selectors?: string[];
17345
18543
  }]; // ----- unicorn/switch-case-braces -----
17346
- type UnicornSwitchCaseBraces = [] | [("always" | "avoid")]; // ----- unicorn/template-indent -----
18544
+ type UnicornSwitchCaseBraces = [] | [("always" | "avoid" | "single-statement")]; // ----- unicorn/template-indent -----
17347
18545
  type UnicornTemplateIndent = [] | [{
17348
18546
  indent?: (string | number);
17349
18547
  tags?: string[];
@@ -17353,6 +18551,9 @@ type UnicornTemplateIndent = [] | [{
17353
18551
  }]; // ----- unicorn/text-encoding-identifier-case -----
17354
18552
  type UnicornTextEncodingIdentifierCase = [] | [{
17355
18553
  withDash?: boolean;
18554
+ }]; // ----- unicorn/try-complexity -----
18555
+ type UnicornTryComplexity = [] | [{
18556
+ max?: number;
17356
18557
  }]; // ----- unocss/enforce-class-compile -----
17357
18558
  type UnocssEnforceClassCompile = [] | [{
17358
18559
  prefix?: string;
@@ -18694,6 +19895,10 @@ type YamlNoMultipleEmptyLines = [] | [{
18694
19895
  max: number;
18695
19896
  maxEOF?: number;
18696
19897
  maxBOF?: number;
19898
+ }]; // ----- yaml/no-trailing-spaces -----
19899
+ type YamlNoTrailingSpaces = [] | [{
19900
+ skipBlankLines?: boolean;
19901
+ ignoreComments?: boolean;
18697
19902
  }]; // ----- yaml/plain-scalar -----
18698
19903
  type YamlPlainScalar = [] | [("always" | "never")] | [("always" | "never"), {
18699
19904
  ignorePatterns?: string[];
@@ -18788,7 +19993,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
18788
19993
  exceptRange?: boolean;
18789
19994
  onlyEquality?: boolean;
18790
19995
  }]; // Names of all the configs
18791
- type ConfigNames = 'config/gitignore' | 'config/ignores' | 'config/javascript/setup' | 'config/javascript/rules' | 'config/eslint-comments/rules' | 'config/node/setup' | 'config/node/rules' | 'config/imports/rules' | 'config/command/rules' | 'config/perfectionist/setup' | 'config/imports/rules' | 'config/e18e/rules' | 'config/unicorn/rules' | 'config/jsdoc/rules' | 'config/jsx/setup' | 'config/typescript/setup' | 'config/typescript/parser' | 'config/typescript/type-aware-parser' | 'config/typescript/rules' | 'config/typescript/rules-type-aware' | 'config/typescript/erasable-syntax-only' | 'config/stylistic/rules' | 'config/regexp/rules' | 'config/test/setup' | 'config/test/rules' | 'config/storybook/setup' | 'config/vue/setup' | 'config/vue/rules' | 'config/react/setup' | 'config/react/rules' | 'config/react/typescript' | 'config/react/type-aware-rules' | 'config/nextjs/setup' | 'config/nextjs/rules' | 'config/solid/setup' | 'config/solid/rules' | 'config/svelte/setup' | 'config/svelte/rules' | 'config/unocss' | 'config/astro/setup' | 'config/astro/rules' | 'config/jsonc/setup' | 'config/jsonc/rules' | 'config/sort/package-json' | 'config/sort/tsconfig-json' | 'config/pnpm/package-json' | 'config/pnpm/pnpm-workspace-yaml' | 'config/pnpm/pnpm-workspace-yaml-sort' | 'config/yaml/setup' | 'config/yaml/rules' | 'config/yaml/pnpm-workspace' | 'config/toml/setup' | 'config/toml/rules' | 'config/markdown/setup' | 'config/markdown/processor' | 'config/markdown/parser' | 'config/markdown/rules' | 'config/markdown/disables' | 'config/formatter/setup' | 'config/formatter/css' | 'config/formatter/scss' | 'config/formatter/less' | 'config/formatter/html' | 'config/formatter/xml' | 'config/formatter/svg' | 'config/formatter/markdown' | 'config/formatter/astro' | 'config/formatter/astro/disables' | 'config/formatter/graphql' | 'config/disables/scripts' | 'config/disables/cli' | 'config/disables/bin' | 'config/disables/dts' | 'config/disables/cjs' | 'config/disables/config-files';
19996
+ type ConfigNames = 'config/gitignore' | 'config/ignores' | 'config/javascript/setup' | 'config/javascript/rules' | 'config/eslint-comments/rules' | 'config/node/setup' | 'config/node/rules' | 'config/imports/rules' | 'config/command/rules' | 'config/perfectionist/setup' | 'config/imports/rules' | 'config/e18e/rules' | 'config/unicorn/rules' | 'config/jsdoc/rules' | 'config/jsx/setup' | 'config/typescript/setup' | 'config/typescript/parser' | 'config/typescript/type-aware-parser' | 'config/typescript/rules' | 'config/typescript/rules-type-aware' | 'config/typescript/erasable-syntax-only' | 'config/stylistic/rules' | 'config/regexp/rules' | 'config/sanity/setup' | 'config/sanity/rules' | 'config/test/setup' | 'config/test/rules' | 'config/storybook/setup' | 'config/vue/setup' | 'config/vue/rules' | 'config/react/setup' | 'config/react/rules' | 'config/react/typescript' | 'config/react/type-aware-rules' | 'config/nextjs/setup' | 'config/nextjs/rules' | 'config/solid/setup' | 'config/solid/rules' | 'config/svelte/setup' | 'config/svelte/rules' | 'config/unocss' | 'config/astro/setup' | 'config/astro/rules' | 'config/jsonc/setup' | 'config/jsonc/rules' | 'config/sort/package-json' | 'config/sort/tsconfig-json' | 'config/pnpm/package-json' | 'config/pnpm/pnpm-workspace-yaml' | 'config/pnpm/pnpm-workspace-yaml-sort' | 'config/yaml/setup' | 'config/yaml/rules' | 'config/yaml/pnpm-workspace' | 'config/toml/setup' | 'config/toml/rules' | 'config/markdown/setup' | 'config/markdown/processor' | 'config/markdown/parser' | 'config/markdown/rules' | 'config/markdown/disables' | 'config/formatter/setup' | 'config/formatter/css' | 'config/formatter/scss' | 'config/formatter/less' | 'config/formatter/html' | 'config/formatter/xml' | 'config/formatter/svg' | 'config/formatter/markdown' | 'config/formatter/astro' | 'config/formatter/astro/disables' | 'config/formatter/graphql' | 'config/disables/scripts' | 'config/disables/cli' | 'config/disables/bin' | 'config/disables/dts' | 'config/disables/cjs' | 'config/disables/config-files';
18792
19997
  //#endregion
18793
19998
  //#region src/vendor/prettier-types.d.ts
18794
19999
  /**
@@ -19051,6 +20256,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
19051
20256
  markdown?: TypedFlatConfigItem['rules'];
19052
20257
  nextjs?: TypedFlatConfigItem['rules'];
19053
20258
  react?: TypedFlatConfigItem['rules'];
20259
+ sanity?: TypedFlatConfigItem['rules'];
19054
20260
  storybook?: TypedFlatConfigItem['rules'];
19055
20261
  stylistic?: TypedFlatConfigItem['rules'];
19056
20262
  svelte?: TypedFlatConfigItem['rules'];
@@ -19090,6 +20296,15 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
19090
20296
  * @default true
19091
20297
  */
19092
20298
  regexp?: (OptionsOverrides & OptionsRegExp) | boolean;
20299
+ /**
20300
+ * Enable Sanity rules.
20301
+ *
20302
+ * Requires installing:
20303
+ * - `@sanity-labs/eslint-plugin`
20304
+ *
20305
+ * @default false
20306
+ */
20307
+ sanity?: boolean | OptionsSanity;
19093
20308
  /**
19094
20309
  * Enable solid rules.
19095
20310
  *
@@ -19389,6 +20604,54 @@ interface OptionsRegExp {
19389
20604
  */
19390
20605
  level?: 'error' | 'warn';
19391
20606
  }
20607
+ interface OptionsSanity extends OptionsFiles, OptionsOverrides {
20608
+ /**
20609
+ * Working directory for resolving the Sanity schema path.
20610
+ *
20611
+ * Use this when linting from a monorepo root while Sanity schema files live in a nested app.
20612
+ *
20613
+ * @example
20614
+ * ```ts
20615
+ * sanity: {
20616
+ * cwd: 'apps/studio',
20617
+ * schemaPath: 'schema.json',
20618
+ * },
20619
+ * ```
20620
+ *
20621
+ * @default process.cwd()
20622
+ */
20623
+ cwd?: string;
20624
+ /**
20625
+ * Sanity rule preset.
20626
+ *
20627
+ * - `recommended`: Balanced GROQ and schema defaults.
20628
+ * - `groq`: GROQ rules only.
20629
+ * - `schema`: Schema rules only.
20630
+ * - `performance`: Performance-focused GROQ rules only.
20631
+ * - `strict`: All rules as errors.
20632
+ *
20633
+ * @default 'recommended'
20634
+ */
20635
+ preset?: 'groq' | 'performance' | 'recommended' | 'schema' | 'strict';
20636
+ /**
20637
+ * Path to the extracted Sanity schema JSON file for schema-aware GROQ rules.
20638
+ *
20639
+ * Relative paths are resolved from `cwd`.
20640
+ *
20641
+ * @example
20642
+ * ```ts
20643
+ * sanity: {
20644
+ * cwd: 'apps/studio',
20645
+ * schemaPath: 'schema.json',
20646
+ * },
20647
+ * ```
20648
+ *
20649
+ * @see https://github.com/sanity-labs/sanity-lint/tree/main/packages/eslint-plugin#schema-aware-linting
20650
+ *
20651
+ * @default undefined
20652
+ */
20653
+ schemaPath?: string;
20654
+ }
19392
20655
  interface OptionsStylistic {
19393
20656
  /**
19394
20657
  * Enable stylistic rules.
@@ -19679,6 +20942,9 @@ declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScr
19679
20942
  //#region src/configs/regexp.d.ts
19680
20943
  declare function regexp(options?: OptionsOverrides & OptionsRegExp): Promise<TypedFlatConfigItem[]>;
19681
20944
  //#endregion
20945
+ //#region src/configs/sanity.d.ts
20946
+ declare function sanity(options?: OptionsFiles & OptionsOverrides & OptionsSanity): Promise<TypedFlatConfigItem[]>;
20947
+ //#endregion
19682
20948
  //#region src/configs/solid.d.ts
19683
20949
  declare function solid(options?: OptionsFiles & OptionsHasTypeScript & OptionsOverrides & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
19684
20950
  //#endregion
@@ -19799,6 +21065,7 @@ declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
19799
21065
  declare const GLOB_GRAPHQL = "**/*.{g,graph}ql";
19800
21066
  declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
19801
21067
  declare const GLOB_STORYBOOK: string[];
21068
+ declare const GLOB_SANITY: string[];
19802
21069
  declare const GLOB_TESTS: string[];
19803
21070
  declare const GLOB_ALL_SRC: string[];
19804
21071
  declare const GLOB_EXCLUDE: string[];
@@ -19921,4 +21188,4 @@ declare function renameRules(rules: Record<string, any>, map: Record<string, str
19921
21188
  */
19922
21189
  declare function toArray<T>(value: T | T[]): T[];
19923
21190
  //#endregion
19924
- export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SEARCH_EXCLUDE, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsE18e, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsNextjs, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTailwindcss, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, PACKAGE_NAME, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, astro, combine, command, comments, config, config as inferno, defaultPluginRenaming, disables, e18e, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInCursorAgent, isInEditorEnv, isInGitHooksOrLintStaged, isInVSCodeESLintExtension, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
21191
+ export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SANITY, GLOB_SCSS, GLOB_SEARCH_EXCLUDE, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsE18e, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsNextjs, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsSanity, OptionsStylistic, OptionsTailwindcss, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, PACKAGE_NAME, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, StylisticOptions, TypedFlatConfigItem, astro, combine, command, comments, config, config as inferno, defaultPluginRenaming, disables, e18e, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInCursorAgent, isInEditorEnv, isInGitHooksOrLintStaged, isInVSCodeESLintExtension, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, normalizeRules, packageExportsSortOrder, packageSortOrder, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sanity, solid, sortPackageJson, sortTsconfig, storybook, stylistic, svelte, tailwindcss, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };