@storm-software/eslint 0.78.3 → 0.78.5

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/preset.d.mts CHANGED
@@ -798,6 +798,686 @@ interface RuleOptions {
798
798
  * @see https://tsdoc.org/pages/packages/eslint-plugin-tsdoc
799
799
  */
800
800
  'tsdoc/syntax'?: Linter.RuleEntry<[]>
801
+ /**
802
+ * Improve regexes by making them shorter, consistent, and safer.
803
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/better-regex.md
804
+ */
805
+ 'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
806
+ /**
807
+ * Enforce a specific parameter name in catch clauses.
808
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/catch-error-name.md
809
+ */
810
+ 'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
811
+ /**
812
+ * Use destructured variables over properties.
813
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-destructuring.md
814
+ */
815
+ 'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
816
+ /**
817
+ * Prefer consistent types when spreading a ternary in an array literal.
818
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-empty-array-spread.md
819
+ */
820
+ 'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
821
+ /**
822
+ * Move function definitions to the highest possible scope.
823
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-function-scoping.md
824
+ */
825
+ 'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
826
+ /**
827
+ * Enforce correct `Error` subclassing.
828
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/custom-error-definition.md
829
+ */
830
+ 'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
831
+ /**
832
+ * Enforce no spaces between braces.
833
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/empty-brace-spaces.md
834
+ */
835
+ 'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
836
+ /**
837
+ * Enforce passing a `message` value when creating a built-in error.
838
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/error-message.md
839
+ */
840
+ 'unicorn/error-message'?: Linter.RuleEntry<[]>
841
+ /**
842
+ * Require escape sequences to use uppercase values.
843
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/escape-case.md
844
+ */
845
+ 'unicorn/escape-case'?: Linter.RuleEntry<[]>
846
+ /**
847
+ * Add expiration conditions to TODO comments.
848
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/expiring-todo-comments.md
849
+ */
850
+ 'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
851
+ /**
852
+ * Enforce explicitly comparing the `length` or `size` property of a value.
853
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/explicit-length-check.md
854
+ */
855
+ 'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
856
+ /**
857
+ * Enforce a case style for filenames.
858
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/filename-case.md
859
+ */
860
+ 'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
861
+ /**
862
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#import-index
863
+ * @deprecated
864
+ */
865
+ 'unicorn/import-index'?: Linter.RuleEntry<[]>
866
+ /**
867
+ * Enforce specific import styles per module.
868
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/import-style.md
869
+ */
870
+ 'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
871
+ /**
872
+ * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
873
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/new-for-builtins.md
874
+ */
875
+ 'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
876
+ /**
877
+ * Enforce specifying rules to disable in `eslint-disable` comments.
878
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-abusive-eslint-disable.md
879
+ */
880
+ 'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
881
+ /**
882
+ * Disallow anonymous functions and classes as the default export.
883
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-anonymous-default-export.md
884
+ */
885
+ 'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
886
+ /**
887
+ * Prevent passing a function reference directly to iterator methods.
888
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-callback-reference.md
889
+ */
890
+ 'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
891
+ /**
892
+ * Prefer `for…of` over the `forEach` method.
893
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-for-each.md
894
+ */
895
+ 'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
896
+ /**
897
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-array-instanceof
898
+ * @deprecated
899
+ */
900
+ 'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
901
+ /**
902
+ * Disallow using the `this` argument in array methods.
903
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-method-this-argument.md
904
+ */
905
+ 'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
906
+ /**
907
+ * Enforce combining multiple `Array#push()` into one call.
908
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-push-push.md
909
+ */
910
+ 'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
911
+ /**
912
+ * Disallow `Array#reduce()` and `Array#reduceRight()`.
913
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-reduce.md
914
+ */
915
+ 'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
916
+ /**
917
+ * Disallow member access from await expression.
918
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-expression-member.md
919
+ */
920
+ 'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
921
+ /**
922
+ * Disallow using `await` in `Promise` method parameters.
923
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-in-promise-methods.md
924
+ */
925
+ 'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
926
+ /**
927
+ * Do not use leading/trailing space between `console.log` parameters.
928
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-console-spaces.md
929
+ */
930
+ 'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
931
+ /**
932
+ * Do not use `document.cookie` directly.
933
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-document-cookie.md
934
+ */
935
+ 'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
936
+ /**
937
+ * Disallow empty files.
938
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-empty-file.md
939
+ */
940
+ 'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
941
+ /**
942
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
943
+ * @deprecated
944
+ */
945
+ 'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
946
+ /**
947
+ * Do not use a `for` loop that can be replaced with a `for-of` loop.
948
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-for-loop.md
949
+ */
950
+ 'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
951
+ /**
952
+ * Enforce the use of Unicode escapes instead of hexadecimal escapes.
953
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-hex-escape.md
954
+ */
955
+ 'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
956
+ /**
957
+ * Require `Array.isArray()` instead of `instanceof Array`.
958
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-instanceof-array.md
959
+ */
960
+ 'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
961
+ /**
962
+ * Disallow invalid options in `fetch()` and `new Request()`.
963
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-fetch-options.md
964
+ */
965
+ 'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
966
+ /**
967
+ * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
968
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-remove-event-listener.md
969
+ */
970
+ 'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
971
+ /**
972
+ * Disallow identifiers starting with `new` or `class`.
973
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-keyword-prefix.md
974
+ */
975
+ 'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
976
+ /**
977
+ * Disallow `if` statements as the only statement in `if` blocks without `else`.
978
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-lonely-if.md
979
+ */
980
+ 'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
981
+ /**
982
+ * Disallow a magic number as the `depth` argument in `Array#flat(…).`
983
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-magic-array-flat-depth.md
984
+ */
985
+ 'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
986
+ /**
987
+ * Disallow negated conditions.
988
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negated-condition.md
989
+ */
990
+ 'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
991
+ /**
992
+ * Disallow negated expression in equality check.
993
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negation-in-equality-check.md
994
+ */
995
+ 'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
996
+ /**
997
+ * Disallow nested ternary expressions.
998
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-nested-ternary.md
999
+ */
1000
+ 'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
1001
+ /**
1002
+ * Disallow `new Array()`.
1003
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-array.md
1004
+ */
1005
+ 'unicorn/no-new-array'?: Linter.RuleEntry<[]>
1006
+ /**
1007
+ * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
1008
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-buffer.md
1009
+ */
1010
+ 'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
1011
+ /**
1012
+ * Disallow the use of the `null` literal.
1013
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-null.md
1014
+ */
1015
+ 'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
1016
+ /**
1017
+ * Disallow the use of objects as default parameters.
1018
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-object-as-default-parameter.md
1019
+ */
1020
+ 'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
1021
+ /**
1022
+ * Disallow `process.exit()`.
1023
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-process-exit.md
1024
+ */
1025
+ 'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
1026
+ /**
1027
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-reduce
1028
+ * @deprecated
1029
+ */
1030
+ 'unicorn/no-reduce'?: Linter.RuleEntry<[]>
1031
+ /**
1032
+ * Disallow passing single-element arrays to `Promise` methods.
1033
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-single-promise-in-promise-methods.md
1034
+ */
1035
+ 'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
1036
+ /**
1037
+ * Disallow classes that only have static members.
1038
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-static-only-class.md
1039
+ */
1040
+ 'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
1041
+ /**
1042
+ * Disallow `then` property.
1043
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-thenable.md
1044
+ */
1045
+ 'unicorn/no-thenable'?: Linter.RuleEntry<[]>
1046
+ /**
1047
+ * Disallow assigning `this` to a variable.
1048
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-this-assignment.md
1049
+ */
1050
+ 'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
1051
+ /**
1052
+ * Disallow comparing `undefined` using `typeof`.
1053
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-typeof-undefined.md
1054
+ */
1055
+ 'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
1056
+ /**
1057
+ * Disallow awaiting non-promise values.
1058
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-await.md
1059
+ */
1060
+ 'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
1061
+ /**
1062
+ * Enforce the use of built-in methods instead of unnecessary polyfills.
1063
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-polyfills.md
1064
+ */
1065
+ 'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
1066
+ /**
1067
+ * Disallow unreadable array destructuring.
1068
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-array-destructuring.md
1069
+ */
1070
+ 'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
1071
+ /**
1072
+ * Disallow unreadable IIFEs.
1073
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-iife.md
1074
+ */
1075
+ 'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
1076
+ /**
1077
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-unsafe-regex
1078
+ * @deprecated
1079
+ */
1080
+ 'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
1081
+ /**
1082
+ * Disallow unused object properties.
1083
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unused-properties.md
1084
+ */
1085
+ 'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
1086
+ /**
1087
+ * Disallow useless fallback when spreading in object literals.
1088
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-fallback-in-spread.md
1089
+ */
1090
+ 'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
1091
+ /**
1092
+ * Disallow useless array length check.
1093
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-length-check.md
1094
+ */
1095
+ 'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
1096
+ /**
1097
+ * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
1098
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-promise-resolve-reject.md
1099
+ */
1100
+ 'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
1101
+ /**
1102
+ * Disallow unnecessary spread.
1103
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-spread.md
1104
+ */
1105
+ 'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
1106
+ /**
1107
+ * Disallow useless case in switch statements.
1108
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-switch-case.md
1109
+ */
1110
+ 'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
1111
+ /**
1112
+ * Disallow useless `undefined`.
1113
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-undefined.md
1114
+ */
1115
+ 'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
1116
+ /**
1117
+ * Disallow number literals with zero fractions or dangling dots.
1118
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-zero-fractions.md
1119
+ */
1120
+ 'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
1121
+ /**
1122
+ * Enforce proper case for numeric literals.
1123
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/number-literal-case.md
1124
+ */
1125
+ 'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
1126
+ /**
1127
+ * Enforce the style of numeric separators by correctly grouping digits.
1128
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/numeric-separators-style.md
1129
+ */
1130
+ 'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
1131
+ /**
1132
+ * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
1133
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-add-event-listener.md
1134
+ */
1135
+ 'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
1136
+ /**
1137
+ * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
1138
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-find.md
1139
+ */
1140
+ 'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
1141
+ /**
1142
+ * Prefer `Array#flat()` over legacy techniques to flatten arrays.
1143
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat.md
1144
+ */
1145
+ 'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
1146
+ /**
1147
+ * Prefer `.flatMap(…)` over `.map(…).flat()`.
1148
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat-map.md
1149
+ */
1150
+ 'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
1151
+ /**
1152
+ * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
1153
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-index-of.md
1154
+ */
1155
+ 'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
1156
+ /**
1157
+ * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
1158
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-some.md
1159
+ */
1160
+ 'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
1161
+ /**
1162
+ * Prefer `.at()` method for index access and `String#charAt()`.
1163
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-at.md
1164
+ */
1165
+ 'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
1166
+ /**
1167
+ * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
1168
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-blob-reading-methods.md
1169
+ */
1170
+ 'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
1171
+ /**
1172
+ * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
1173
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-code-point.md
1174
+ */
1175
+ 'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
1176
+ /**
1177
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-dataset
1178
+ * @deprecated
1179
+ */
1180
+ 'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
1181
+ /**
1182
+ * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
1183
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-date-now.md
1184
+ */
1185
+ 'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
1186
+ /**
1187
+ * Prefer default parameters over reassignment.
1188
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-default-parameters.md
1189
+ */
1190
+ 'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
1191
+ /**
1192
+ * Prefer `Node#append()` over `Node#appendChild()`.
1193
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-append.md
1194
+ */
1195
+ 'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
1196
+ /**
1197
+ * Prefer using `.dataset` on DOM elements over calling attribute methods.
1198
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-dataset.md
1199
+ */
1200
+ 'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
1201
+ /**
1202
+ * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
1203
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-remove.md
1204
+ */
1205
+ 'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
1206
+ /**
1207
+ * Prefer `.textContent` over `.innerText`.
1208
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-text-content.md
1209
+ */
1210
+ 'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
1211
+ /**
1212
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-event-key
1213
+ * @deprecated
1214
+ */
1215
+ 'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
1216
+ /**
1217
+ * Prefer `EventTarget` over `EventEmitter`.
1218
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-event-target.md
1219
+ */
1220
+ 'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
1221
+ /**
1222
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
1223
+ * @deprecated
1224
+ */
1225
+ 'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
1226
+ /**
1227
+ * Prefer `export…from` when re-exporting.
1228
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-export-from.md
1229
+ */
1230
+ 'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
1231
+ /**
1232
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-flat-map
1233
+ * @deprecated
1234
+ */
1235
+ 'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
1236
+ /**
1237
+ * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
1238
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-includes.md
1239
+ */
1240
+ 'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
1241
+ /**
1242
+ * Prefer reading a JSON file as a buffer.
1243
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-json-parse-buffer.md
1244
+ */
1245
+ 'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
1246
+ /**
1247
+ * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
1248
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-keyboard-event-key.md
1249
+ */
1250
+ 'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
1251
+ /**
1252
+ * Prefer using a logical operator over a ternary.
1253
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-logical-operator-over-ternary.md
1254
+ */
1255
+ 'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
1256
+ /**
1257
+ * Enforce the use of `Math.trunc` instead of bitwise operators.
1258
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-math-trunc.md
1259
+ */
1260
+ 'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
1261
+ /**
1262
+ * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
1263
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-dom-apis.md
1264
+ */
1265
+ 'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
1266
+ /**
1267
+ * Prefer modern `Math` APIs over legacy patterns.
1268
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-math-apis.md
1269
+ */
1270
+ 'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
1271
+ /**
1272
+ * Prefer JavaScript modules (ESM) over CommonJS.
1273
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-module.md
1274
+ */
1275
+ 'unicorn/prefer-module'?: Linter.RuleEntry<[]>
1276
+ /**
1277
+ * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
1278
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-native-coercion-functions.md
1279
+ */
1280
+ 'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
1281
+ /**
1282
+ * Prefer negative index over `.length - index` when possible.
1283
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-negative-index.md
1284
+ */
1285
+ 'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
1286
+ /**
1287
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-append
1288
+ * @deprecated
1289
+ */
1290
+ 'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
1291
+ /**
1292
+ * Prefer using the `node:` protocol when importing Node.js builtin modules.
1293
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-node-protocol.md
1294
+ */
1295
+ 'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
1296
+ /**
1297
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-remove
1298
+ * @deprecated
1299
+ */
1300
+ 'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
1301
+ /**
1302
+ * Prefer `Number` static properties over global ones.
1303
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-number-properties.md
1304
+ */
1305
+ 'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
1306
+ /**
1307
+ * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
1308
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-object-from-entries.md
1309
+ */
1310
+ 'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
1311
+ /**
1312
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-object-has-own
1313
+ * @deprecated
1314
+ */
1315
+ 'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
1316
+ /**
1317
+ * Prefer omitting the `catch` binding parameter.
1318
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-optional-catch-binding.md
1319
+ */
1320
+ 'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
1321
+ /**
1322
+ * Prefer borrowing methods from the prototype instead of the instance.
1323
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-prototype-methods.md
1324
+ */
1325
+ 'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
1326
+ /**
1327
+ * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
1328
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-query-selector.md
1329
+ */
1330
+ 'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
1331
+ /**
1332
+ * Prefer `Reflect.apply()` over `Function#apply()`.
1333
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-reflect-apply.md
1334
+ */
1335
+ 'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
1336
+ /**
1337
+ * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
1338
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-regexp-test.md
1339
+ */
1340
+ 'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
1341
+ /**
1342
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-replace-all
1343
+ * @deprecated
1344
+ */
1345
+ 'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
1346
+ /**
1347
+ * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
1348
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-has.md
1349
+ */
1350
+ 'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
1351
+ /**
1352
+ * Prefer using `Set#size` instead of `Array#length`.
1353
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-size.md
1354
+ */
1355
+ 'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
1356
+ /**
1357
+ * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
1358
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-spread.md
1359
+ */
1360
+ 'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
1361
+ /**
1362
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
1363
+ * @deprecated
1364
+ */
1365
+ 'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
1366
+ /**
1367
+ * Prefer using the `String.raw` tag to avoid escaping `\`.
1368
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-raw.md
1369
+ */
1370
+ 'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
1371
+ /**
1372
+ * Prefer `String#replaceAll()` over regex searches with the global flag.
1373
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-replace-all.md
1374
+ */
1375
+ 'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
1376
+ /**
1377
+ * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
1378
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-slice.md
1379
+ */
1380
+ 'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
1381
+ /**
1382
+ * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
1383
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-starts-ends-with.md
1384
+ */
1385
+ 'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
1386
+ /**
1387
+ * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
1388
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-trim-start-end.md
1389
+ */
1390
+ 'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
1391
+ /**
1392
+ * Prefer using `structuredClone` to create a deep clone.
1393
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-structured-clone.md
1394
+ */
1395
+ 'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
1396
+ /**
1397
+ * Prefer `switch` over multiple `else-if`.
1398
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-switch.md
1399
+ */
1400
+ 'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
1401
+ /**
1402
+ * Prefer ternary expressions over simple `if-else` statements.
1403
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-ternary.md
1404
+ */
1405
+ 'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
1406
+ /**
1407
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-text-content
1408
+ * @deprecated
1409
+ */
1410
+ 'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
1411
+ /**
1412
+ * Prefer top-level await over top-level promises and async function calls.
1413
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-top-level-await.md
1414
+ */
1415
+ 'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
1416
+ /**
1417
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-trim-start-end
1418
+ * @deprecated
1419
+ */
1420
+ 'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
1421
+ /**
1422
+ * Enforce throwing `TypeError` in type checking conditions.
1423
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-type-error.md
1424
+ */
1425
+ 'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
1426
+ /**
1427
+ * Prevent abbreviations.
1428
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prevent-abbreviations.md
1429
+ */
1430
+ 'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
1431
+ /**
1432
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#regex-shorthand
1433
+ * @deprecated
1434
+ */
1435
+ 'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
1436
+ /**
1437
+ * Enforce consistent relative URL style.
1438
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/relative-url-style.md
1439
+ */
1440
+ 'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
1441
+ /**
1442
+ * Enforce using the separator argument with `Array#join()`.
1443
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-array-join-separator.md
1444
+ */
1445
+ 'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
1446
+ /**
1447
+ * Enforce using the digits argument with `Number#toFixed()`.
1448
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-number-to-fixed-digits-argument.md
1449
+ */
1450
+ 'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
1451
+ /**
1452
+ * Enforce using the `targetOrigin` argument with `window.postMessage()`.
1453
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-post-message-target-origin.md
1454
+ */
1455
+ 'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
1456
+ /**
1457
+ * Enforce better string content.
1458
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/string-content.md
1459
+ */
1460
+ 'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
1461
+ /**
1462
+ * Enforce consistent brace style for `case` clauses.
1463
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/switch-case-braces.md
1464
+ */
1465
+ 'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
1466
+ /**
1467
+ * Fix whitespace-insensitive template indentation.
1468
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/template-indent.md
1469
+ */
1470
+ 'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
1471
+ /**
1472
+ * Enforce consistent case for text encoding identifiers.
1473
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/text-encoding-identifier-case.md
1474
+ */
1475
+ 'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
1476
+ /**
1477
+ * Require `new` when creating an error.
1478
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md
1479
+ */
1480
+ 'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
801
1481
  /**
802
1482
  * require or disallow block style mappings.
803
1483
  * @see https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html
@@ -2579,6 +3259,204 @@ type PrettierPrettier = []|[{
2579
3259
  }
2580
3260
  [k: string]: unknown | undefined
2581
3261
  }]
3262
+ // ----- unicorn/better-regex -----
3263
+ type UnicornBetterRegex = []|[{
3264
+ sortCharacterClasses?: boolean
3265
+ }]
3266
+ // ----- unicorn/catch-error-name -----
3267
+ type UnicornCatchErrorName = []|[{
3268
+ name?: string
3269
+ ignore?: unknown[]
3270
+ }]
3271
+ // ----- unicorn/consistent-function-scoping -----
3272
+ type UnicornConsistentFunctionScoping = []|[{
3273
+ checkArrowFunctions?: boolean
3274
+ }]
3275
+ // ----- unicorn/expiring-todo-comments -----
3276
+ type UnicornExpiringTodoComments = []|[{
3277
+ terms?: string[]
3278
+ ignore?: unknown[]
3279
+ ignoreDatesOnPullRequests?: boolean
3280
+ allowWarningComments?: boolean
3281
+ date?: string
3282
+ }]
3283
+ // ----- unicorn/explicit-length-check -----
3284
+ type UnicornExplicitLengthCheck = []|[{
3285
+ "non-zero"?: ("greater-than" | "not-equal")
3286
+ }]
3287
+ // ----- unicorn/filename-case -----
3288
+ type UnicornFilenameCase = []|[({
3289
+ case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase")
3290
+ ignore?: unknown[]
3291
+ multipleFileExtensions?: boolean
3292
+ } | {
3293
+ cases?: {
3294
+ camelCase?: boolean
3295
+ snakeCase?: boolean
3296
+ kebabCase?: boolean
3297
+ pascalCase?: boolean
3298
+ }
3299
+ ignore?: unknown[]
3300
+ multipleFileExtensions?: boolean
3301
+ })]
3302
+ // ----- unicorn/import-style -----
3303
+ type UnicornImportStyle = []|[{
3304
+ checkImport?: boolean
3305
+ checkDynamicImport?: boolean
3306
+ checkExportFrom?: boolean
3307
+ checkRequire?: boolean
3308
+ extendDefaultStyles?: boolean
3309
+ styles?: _UnicornImportStyle_ModuleStyles
3310
+ }]
3311
+ type _UnicornImportStyleStyles = (false | _UnicornImportStyle_BooleanObject) | undefined
3312
+ interface _UnicornImportStyle_ModuleStyles {
3313
+ [k: string]: _UnicornImportStyleStyles | undefined
3314
+ }
3315
+ interface _UnicornImportStyle_BooleanObject {
3316
+ [k: string]: boolean | undefined
3317
+ }
3318
+ // ----- unicorn/no-array-push-push -----
3319
+ type UnicornNoArrayPushPush = []|[{
3320
+ ignore?: unknown[]
3321
+ }]
3322
+ // ----- unicorn/no-array-reduce -----
3323
+ type UnicornNoArrayReduce = []|[{
3324
+ allowSimpleOperations?: boolean
3325
+ }]
3326
+ // ----- unicorn/no-keyword-prefix -----
3327
+ type UnicornNoKeywordPrefix = []|[{
3328
+
3329
+ disallowedPrefixes?: []|[string]
3330
+ checkProperties?: boolean
3331
+ onlyCamelCase?: boolean
3332
+ }]
3333
+ // ----- unicorn/no-null -----
3334
+ type UnicornNoNull = []|[{
3335
+ checkStrictEquality?: boolean
3336
+ }]
3337
+ // ----- unicorn/no-typeof-undefined -----
3338
+ type UnicornNoTypeofUndefined = []|[{
3339
+ checkGlobalVariables?: boolean
3340
+ }]
3341
+ // ----- unicorn/no-unnecessary-polyfills -----
3342
+ type UnicornNoUnnecessaryPolyfills = []|[{
3343
+ targets: (string | unknown[] | {
3344
+ [k: string]: unknown | undefined
3345
+ })
3346
+ }]
3347
+ // ----- unicorn/no-useless-undefined -----
3348
+ type UnicornNoUselessUndefined = []|[{
3349
+ checkArguments?: boolean
3350
+ checkArrowFunctionBody?: boolean
3351
+ }]
3352
+ // ----- unicorn/numeric-separators-style -----
3353
+ type UnicornNumericSeparatorsStyle = []|[{
3354
+ binary?: {
3355
+ onlyIfContainsSeparator?: boolean
3356
+ minimumDigits?: number
3357
+ groupLength?: number
3358
+ }
3359
+ octal?: {
3360
+ onlyIfContainsSeparator?: boolean
3361
+ minimumDigits?: number
3362
+ groupLength?: number
3363
+ }
3364
+ hexadecimal?: {
3365
+ onlyIfContainsSeparator?: boolean
3366
+ minimumDigits?: number
3367
+ groupLength?: number
3368
+ }
3369
+ number?: {
3370
+ onlyIfContainsSeparator?: boolean
3371
+ minimumDigits?: number
3372
+ groupLength?: number
3373
+ }
3374
+ onlyIfContainsSeparator?: boolean
3375
+ }]
3376
+ // ----- unicorn/prefer-add-event-listener -----
3377
+ type UnicornPreferAddEventListener = []|[{
3378
+ excludedPackages?: string[]
3379
+ }]
3380
+ // ----- unicorn/prefer-array-find -----
3381
+ type UnicornPreferArrayFind = []|[{
3382
+ checkFromLast?: boolean
3383
+ }]
3384
+ // ----- unicorn/prefer-array-flat -----
3385
+ type UnicornPreferArrayFlat = []|[{
3386
+ functions?: unknown[]
3387
+ }]
3388
+ // ----- unicorn/prefer-at -----
3389
+ type UnicornPreferAt = []|[{
3390
+ getLastElementFunctions?: unknown[]
3391
+ checkAllIndexAccess?: boolean
3392
+ }]
3393
+ // ----- unicorn/prefer-export-from -----
3394
+ type UnicornPreferExportFrom = []|[{
3395
+ ignoreUsedVariables?: boolean
3396
+ }]
3397
+ // ----- unicorn/prefer-number-properties -----
3398
+ type UnicornPreferNumberProperties = []|[{
3399
+ checkInfinity?: boolean
3400
+ checkNaN?: boolean
3401
+ }]
3402
+ // ----- unicorn/prefer-object-from-entries -----
3403
+ type UnicornPreferObjectFromEntries = []|[{
3404
+ functions?: unknown[]
3405
+ }]
3406
+ // ----- unicorn/prefer-structured-clone -----
3407
+ type UnicornPreferStructuredClone = []|[{
3408
+ functions?: unknown[]
3409
+ }]
3410
+ // ----- unicorn/prefer-switch -----
3411
+ type UnicornPreferSwitch = []|[{
3412
+ minimumCases?: number
3413
+ emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case")
3414
+ }]
3415
+ // ----- unicorn/prefer-ternary -----
3416
+ type UnicornPreferTernary = []|[("always" | "only-single-line")]
3417
+ // ----- unicorn/prevent-abbreviations -----
3418
+ type UnicornPreventAbbreviations = []|[{
3419
+ checkProperties?: boolean
3420
+ checkVariables?: boolean
3421
+ checkDefaultAndNamespaceImports?: (boolean | string)
3422
+ checkShorthandImports?: (boolean | string)
3423
+ checkShorthandProperties?: boolean
3424
+ checkFilenames?: boolean
3425
+ extendDefaultReplacements?: boolean
3426
+ replacements?: _UnicornPreventAbbreviations_Abbreviations
3427
+ extendDefaultAllowList?: boolean
3428
+ allowList?: _UnicornPreventAbbreviations_BooleanObject
3429
+ ignore?: unknown[]
3430
+ }]
3431
+ type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined
3432
+ interface _UnicornPreventAbbreviations_Abbreviations {
3433
+ [k: string]: _UnicornPreventAbbreviationsReplacements | undefined
3434
+ }
3435
+ interface _UnicornPreventAbbreviations_BooleanObject {
3436
+ [k: string]: boolean | undefined
3437
+ }
3438
+ // ----- unicorn/relative-url-style -----
3439
+ type UnicornRelativeUrlStyle = []|[("never" | "always")]
3440
+ // ----- unicorn/string-content -----
3441
+ type UnicornStringContent = []|[{
3442
+ patterns?: {
3443
+ [k: string]: (string | {
3444
+ suggest: string
3445
+ fix?: boolean
3446
+ message?: string
3447
+ }) | undefined
3448
+ }
3449
+ }]
3450
+ // ----- unicorn/switch-case-braces -----
3451
+ type UnicornSwitchCaseBraces = []|[("always" | "avoid")]
3452
+ // ----- unicorn/template-indent -----
3453
+ type UnicornTemplateIndent = []|[{
3454
+ indent?: (string | number)
3455
+ tags?: string[]
3456
+ functions?: string[]
3457
+ selectors?: string[]
3458
+ comments?: string[]
3459
+ }]
2582
3460
  // ----- yml/block-mapping -----
2583
3461
  type YmlBlockMapping = []|[(("always" | "never") | {
2584
3462
  singleline?: ("always" | "never" | "ignore")