@ntnyq/eslint-config 5.0.0 → 5.2.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 +280 -151
- package/dist/index.js +38 -11
- package/package.json +25 -25
package/dist/index.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ declare const configSort: (options?: ConfigSortOptions) => TypedConfigItem[];
|
|
|
196
196
|
/**
|
|
197
197
|
* Options type of {@link configSVGO}
|
|
198
198
|
*/
|
|
199
|
-
type ConfigSVGOOptions = OptionsFiles & OptionsIgnores;
|
|
199
|
+
type ConfigSVGOOptions = OptionsFiles & OptionsIgnores & OptionsOverrides;
|
|
200
200
|
/**
|
|
201
201
|
* Config for svg files
|
|
202
202
|
*
|
|
@@ -776,6 +776,18 @@ type ConfigPerfectionistOptions = OptionsOverrides & {
|
|
|
776
776
|
* @default false
|
|
777
777
|
*/
|
|
778
778
|
all?: boolean;
|
|
779
|
+
/**
|
|
780
|
+
* files for `constants`, will overrides default values
|
|
781
|
+
*/
|
|
782
|
+
filesConstants?: TypedConfigItem['files'];
|
|
783
|
+
/**
|
|
784
|
+
* files for `enums`, will overrides default values
|
|
785
|
+
*/
|
|
786
|
+
filesEnums?: TypedConfigItem['files'];
|
|
787
|
+
/**
|
|
788
|
+
* files for `types`, will overrides default values
|
|
789
|
+
*/
|
|
790
|
+
filesTypes?: TypedConfigItem['files'];
|
|
779
791
|
/**
|
|
780
792
|
* Overrides rules for `constants`
|
|
781
793
|
*/
|
|
@@ -902,14 +914,17 @@ interface RuleOptions {
|
|
|
902
914
|
'@eslint-community/eslint-comments/require-description'?: Linter.RuleEntry<EslintCommunityEslintCommentsRequireDescription>;
|
|
903
915
|
/**
|
|
904
916
|
* Enforce newline between attributes
|
|
917
|
+
* @see https://html-eslint.org/docs/rules/attrs-newline
|
|
905
918
|
*/
|
|
906
919
|
'@html-eslint/attrs-newline'?: Linter.RuleEntry<HtmlEslintAttrsNewline>;
|
|
907
920
|
/**
|
|
908
921
|
* Enforce newline between elements.
|
|
922
|
+
* @see https://html-eslint.org/docs/rules/element-newline
|
|
909
923
|
*/
|
|
910
924
|
'@html-eslint/element-newline'?: Linter.RuleEntry<HtmlEslintElementNewline>;
|
|
911
925
|
/**
|
|
912
926
|
* Enforce consistent naming id attributes
|
|
927
|
+
* @see https://html-eslint.org/docs/rules/id-naming-convention
|
|
913
928
|
*/
|
|
914
929
|
'@html-eslint/id-naming-convention'?: Linter.RuleEntry<HtmlEslintIdNamingConvention>;
|
|
915
930
|
/**
|
|
@@ -918,182 +933,247 @@ interface RuleOptions {
|
|
|
918
933
|
'@html-eslint/indent'?: Linter.RuleEntry<HtmlEslintIndent>;
|
|
919
934
|
/**
|
|
920
935
|
* Enforce to use lowercase for tag and attribute names.
|
|
936
|
+
* @see https://html-eslint.org/docs/rules/lowercase
|
|
921
937
|
*/
|
|
922
938
|
'@html-eslint/lowercase'?: Linter.RuleEntry<[]>;
|
|
923
939
|
/**
|
|
924
940
|
* Enforce element maximum depth
|
|
941
|
+
* @see https://html-eslint.org/docs/rules/max-element-depth
|
|
925
942
|
*/
|
|
926
943
|
'@html-eslint/max-element-depth'?: Linter.RuleEntry<HtmlEslintMaxElementDepth>;
|
|
927
944
|
/**
|
|
928
945
|
* Disallow to use of abstract roles
|
|
946
|
+
* @see https://html-eslint.org/docs/rules/no-abstract-roles
|
|
929
947
|
*/
|
|
930
948
|
'@html-eslint/no-abstract-roles'?: Linter.RuleEntry<[]>;
|
|
931
949
|
/**
|
|
932
950
|
* Disallow to use of accesskey attribute
|
|
951
|
+
* @see https://html-eslint.org/docs/rules/no-accesskey-attrs
|
|
933
952
|
*/
|
|
934
953
|
'@html-eslint/no-accesskey-attrs'?: Linter.RuleEntry<[]>;
|
|
935
954
|
/**
|
|
936
955
|
* Disallow to use aria-hidden attributes on the `body` element.
|
|
956
|
+
* @see https://html-eslint.org/docs/rules/no-aria-hidden-body
|
|
937
957
|
*/
|
|
938
958
|
'@html-eslint/no-aria-hidden-body'?: Linter.RuleEntry<[]>;
|
|
959
|
+
/**
|
|
960
|
+
* Disallow aria-hidden="true" on focusable elements
|
|
961
|
+
* @see https://html-eslint.org/docs/rules/no-aria-hidden-on-focusable
|
|
962
|
+
*/
|
|
963
|
+
'@html-eslint/no-aria-hidden-on-focusable'?: Linter.RuleEntry<[]>;
|
|
939
964
|
/**
|
|
940
965
|
* Disallow to use duplicate attributes
|
|
966
|
+
* @see https://html-eslint.org/docs/rules/no-duplicate-attrs
|
|
941
967
|
*/
|
|
942
968
|
'@html-eslint/no-duplicate-attrs'?: Linter.RuleEntry<[]>;
|
|
943
969
|
/**
|
|
944
970
|
* Disallow to use duplicate class
|
|
971
|
+
* @see https://html-eslint.org/docs/rules/no-duplicate-class
|
|
945
972
|
*/
|
|
946
973
|
'@html-eslint/no-duplicate-class'?: Linter.RuleEntry<[]>;
|
|
947
974
|
/**
|
|
948
975
|
* Disallow to use duplicate id
|
|
976
|
+
* @see https://html-eslint.org/docs/rules/no-duplicate-id
|
|
949
977
|
*/
|
|
950
978
|
'@html-eslint/no-duplicate-id'?: Linter.RuleEntry<[]>;
|
|
979
|
+
/**
|
|
980
|
+
* Disallow duplicate tags in `<head>`
|
|
981
|
+
* @see https://html-eslint.org/docs/rules/no-duplicate-in-head
|
|
982
|
+
*/
|
|
983
|
+
'@html-eslint/no-duplicate-in-head'?: Linter.RuleEntry<[]>;
|
|
984
|
+
/**
|
|
985
|
+
* Disallow empty or inaccessible headings.
|
|
986
|
+
* @see https://html-eslint.org/docs/rules/no-empty-headings
|
|
987
|
+
*/
|
|
988
|
+
'@html-eslint/no-empty-headings'?: Linter.RuleEntry<[]>;
|
|
951
989
|
/**
|
|
952
990
|
* Disallow an extra spacing around attributes
|
|
991
|
+
* @see https://html-eslint.org/docs/rules/no-extra-spacing-attrs
|
|
953
992
|
*/
|
|
954
993
|
'@html-eslint/no-extra-spacing-attrs'?: Linter.RuleEntry<HtmlEslintNoExtraSpacingAttrs>;
|
|
955
994
|
/**
|
|
956
995
|
* Disallow unnecessary consecutive spaces
|
|
996
|
+
* @see https://html-eslint.org/docs/rules/no-extra-spacing-text
|
|
957
997
|
*/
|
|
958
998
|
'@html-eslint/no-extra-spacing-text'?: Linter.RuleEntry<HtmlEslintNoExtraSpacingText>;
|
|
959
999
|
/**
|
|
960
1000
|
* Disallows the use of heading elements inside <button>.
|
|
1001
|
+
* @see https://html-eslint.org/docs/rules/no-heading-inside-button
|
|
961
1002
|
*/
|
|
962
1003
|
'@html-eslint/no-heading-inside-button'?: Linter.RuleEntry<[]>;
|
|
963
1004
|
/**
|
|
964
1005
|
* Disallow using inline style
|
|
1006
|
+
* @see https://html-eslint.org/docs/rules/no-inline-styles
|
|
965
1007
|
*/
|
|
966
1008
|
'@html-eslint/no-inline-styles'?: Linter.RuleEntry<[]>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Disallows the use of invalid HTML entities
|
|
1011
|
+
* @see https://html-eslint.org/docs/rules/no-invalid-entity
|
|
1012
|
+
*/
|
|
1013
|
+
'@html-eslint/no-invalid-entity'?: Linter.RuleEntry<[]>;
|
|
967
1014
|
/**
|
|
968
1015
|
* Disallows use of invalid role.
|
|
1016
|
+
* @see https://html-eslint.org/docs/rules/no-invalid-role
|
|
969
1017
|
*/
|
|
970
1018
|
'@html-eslint/no-invalid-role'?: Linter.RuleEntry<[]>;
|
|
971
1019
|
/**
|
|
972
1020
|
* Disallow multiple empty lines
|
|
1021
|
+
* @see https://html-eslint.org/docs/rules/no-multiple-empty-lines
|
|
973
1022
|
*/
|
|
974
1023
|
'@html-eslint/no-multiple-empty-lines'?: Linter.RuleEntry<HtmlEslintNoMultipleEmptyLines>;
|
|
975
1024
|
/**
|
|
976
1025
|
* Disallow multiple `<h1></h1>`.
|
|
1026
|
+
* @see https://html-eslint.org/docs/rules/no-multiple-h1
|
|
977
1027
|
*/
|
|
978
1028
|
'@html-eslint/no-multiple-h1'?: Linter.RuleEntry<[]>;
|
|
979
1029
|
/**
|
|
980
1030
|
* Disallows nested interactive elements
|
|
1031
|
+
* @see https://html-eslint.org/docs/rules/no-nested-interactive
|
|
981
1032
|
*/
|
|
982
1033
|
'@html-eslint/no-nested-interactive'?: Linter.RuleEntry<[]>;
|
|
983
1034
|
/**
|
|
984
1035
|
* Disallow use of `user-scalable=no` in `<meta name="viewport">`.
|
|
1036
|
+
* @see https://html-eslint.org/docs/rules/no-non-scalable-viewport
|
|
985
1037
|
*/
|
|
986
1038
|
'@html-eslint/no-non-scalable-viewport'?: Linter.RuleEntry<[]>;
|
|
987
1039
|
/**
|
|
988
1040
|
* Disallow to use obsolete elements in HTML5
|
|
1041
|
+
* @see https://html-eslint.org/docs/rules/no-obsolete-tags
|
|
989
1042
|
*/
|
|
990
1043
|
'@html-eslint/no-obsolete-tags'?: Linter.RuleEntry<[]>;
|
|
991
1044
|
/**
|
|
992
1045
|
* Disallow use of positive `tabindex`.
|
|
1046
|
+
* @see https://html-eslint.org/docs/rules/no-positive-tabindex
|
|
993
1047
|
*/
|
|
994
1048
|
'@html-eslint/no-positive-tabindex'?: Linter.RuleEntry<[]>;
|
|
995
1049
|
/**
|
|
996
1050
|
* Disallow specified attributes
|
|
1051
|
+
* @see https://html-eslint.org/docs/rules/no-restricted-attr-values
|
|
997
1052
|
*/
|
|
998
1053
|
'@html-eslint/no-restricted-attr-values'?: Linter.RuleEntry<HtmlEslintNoRestrictedAttrValues>;
|
|
999
1054
|
/**
|
|
1000
1055
|
* Disallow specified attributes
|
|
1056
|
+
* @see https://html-eslint.org/docs/rules/no-restricted-attrs
|
|
1001
1057
|
*/
|
|
1002
1058
|
'@html-eslint/no-restricted-attrs'?: Linter.RuleEntry<HtmlEslintNoRestrictedAttrs>;
|
|
1003
1059
|
/**
|
|
1004
1060
|
* Enforce to omit type attributes for style sheets and scripts
|
|
1061
|
+
* @see https://html-eslint.org/docs/rules/no-script-style-type
|
|
1005
1062
|
*/
|
|
1006
1063
|
'@html-eslint/no-script-style-type'?: Linter.RuleEntry<[]>;
|
|
1007
1064
|
/**
|
|
1008
1065
|
* Disallow skipping heading levels
|
|
1066
|
+
* @see https://html-eslint.org/docs/rules/no-skip-heading-levels
|
|
1009
1067
|
*/
|
|
1010
1068
|
'@html-eslint/no-skip-heading-levels'?: Linter.RuleEntry<[]>;
|
|
1011
1069
|
/**
|
|
1012
1070
|
* Disallow usage of unsafe `target='_blank'`
|
|
1071
|
+
* @see https://html-eslint.org/docs/rules/no-target-blank
|
|
1013
1072
|
*/
|
|
1014
1073
|
'@html-eslint/no-target-blank'?: Linter.RuleEntry<[]>;
|
|
1015
1074
|
/**
|
|
1016
1075
|
* Disallow trailing whitespace at the end of lines
|
|
1076
|
+
* @see https://html-eslint.org/docs/rules/no-trailing-spaces
|
|
1017
1077
|
*/
|
|
1018
1078
|
'@html-eslint/no-trailing-spaces'?: Linter.RuleEntry<[]>;
|
|
1019
1079
|
/**
|
|
1020
1080
|
* Prefer to use HTTPS for embedded resources
|
|
1081
|
+
* @see https://html-eslint.org/docs/rules/prefer-https
|
|
1021
1082
|
*/
|
|
1022
1083
|
'@html-eslint/prefer-https'?: Linter.RuleEntry<[]>;
|
|
1023
1084
|
/**
|
|
1024
1085
|
* Enforce consistent quoting attributes with double(") or single(')
|
|
1086
|
+
* @see https://html-eslint.org/docs/rules/quotes
|
|
1025
1087
|
*/
|
|
1026
1088
|
'@html-eslint/quotes'?: Linter.RuleEntry<HtmlEslintQuotes>;
|
|
1027
1089
|
/**
|
|
1028
1090
|
* Require specified attributes
|
|
1091
|
+
* @see https://html-eslint.org/docs/rules/require-attrs
|
|
1029
1092
|
*/
|
|
1030
1093
|
'@html-eslint/require-attrs'?: Linter.RuleEntry<HtmlEslintRequireAttrs>;
|
|
1031
1094
|
/**
|
|
1032
1095
|
* Require use of button element with a valid type attribute.
|
|
1096
|
+
* @see https://html-eslint.org/docs/rules/require-button-type
|
|
1033
1097
|
*/
|
|
1034
1098
|
'@html-eslint/require-button-type'?: Linter.RuleEntry<[]>;
|
|
1035
1099
|
/**
|
|
1036
1100
|
* Require closing tags.
|
|
1101
|
+
* @see https://html-eslint.org/docs/rules/require-closing-tags
|
|
1037
1102
|
*/
|
|
1038
1103
|
'@html-eslint/require-closing-tags'?: Linter.RuleEntry<HtmlEslintRequireClosingTags>;
|
|
1039
1104
|
/**
|
|
1040
1105
|
* Require `<!DOCTYPE HTML>` in html,
|
|
1106
|
+
* @see https://html-eslint.org/docs/rules/require-doctype
|
|
1041
1107
|
*/
|
|
1042
1108
|
'@html-eslint/require-doctype'?: Linter.RuleEntry<[]>;
|
|
1043
1109
|
/**
|
|
1044
1110
|
* Enforces that some elements (img, iframe) have explicitly defined width and height attributes.
|
|
1111
|
+
* @see https://html-eslint.org/docs/rules/require-explicit-size
|
|
1045
1112
|
*/
|
|
1046
1113
|
'@html-eslint/require-explicit-size'?: Linter.RuleEntry<HtmlEslintRequireExplicitSize>;
|
|
1047
1114
|
/**
|
|
1048
1115
|
* Require `method` attribute in `<form>`
|
|
1116
|
+
* @see https://html-eslint.org/docs/rules/require-form-method
|
|
1049
1117
|
*/
|
|
1050
1118
|
'@html-eslint/require-form-method'?: Linter.RuleEntry<[]>;
|
|
1051
1119
|
/**
|
|
1052
1120
|
* Require `title` in `<frame>`, `<iframe>`
|
|
1121
|
+
* @see https://html-eslint.org/docs/rules/require-frame-title
|
|
1053
1122
|
*/
|
|
1054
1123
|
'@html-eslint/require-frame-title'?: Linter.RuleEntry<[]>;
|
|
1055
1124
|
/**
|
|
1056
1125
|
* Require `alt` attribute at `<img>` tag
|
|
1126
|
+
* @see https://html-eslint.org/docs/rules/require-img-alt
|
|
1057
1127
|
*/
|
|
1058
1128
|
'@html-eslint/require-img-alt'?: Linter.RuleEntry<HtmlEslintRequireImgAlt>;
|
|
1059
1129
|
/**
|
|
1060
1130
|
* Enforces use of label for form elements(`input`, `textarea`, `select`)
|
|
1131
|
+
* @see https://html-eslint.org/docs/rules/require-input-label
|
|
1061
1132
|
*/
|
|
1062
1133
|
'@html-eslint/require-input-label'?: Linter.RuleEntry<[]>;
|
|
1063
1134
|
/**
|
|
1064
1135
|
* Require `lang` attribute at `<html>` tag
|
|
1136
|
+
* @see https://html-eslint.org/docs/rules/require-lang
|
|
1065
1137
|
*/
|
|
1066
1138
|
'@html-eslint/require-lang'?: Linter.RuleEntry<[]>;
|
|
1067
1139
|
/**
|
|
1068
1140
|
* Enforce `<li>` to be in `<ul>`, `<ol>` or `<menu>`.
|
|
1141
|
+
* @see https://html-eslint.org/docs/rules/require-li-container
|
|
1069
1142
|
*/
|
|
1070
1143
|
'@html-eslint/require-li-container'?: Linter.RuleEntry<[]>;
|
|
1071
1144
|
/**
|
|
1072
1145
|
* Enforce to use `<meta charset="...">` in `<head>`
|
|
1146
|
+
* @see https://html-eslint.org/docs/rules/require-meta-charset
|
|
1073
1147
|
*/
|
|
1074
1148
|
'@html-eslint/require-meta-charset'?: Linter.RuleEntry<[]>;
|
|
1075
1149
|
/**
|
|
1076
1150
|
* Require use of `<meta name="description">` in `<head>`
|
|
1151
|
+
* @see https://html-eslint.org/docs/rules/require-meta-description
|
|
1077
1152
|
*/
|
|
1078
1153
|
'@html-eslint/require-meta-description'?: Linter.RuleEntry<[]>;
|
|
1079
1154
|
/**
|
|
1080
1155
|
* Enforce to use `<meta name="viewport">` in `<head>`
|
|
1156
|
+
* @see https://html-eslint.org/docs/rules/require-meta-viewport
|
|
1081
1157
|
*/
|
|
1082
1158
|
'@html-eslint/require-meta-viewport'?: Linter.RuleEntry<[]>;
|
|
1083
1159
|
/**
|
|
1084
|
-
* Enforce to use
|
|
1160
|
+
* Enforce to use specified meta tags for open graph protocol.
|
|
1161
|
+
* @see https://html-eslint.org/docs/rules/require-open-graph-protocol
|
|
1085
1162
|
*/
|
|
1086
1163
|
'@html-eslint/require-open-graph-protocol'?: Linter.RuleEntry<HtmlEslintRequireOpenGraphProtocol>;
|
|
1087
1164
|
/**
|
|
1088
1165
|
* Require `<title><title/>` in the `<head><head/>`
|
|
1166
|
+
* @see https://html-eslint.org/docs/rules/require-title
|
|
1089
1167
|
*/
|
|
1090
1168
|
'@html-eslint/require-title'?: Linter.RuleEntry<[]>;
|
|
1091
1169
|
/**
|
|
1092
1170
|
* Enforce attributes alphabetical sorting
|
|
1171
|
+
* @see https://html-eslint.org/docs/rules/sort-attrs
|
|
1093
1172
|
*/
|
|
1094
1173
|
'@html-eslint/sort-attrs'?: Linter.RuleEntry<HtmlEslintSortAttrs>;
|
|
1095
1174
|
/**
|
|
1096
1175
|
* Enforce the use of baseline features.
|
|
1176
|
+
* @see https://html-eslint.org/docs/rules/use-baseline
|
|
1097
1177
|
*/
|
|
1098
1178
|
'@html-eslint/use-baseline'?: Linter.RuleEntry<HtmlEslintUseBaseline>;
|
|
1099
1179
|
/**
|
|
@@ -3448,7 +3528,7 @@ interface RuleOptions {
|
|
|
3448
3528
|
* Disallow empty definitions
|
|
3449
3529
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md
|
|
3450
3530
|
*/
|
|
3451
|
-
'markdown/no-empty-definitions'?: Linter.RuleEntry<
|
|
3531
|
+
'markdown/no-empty-definitions'?: Linter.RuleEntry<MarkdownNoEmptyDefinitions>;
|
|
3452
3532
|
/**
|
|
3453
3533
|
* Disallow empty images
|
|
3454
3534
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md
|
|
@@ -3494,6 +3574,11 @@ interface RuleOptions {
|
|
|
3494
3574
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
|
|
3495
3575
|
*/
|
|
3496
3576
|
'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]>;
|
|
3577
|
+
/**
|
|
3578
|
+
* Disallow unused definitions
|
|
3579
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
|
|
3580
|
+
*/
|
|
3581
|
+
'markdown/no-unused-definitions'?: Linter.RuleEntry<MarkdownNoUnusedDefinitions>;
|
|
3497
3582
|
/**
|
|
3498
3583
|
* Require alternative text for images
|
|
3499
3584
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md
|
|
@@ -3503,7 +3588,7 @@ interface RuleOptions {
|
|
|
3503
3588
|
* Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row
|
|
3504
3589
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/table-column-count.md
|
|
3505
3590
|
*/
|
|
3506
|
-
'markdown/table-column-count'?: Linter.RuleEntry<
|
|
3591
|
+
'markdown/table-column-count'?: Linter.RuleEntry<MarkdownTableColumnCount>;
|
|
3507
3592
|
/**
|
|
3508
3593
|
* Enforce a maximum number of classes per file
|
|
3509
3594
|
* @see https://eslint.org/docs/latest/rules/max-classes-per-file
|
|
@@ -3666,7 +3751,7 @@ interface RuleOptions {
|
|
|
3666
3751
|
*/
|
|
3667
3752
|
'no-console'?: Linter.RuleEntry<NoConsole>;
|
|
3668
3753
|
/**
|
|
3669
|
-
* Disallow reassigning `const` variables
|
|
3754
|
+
* Disallow reassigning `const`, `using`, and `await using` variables
|
|
3670
3755
|
* @see https://eslint.org/docs/latest/rules/no-const-assign
|
|
3671
3756
|
*/
|
|
3672
3757
|
'no-const-assign'?: Linter.RuleEntry<[]>;
|
|
@@ -4825,27 +4910,27 @@ interface RuleOptions {
|
|
|
4825
4910
|
'pinia/require-setup-store-properties-export'?: Linter.RuleEntry<[]>;
|
|
4826
4911
|
/**
|
|
4827
4912
|
* Enforce using "catalog:" in `package.json`
|
|
4828
|
-
* @see https://github.com/antfu/eslint-plugin-pnpm/
|
|
4913
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-enforce-catalog.test.ts
|
|
4829
4914
|
*/
|
|
4830
4915
|
'pnpm/json-enforce-catalog'?: Linter.RuleEntry<PnpmJsonEnforceCatalog>;
|
|
4831
4916
|
/**
|
|
4832
4917
|
* Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This would requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037.
|
|
4833
|
-
* @see https://github.com/antfu/eslint-plugin-pnpm/
|
|
4918
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-prefer-workspace-settings.test.ts
|
|
4834
4919
|
*/
|
|
4835
4920
|
'pnpm/json-prefer-workspace-settings'?: Linter.RuleEntry<PnpmJsonPreferWorkspaceSettings>;
|
|
4836
4921
|
/**
|
|
4837
4922
|
* Enforce using valid catalog in `package.json`
|
|
4838
|
-
* @see https://github.com/antfu/eslint-plugin-pnpm/
|
|
4923
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-valid-catalog.test.ts
|
|
4839
4924
|
*/
|
|
4840
4925
|
'pnpm/json-valid-catalog'?: Linter.RuleEntry<PnpmJsonValidCatalog>;
|
|
4841
4926
|
/**
|
|
4842
4927
|
* Disallow unused catalogs in `pnpm-workspace.yaml`
|
|
4843
|
-
* @see https://github.com/antfu/eslint-plugin-pnpm/
|
|
4928
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-duplicate-catalog-item.test.ts
|
|
4844
4929
|
*/
|
|
4845
4930
|
'pnpm/yaml-no-duplicate-catalog-item'?: Linter.RuleEntry<PnpmYamlNoDuplicateCatalogItem>;
|
|
4846
4931
|
/**
|
|
4847
4932
|
* Disallow unused catalogs in `pnpm-workspace.yaml`
|
|
4848
|
-
* @see https://github.com/antfu/eslint-plugin-pnpm/
|
|
4933
|
+
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-unused-catalog-item.test.ts
|
|
4849
4934
|
*/
|
|
4850
4935
|
'pnpm/yaml-no-unused-catalog-item'?: Linter.RuleEntry<[]>;
|
|
4851
4936
|
/**
|
|
@@ -5753,6 +5838,11 @@ interface RuleOptions {
|
|
|
5753
5838
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-style-directive/
|
|
5754
5839
|
*/
|
|
5755
5840
|
'svelte/prefer-style-directive'?: Linter.RuleEntry<[]>;
|
|
5841
|
+
/**
|
|
5842
|
+
* disallow using mutable instances of built-in classes where a reactive alternative is provided by svelte/reactivity
|
|
5843
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-svelte-reactivity/
|
|
5844
|
+
*/
|
|
5845
|
+
'svelte/prefer-svelte-reactivity'?: Linter.RuleEntry<[]>;
|
|
5756
5846
|
/**
|
|
5757
5847
|
* Prefer using writable $derived instead of $state and $effect
|
|
5758
5848
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-writable-derived/
|
|
@@ -5984,670 +6074,690 @@ interface RuleOptions {
|
|
|
5984
6074
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5985
6075
|
/**
|
|
5986
6076
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
|
|
5988
6078
|
*/
|
|
5989
6079
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5990
6080
|
/**
|
|
5991
6081
|
* Enforce a specific parameter name in catch clauses.
|
|
5992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
|
|
5993
6083
|
*/
|
|
5994
6084
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5995
6085
|
/**
|
|
5996
6086
|
* Enforce consistent assertion style with `node:assert`.
|
|
5997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
|
|
5998
6088
|
*/
|
|
5999
6089
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6000
6090
|
/**
|
|
6001
6091
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
|
|
6003
6093
|
*/
|
|
6004
6094
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6005
6095
|
/**
|
|
6006
6096
|
* Use destructured variables over properties.
|
|
6007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
|
|
6008
6098
|
*/
|
|
6009
6099
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6010
6100
|
/**
|
|
6011
6101
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6013
6103
|
*/
|
|
6014
6104
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6015
6105
|
/**
|
|
6016
6106
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
|
|
6018
6108
|
*/
|
|
6019
6109
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6020
6110
|
/**
|
|
6021
6111
|
* Move function definitions to the highest possible scope.
|
|
6022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
|
|
6023
6113
|
*/
|
|
6024
6114
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6025
6115
|
/**
|
|
6026
6116
|
* Enforce correct `Error` subclassing.
|
|
6027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
|
|
6028
6118
|
*/
|
|
6029
6119
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6030
6120
|
/**
|
|
6031
6121
|
* Enforce no spaces between braces.
|
|
6032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
|
|
6033
6123
|
*/
|
|
6034
6124
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6035
6125
|
/**
|
|
6036
6126
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
|
|
6038
6128
|
*/
|
|
6039
6129
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6040
6130
|
/**
|
|
6041
6131
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
|
|
6043
6133
|
*/
|
|
6044
6134
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6045
6135
|
/**
|
|
6046
6136
|
* Add expiration conditions to TODO comments.
|
|
6047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
|
|
6048
6138
|
*/
|
|
6049
6139
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6050
6140
|
/**
|
|
6051
6141
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
|
|
6053
6143
|
*/
|
|
6054
6144
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6055
6145
|
/**
|
|
6056
6146
|
* Enforce a case style for filenames.
|
|
6057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
|
|
6058
6148
|
*/
|
|
6059
6149
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6060
6150
|
/**
|
|
6061
6151
|
* Enforce specific import styles per module.
|
|
6062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
|
|
6063
6153
|
*/
|
|
6064
6154
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6065
6155
|
/**
|
|
6066
6156
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
|
|
6068
6158
|
*/
|
|
6069
6159
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6070
6160
|
/**
|
|
6071
6161
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6073
6163
|
*/
|
|
6074
6164
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6075
6165
|
/**
|
|
6076
6166
|
* Disallow recursive access to `this` within getters and setters.
|
|
6077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
|
|
6078
6168
|
*/
|
|
6079
6169
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6080
6170
|
/**
|
|
6081
6171
|
* Disallow anonymous functions and classes as the default export.
|
|
6082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
|
|
6083
6173
|
*/
|
|
6084
6174
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6085
6175
|
/**
|
|
6086
6176
|
* Prevent passing a function reference directly to iterator methods.
|
|
6087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
|
|
6088
6178
|
*/
|
|
6089
6179
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
6090
6180
|
/**
|
|
6091
6181
|
* Prefer `for…of` over the `forEach` method.
|
|
6092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
|
|
6093
6183
|
*/
|
|
6094
6184
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6095
6185
|
/**
|
|
6096
6186
|
* Disallow using the `this` argument in array methods.
|
|
6097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
|
|
6098
6188
|
*/
|
|
6099
6189
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6100
6190
|
/**
|
|
6101
6191
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
6103
6193
|
* @deprecated
|
|
6104
6194
|
*/
|
|
6105
6195
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6106
6196
|
/**
|
|
6107
6197
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
|
|
6109
6199
|
*/
|
|
6110
6200
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6201
|
+
/**
|
|
6202
|
+
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
|
|
6204
|
+
*/
|
|
6205
|
+
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6111
6206
|
/**
|
|
6112
6207
|
* Disallow member access from await expression.
|
|
6113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
|
|
6114
6209
|
*/
|
|
6115
6210
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6116
6211
|
/**
|
|
6117
6212
|
* Disallow using `await` in `Promise` method parameters.
|
|
6118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6119
6214
|
*/
|
|
6120
6215
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6121
6216
|
/**
|
|
6122
6217
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
|
|
6124
6219
|
*/
|
|
6125
6220
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6126
6221
|
/**
|
|
6127
6222
|
* Do not use `document.cookie` directly.
|
|
6128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
|
|
6129
6224
|
*/
|
|
6130
6225
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6131
6226
|
/**
|
|
6132
6227
|
* Disallow empty files.
|
|
6133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
|
|
6134
6229
|
*/
|
|
6135
6230
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
6136
6231
|
/**
|
|
6137
6232
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
|
|
6139
6234
|
*/
|
|
6140
6235
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6141
6236
|
/**
|
|
6142
6237
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
|
|
6144
6239
|
*/
|
|
6145
6240
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6146
6241
|
/**
|
|
6147
6242
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
6149
6244
|
* @deprecated
|
|
6150
6245
|
*/
|
|
6151
6246
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6152
6247
|
/**
|
|
6153
6248
|
* Disallow `instanceof` with built-in objects
|
|
6154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
|
|
6155
6250
|
*/
|
|
6156
6251
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6157
6252
|
/**
|
|
6158
6253
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6160
6255
|
*/
|
|
6161
6256
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6162
6257
|
/**
|
|
6163
6258
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6165
6260
|
*/
|
|
6166
6261
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6167
6262
|
/**
|
|
6168
6263
|
* Disallow identifiers starting with `new` or `class`.
|
|
6169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
|
|
6170
6265
|
*/
|
|
6171
6266
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6172
6267
|
/**
|
|
6173
6268
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6269
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
6175
6270
|
* @deprecated
|
|
6176
6271
|
*/
|
|
6177
6272
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6178
6273
|
/**
|
|
6179
6274
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
|
|
6181
6276
|
*/
|
|
6182
6277
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6183
6278
|
/**
|
|
6184
6279
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6186
6281
|
*/
|
|
6187
6282
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6188
6283
|
/**
|
|
6189
6284
|
* Disallow named usage of default import and export.
|
|
6190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
|
|
6191
6286
|
*/
|
|
6192
6287
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6193
6288
|
/**
|
|
6194
6289
|
* Disallow negated conditions.
|
|
6195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
|
|
6196
6291
|
*/
|
|
6197
6292
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6198
6293
|
/**
|
|
6199
6294
|
* Disallow negated expression in equality check.
|
|
6200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6201
6296
|
*/
|
|
6202
6297
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6203
6298
|
/**
|
|
6204
6299
|
* Disallow nested ternary expressions.
|
|
6205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
|
|
6206
6301
|
*/
|
|
6207
6302
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6208
6303
|
/**
|
|
6209
6304
|
* Disallow `new Array()`.
|
|
6210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
|
|
6211
6306
|
*/
|
|
6212
6307
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6213
6308
|
/**
|
|
6214
6309
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
|
|
6216
6311
|
*/
|
|
6217
6312
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6218
6313
|
/**
|
|
6219
6314
|
* Disallow the use of the `null` literal.
|
|
6220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
|
|
6221
6316
|
*/
|
|
6222
6317
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6223
6318
|
/**
|
|
6224
6319
|
* Disallow the use of objects as default parameters.
|
|
6225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6226
6321
|
*/
|
|
6227
6322
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6228
6323
|
/**
|
|
6229
6324
|
* Disallow `process.exit()`.
|
|
6230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
|
|
6231
6326
|
*/
|
|
6232
6327
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6233
6328
|
/**
|
|
6234
6329
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6236
6331
|
*/
|
|
6237
6332
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6238
6333
|
/**
|
|
6239
6334
|
* Disallow classes that only have static members.
|
|
6240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
|
|
6241
6336
|
*/
|
|
6242
6337
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6243
6338
|
/**
|
|
6244
6339
|
* Disallow `then` property.
|
|
6245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
|
|
6246
6341
|
*/
|
|
6247
6342
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6248
6343
|
/**
|
|
6249
6344
|
* Disallow assigning `this` to a variable.
|
|
6250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
|
|
6251
6346
|
*/
|
|
6252
6347
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6253
6348
|
/**
|
|
6254
6349
|
* Disallow comparing `undefined` using `typeof`.
|
|
6255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
|
|
6256
6351
|
*/
|
|
6257
6352
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6258
6353
|
/**
|
|
6259
6354
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6261
6356
|
*/
|
|
6262
6357
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6263
6358
|
/**
|
|
6264
6359
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6266
6361
|
*/
|
|
6267
6362
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6268
6363
|
/**
|
|
6269
6364
|
* Disallow awaiting non-promise values.
|
|
6270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
|
|
6271
6366
|
*/
|
|
6272
6367
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6273
6368
|
/**
|
|
6274
6369
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6276
6371
|
*/
|
|
6277
6372
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6278
6373
|
/**
|
|
6279
6374
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6281
6376
|
*/
|
|
6282
6377
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6283
6378
|
/**
|
|
6284
6379
|
* Disallow unreadable array destructuring.
|
|
6285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6286
6381
|
*/
|
|
6287
6382
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6288
6383
|
/**
|
|
6289
6384
|
* Disallow unreadable IIFEs.
|
|
6290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
|
|
6291
6386
|
*/
|
|
6292
6387
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6293
6388
|
/**
|
|
6294
6389
|
* Disallow unused object properties.
|
|
6295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
|
|
6296
6391
|
*/
|
|
6297
6392
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6393
|
+
/**
|
|
6394
|
+
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6396
|
+
*/
|
|
6397
|
+
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6298
6398
|
/**
|
|
6299
6399
|
* Disallow useless fallback when spreading in object literals.
|
|
6300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6301
6401
|
*/
|
|
6302
6402
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6303
6403
|
/**
|
|
6304
6404
|
* Disallow useless array length check.
|
|
6305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
|
|
6306
6406
|
*/
|
|
6307
6407
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6308
6408
|
/**
|
|
6309
6409
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6311
6411
|
*/
|
|
6312
6412
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
6313
6413
|
/**
|
|
6314
6414
|
* Disallow unnecessary spread.
|
|
6315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
|
|
6316
6416
|
*/
|
|
6317
6417
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
6318
6418
|
/**
|
|
6319
6419
|
* Disallow useless case in switch statements.
|
|
6320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
|
|
6321
6421
|
*/
|
|
6322
6422
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
6323
6423
|
/**
|
|
6324
6424
|
* Disallow useless `undefined`.
|
|
6325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
|
|
6326
6426
|
*/
|
|
6327
6427
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6328
6428
|
/**
|
|
6329
6429
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
|
|
6331
6431
|
*/
|
|
6332
6432
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
6333
6433
|
/**
|
|
6334
6434
|
* Enforce proper case for numeric literals.
|
|
6335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
|
|
6336
6436
|
*/
|
|
6337
6437
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
6338
6438
|
/**
|
|
6339
6439
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
|
|
6341
6441
|
*/
|
|
6342
6442
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
6343
6443
|
/**
|
|
6344
6444
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
|
|
6346
6446
|
*/
|
|
6347
6447
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
6348
6448
|
/**
|
|
6349
6449
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
|
|
6351
6451
|
*/
|
|
6352
6452
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
6353
6453
|
/**
|
|
6354
6454
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
|
|
6356
6456
|
*/
|
|
6357
6457
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
6358
6458
|
/**
|
|
6359
6459
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
|
|
6361
6461
|
*/
|
|
6362
6462
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6363
6463
|
/**
|
|
6364
6464
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
|
|
6366
6466
|
*/
|
|
6367
6467
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
6368
6468
|
/**
|
|
6369
6469
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
|
|
6371
6471
|
*/
|
|
6372
6472
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
6373
6473
|
/**
|
|
6374
6474
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
|
|
6376
6476
|
*/
|
|
6377
6477
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6378
6478
|
/**
|
|
6379
6479
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6381
6481
|
*/
|
|
6382
6482
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6483
|
+
/**
|
|
6484
|
+
* Prefer class field declarations over `this` assignments in constructors.
|
|
6485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
|
|
6486
|
+
*/
|
|
6487
|
+
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6383
6488
|
/**
|
|
6384
6489
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
|
|
6386
6491
|
*/
|
|
6387
6492
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6388
6493
|
/**
|
|
6389
6494
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
|
|
6391
6496
|
*/
|
|
6392
6497
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6393
6498
|
/**
|
|
6394
6499
|
* Prefer default parameters over reassignment.
|
|
6395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
|
|
6396
6501
|
*/
|
|
6397
6502
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
6398
6503
|
/**
|
|
6399
6504
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
|
|
6401
6506
|
*/
|
|
6402
6507
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6403
6508
|
/**
|
|
6404
6509
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
6406
6511
|
*/
|
|
6407
6512
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6408
6513
|
/**
|
|
6409
6514
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6411
6516
|
*/
|
|
6412
6517
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6413
6518
|
/**
|
|
6414
6519
|
* Prefer `.textContent` over `.innerText`.
|
|
6415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6416
6521
|
*/
|
|
6417
6522
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6418
6523
|
/**
|
|
6419
6524
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6525
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
|
|
6421
6526
|
*/
|
|
6422
6527
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6423
6528
|
/**
|
|
6424
6529
|
* Prefer `export…from` when re-exporting.
|
|
6425
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6530
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
|
|
6426
6531
|
*/
|
|
6427
6532
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6428
6533
|
/**
|
|
6429
6534
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6535
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
|
|
6431
6536
|
*/
|
|
6432
6537
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6433
6538
|
/**
|
|
6434
6539
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6435
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6540
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6436
6541
|
*/
|
|
6437
6542
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6438
6543
|
/**
|
|
6439
6544
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
|
|
6441
6546
|
*/
|
|
6442
6547
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6443
6548
|
/**
|
|
6444
6549
|
* Prefer reading a JSON file as a buffer.
|
|
6445
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
6446
6551
|
*/
|
|
6447
6552
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6448
6553
|
/**
|
|
6449
6554
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6555
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6451
6556
|
*/
|
|
6452
6557
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6453
6558
|
/**
|
|
6454
6559
|
* Prefer using a logical operator over a ternary.
|
|
6455
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6456
6561
|
*/
|
|
6457
6562
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6458
6563
|
/**
|
|
6459
6564
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6565
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
|
|
6461
6566
|
*/
|
|
6462
6567
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6463
6568
|
/**
|
|
6464
6569
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
|
|
6466
6571
|
*/
|
|
6467
6572
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6468
6573
|
/**
|
|
6469
6574
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6471
6576
|
*/
|
|
6472
6577
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6473
6578
|
/**
|
|
6474
6579
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6476
6581
|
*/
|
|
6477
6582
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6478
6583
|
/**
|
|
6479
6584
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
|
|
6481
6586
|
*/
|
|
6482
6587
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6483
6588
|
/**
|
|
6484
6589
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6590
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6486
6591
|
*/
|
|
6487
6592
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6488
6593
|
/**
|
|
6489
6594
|
* Prefer negative index over `.length - index` when possible.
|
|
6490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6595
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
|
|
6491
6596
|
*/
|
|
6492
6597
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6493
6598
|
/**
|
|
6494
6599
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
|
|
6496
6601
|
*/
|
|
6497
6602
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6498
6603
|
/**
|
|
6499
6604
|
* Prefer `Number` static properties over global ones.
|
|
6500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
|
|
6501
6606
|
*/
|
|
6502
6607
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6503
6608
|
/**
|
|
6504
6609
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
|
|
6506
6611
|
*/
|
|
6507
6612
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6508
6613
|
/**
|
|
6509
6614
|
* Prefer omitting the `catch` binding parameter.
|
|
6510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6511
6616
|
*/
|
|
6512
6617
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6513
6618
|
/**
|
|
6514
6619
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
|
|
6516
6621
|
*/
|
|
6517
6622
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6518
6623
|
/**
|
|
6519
6624
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6625
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
|
|
6521
6626
|
*/
|
|
6522
6627
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
6523
6628
|
/**
|
|
6524
6629
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
|
|
6526
6631
|
*/
|
|
6527
6632
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6528
6633
|
/**
|
|
6529
6634
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
|
|
6531
6636
|
*/
|
|
6532
6637
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6533
6638
|
/**
|
|
6534
6639
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6640
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
|
|
6536
6641
|
*/
|
|
6537
6642
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
6538
6643
|
/**
|
|
6539
6644
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6645
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
|
|
6541
6646
|
*/
|
|
6542
6647
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6543
6648
|
/**
|
|
6544
6649
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
|
|
6546
6651
|
*/
|
|
6547
6652
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6548
6653
|
/**
|
|
6549
6654
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6655
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
|
|
6551
6656
|
*/
|
|
6552
6657
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6553
6658
|
/**
|
|
6554
6659
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
|
|
6556
6661
|
*/
|
|
6557
6662
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6558
6663
|
/**
|
|
6559
6664
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
|
|
6561
6666
|
*/
|
|
6562
6667
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6563
6668
|
/**
|
|
6564
6669
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6670
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
|
|
6566
6671
|
*/
|
|
6567
6672
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
6568
6673
|
/**
|
|
6569
6674
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6675
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6571
6676
|
*/
|
|
6572
6677
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6573
6678
|
/**
|
|
6574
6679
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6576
6681
|
*/
|
|
6577
6682
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6578
6683
|
/**
|
|
6579
6684
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
|
|
6581
6686
|
*/
|
|
6582
6687
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6583
6688
|
/**
|
|
6584
6689
|
* Prefer `switch` over multiple `else-if`.
|
|
6585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
|
|
6586
6691
|
*/
|
|
6587
6692
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6588
6693
|
/**
|
|
6589
6694
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6695
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
|
|
6591
6696
|
*/
|
|
6592
6697
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6593
6698
|
/**
|
|
6594
6699
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6700
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
|
|
6596
6701
|
*/
|
|
6597
6702
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6598
6703
|
/**
|
|
6599
6704
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6705
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
|
|
6601
6706
|
*/
|
|
6602
6707
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6603
6708
|
/**
|
|
6604
6709
|
* Prevent abbreviations.
|
|
6605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
|
|
6606
6711
|
*/
|
|
6607
6712
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
6608
6713
|
/**
|
|
6609
6714
|
* Enforce consistent relative URL style.
|
|
6610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
|
|
6611
6716
|
*/
|
|
6612
6717
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6613
6718
|
/**
|
|
6614
6719
|
* Enforce using the separator argument with `Array#join()`.
|
|
6615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6720
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
|
|
6616
6721
|
*/
|
|
6617
6722
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6723
|
+
/**
|
|
6724
|
+
* Require non-empty specifier list in import and export statements.
|
|
6725
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
|
|
6726
|
+
*/
|
|
6727
|
+
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6618
6728
|
/**
|
|
6619
6729
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6730
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6621
6731
|
*/
|
|
6622
6732
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6623
6733
|
/**
|
|
6624
6734
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
|
|
6626
6736
|
*/
|
|
6627
6737
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6628
6738
|
/**
|
|
6629
6739
|
* Enforce better string content.
|
|
6630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
|
|
6631
6741
|
*/
|
|
6632
6742
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6633
6743
|
/**
|
|
6634
6744
|
* Enforce consistent brace style for `case` clauses.
|
|
6635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
|
|
6636
6746
|
*/
|
|
6637
6747
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6638
6748
|
/**
|
|
6639
6749
|
* Fix whitespace-insensitive template indentation.
|
|
6640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
|
|
6641
6751
|
*/
|
|
6642
6752
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6643
6753
|
/**
|
|
6644
6754
|
* Enforce consistent case for text encoding identifiers.
|
|
6645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6646
6756
|
*/
|
|
6647
6757
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>;
|
|
6648
6758
|
/**
|
|
6649
6759
|
* Require `new` when creating an error.
|
|
6650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
|
|
6651
6761
|
*/
|
|
6652
6762
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6653
6763
|
/**
|
|
@@ -7657,7 +7767,7 @@ interface RuleOptions {
|
|
|
7657
7767
|
*/
|
|
7658
7768
|
'vue/no-restricted-custom-event'?: Linter.RuleEntry<VueNoRestrictedCustomEvent>;
|
|
7659
7769
|
/**
|
|
7660
|
-
* disallow specific
|
|
7770
|
+
* disallow specific elements
|
|
7661
7771
|
* @see https://eslint.vuejs.org/rules/no-restricted-html-elements.html
|
|
7662
7772
|
*/
|
|
7663
7773
|
'vue/no-restricted-html-elements'?: Linter.RuleEntry<VueNoRestrictedHtmlElements>;
|
|
@@ -9336,7 +9446,6 @@ type TypescriptEslintPreferDestructuring = [] | [({
|
|
|
9336
9446
|
}), {
|
|
9337
9447
|
enforceForDeclarationWithTypeAnnotation?: boolean;
|
|
9338
9448
|
enforceForRenamedProperties?: boolean;
|
|
9339
|
-
[k: string]: unknown | undefined;
|
|
9340
9449
|
}];
|
|
9341
9450
|
// ----- @typescript-eslint/prefer-literal-enum-member -----
|
|
9342
9451
|
type TypescriptEslintPreferLiteralEnumMember = [] | [{
|
|
@@ -9354,7 +9463,6 @@ type TypescriptEslintPreferNullishCoalescing = [] | [{
|
|
|
9354
9463
|
boolean?: boolean;
|
|
9355
9464
|
number?: boolean;
|
|
9356
9465
|
string?: boolean;
|
|
9357
|
-
[k: string]: unknown | undefined;
|
|
9358
9466
|
} | true);
|
|
9359
9467
|
ignoreTernaryTests?: boolean;
|
|
9360
9468
|
}];
|
|
@@ -9504,6 +9612,7 @@ type AccessorPairs = [] | [{
|
|
|
9504
9612
|
getWithoutSet?: boolean;
|
|
9505
9613
|
setWithoutGet?: boolean;
|
|
9506
9614
|
enforceForClassMembers?: boolean;
|
|
9615
|
+
enforceForTSTypes?: boolean;
|
|
9507
9616
|
}];
|
|
9508
9617
|
// ----- antfu/consistent-chaining -----
|
|
9509
9618
|
type AntfuConsistentChaining = [] | [{
|
|
@@ -9846,7 +9955,9 @@ type GithubActionValidTimeoutMinutes = [] | [(number | {
|
|
|
9846
9955
|
});
|
|
9847
9956
|
})];
|
|
9848
9957
|
// ----- grouped-accessor-pairs -----
|
|
9849
|
-
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")]
|
|
9958
|
+
type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")] | [("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
|
|
9959
|
+
enforceForTSTypes?: boolean;
|
|
9960
|
+
}];
|
|
9850
9961
|
// ----- handle-callback-err -----
|
|
9851
9962
|
type HandleCallbackErr = [] | [string];
|
|
9852
9963
|
// ----- id-blacklist -----
|
|
@@ -10331,8 +10442,8 @@ type JsdocMatchName = [] | [{
|
|
|
10331
10442
|
context?: string;
|
|
10332
10443
|
disallowName?: string;
|
|
10333
10444
|
message?: string;
|
|
10445
|
+
replacement?: string;
|
|
10334
10446
|
tags?: string[];
|
|
10335
|
-
[k: string]: unknown | undefined;
|
|
10336
10447
|
}[];
|
|
10337
10448
|
}];
|
|
10338
10449
|
// ----- jsdoc/multiline-blocks -----
|
|
@@ -10406,7 +10517,6 @@ type JsdocRequireAsteriskPrefix = [] | [("always" | "never" | "any")] | [("alway
|
|
|
10406
10517
|
always?: string[];
|
|
10407
10518
|
any?: string[];
|
|
10408
10519
|
never?: string[];
|
|
10409
|
-
[k: string]: unknown | undefined;
|
|
10410
10520
|
};
|
|
10411
10521
|
}];
|
|
10412
10522
|
// ----- jsdoc/require-description -----
|
|
@@ -10616,7 +10726,6 @@ type JsdocSortTags = [] | [{
|
|
|
10616
10726
|
reportTagGroupSpacing?: boolean;
|
|
10617
10727
|
tagSequence?: {
|
|
10618
10728
|
tags?: string[];
|
|
10619
|
-
[k: string]: unknown | undefined;
|
|
10620
10729
|
}[];
|
|
10621
10730
|
}];
|
|
10622
10731
|
// ----- jsdoc/tag-lines -----
|
|
@@ -11306,6 +11415,12 @@ type MarkdownNoDuplicateDefinitions = [] | [{
|
|
|
11306
11415
|
type MarkdownNoDuplicateHeadings = [] | [{
|
|
11307
11416
|
checkSiblingsOnly?: boolean;
|
|
11308
11417
|
}];
|
|
11418
|
+
// ----- markdown/no-empty-definitions -----
|
|
11419
|
+
type MarkdownNoEmptyDefinitions = [] | [{
|
|
11420
|
+
allowDefinitions?: string[];
|
|
11421
|
+
allowFootnoteDefinitions?: string[];
|
|
11422
|
+
checkFootnoteDefinitions?: boolean;
|
|
11423
|
+
}];
|
|
11309
11424
|
// ----- markdown/no-html -----
|
|
11310
11425
|
type MarkdownNoHtml = [] | [{
|
|
11311
11426
|
allowed?: string[];
|
|
@@ -11319,6 +11434,15 @@ type MarkdownNoMissingLinkFragments = [] | [{
|
|
|
11319
11434
|
type MarkdownNoMultipleH1 = [] | [{
|
|
11320
11435
|
frontmatterTitle?: string;
|
|
11321
11436
|
}];
|
|
11437
|
+
// ----- markdown/no-unused-definitions -----
|
|
11438
|
+
type MarkdownNoUnusedDefinitions = [] | [{
|
|
11439
|
+
allowDefinitions?: string[];
|
|
11440
|
+
allowFootnoteDefinitions?: string[];
|
|
11441
|
+
}];
|
|
11442
|
+
// ----- markdown/table-column-count -----
|
|
11443
|
+
type MarkdownTableColumnCount = [] | [{
|
|
11444
|
+
checkMissingCells?: boolean;
|
|
11445
|
+
}];
|
|
11322
11446
|
// ----- max-classes-per-file -----
|
|
11323
11447
|
type MaxClassesPerFile = [] | [(number | {
|
|
11324
11448
|
ignoreExpressions?: boolean;
|
|
@@ -11803,6 +11927,7 @@ type NoUnusedVars = [] | [(("all" | "local") | {
|
|
|
11803
11927
|
caughtErrorsIgnorePattern?: string;
|
|
11804
11928
|
destructuredArrayIgnorePattern?: string;
|
|
11805
11929
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
11930
|
+
ignoreUsingDeclarations?: boolean;
|
|
11806
11931
|
reportUsedIgnorePattern?: boolean;
|
|
11807
11932
|
})];
|
|
11808
11933
|
// ----- no-use-before-define -----
|
|
@@ -14460,7 +14585,7 @@ type SvgoSvgo = [] | [{
|
|
|
14460
14585
|
textStart?: string;
|
|
14461
14586
|
useShortTags?: boolean;
|
|
14462
14587
|
};
|
|
14463
|
-
plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeXMLProcInst" | "sortAttrs" | "sortDefsChildren" | "
|
|
14588
|
+
plugins?: (("preset-default" | "cleanupAttrs" | "cleanupEnableBackground" | "cleanupIds" | "cleanupNumericValues" | "collapseGroups" | "convertColors" | "convertEllipseToCircle" | "convertPathData" | "convertShapeToPath" | "convertTransform" | "inlineStyles" | "mergePaths" | "mergeStyles" | "minifyStyles" | "moveElemsAttrsToGroup" | "moveGroupAttrsToElems" | "removeComments" | "removeDesc" | "removeDoctype" | "removeEditorsNSData" | "removeEmptyAttrs" | "removeEmptyContainers" | "removeEmptyText" | "removeHiddenElems" | "removeMetadata" | "removeNonInheritableGroupAttrs" | "removeUnknownsAndDefaults" | "removeUnusedNS" | "removeUselessDefs" | "removeUselessStrokeAndFill" | "removeXMLProcInst" | "sortAttrs" | "sortDefsChildren" | "cleanupListOfValues" | "convertOneStopGradients" | "convertStyleToAttrs" | "prefixIds" | "removeDeprecatedAttrs" | "removeDimensions" | "removeOffCanvasPaths" | "removeRasterImages" | "removeScripts" | "removeStyleElement" | "removeTitle" | "removeViewBox" | "removeXlink" | "removeXMLNS" | "reusePaths" | "addAttributesToSVGElement" | "addClassesToSVGElement" | "removeAttributesBySelector" | "removeAttrs" | "removeElementsByAttr") | {
|
|
14464
14589
|
name: "addAttributesToSVGElement";
|
|
14465
14590
|
params?: {
|
|
14466
14591
|
attribute?: (string | {
|
|
@@ -15112,6 +15237,10 @@ interface _UnicornImportStyle_BooleanObject {
|
|
|
15112
15237
|
type UnicornNoArrayReduce = [] | [{
|
|
15113
15238
|
allowSimpleOperations?: boolean;
|
|
15114
15239
|
}];
|
|
15240
|
+
// ----- unicorn/no-array-reverse -----
|
|
15241
|
+
type UnicornNoArrayReverse = [] | [{
|
|
15242
|
+
allowExpressionStatement?: boolean;
|
|
15243
|
+
}];
|
|
15115
15244
|
// ----- unicorn/no-instanceof-builtins -----
|
|
15116
15245
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
15117
15246
|
useErrorIsError?: boolean;
|