@storm-software/eslint 0.78.2 → 0.78.3

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