@ntnyq/eslint-config 5.0.0 → 5.1.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 +113 -14
- package/dist/index.js +32 -9
- package/package.json +22 -22
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
|
|
@@ -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/
|
|
@@ -7657,7 +7747,7 @@ interface RuleOptions {
|
|
|
7657
7747
|
*/
|
|
7658
7748
|
'vue/no-restricted-custom-event'?: Linter.RuleEntry<VueNoRestrictedCustomEvent>;
|
|
7659
7749
|
/**
|
|
7660
|
-
* disallow specific
|
|
7750
|
+
* disallow specific elements
|
|
7661
7751
|
* @see https://eslint.vuejs.org/rules/no-restricted-html-elements.html
|
|
7662
7752
|
*/
|
|
7663
7753
|
'vue/no-restricted-html-elements'?: Linter.RuleEntry<VueNoRestrictedHtmlElements>;
|
|
@@ -10331,8 +10421,8 @@ type JsdocMatchName = [] | [{
|
|
|
10331
10421
|
context?: string;
|
|
10332
10422
|
disallowName?: string;
|
|
10333
10423
|
message?: string;
|
|
10424
|
+
replacement?: string;
|
|
10334
10425
|
tags?: string[];
|
|
10335
|
-
[k: string]: unknown | undefined;
|
|
10336
10426
|
}[];
|
|
10337
10427
|
}];
|
|
10338
10428
|
// ----- jsdoc/multiline-blocks -----
|
|
@@ -10406,7 +10496,6 @@ type JsdocRequireAsteriskPrefix = [] | [("always" | "never" | "any")] | [("alway
|
|
|
10406
10496
|
always?: string[];
|
|
10407
10497
|
any?: string[];
|
|
10408
10498
|
never?: string[];
|
|
10409
|
-
[k: string]: unknown | undefined;
|
|
10410
10499
|
};
|
|
10411
10500
|
}];
|
|
10412
10501
|
// ----- jsdoc/require-description -----
|
|
@@ -10616,7 +10705,6 @@ type JsdocSortTags = [] | [{
|
|
|
10616
10705
|
reportTagGroupSpacing?: boolean;
|
|
10617
10706
|
tagSequence?: {
|
|
10618
10707
|
tags?: string[];
|
|
10619
|
-
[k: string]: unknown | undefined;
|
|
10620
10708
|
}[];
|
|
10621
10709
|
}];
|
|
10622
10710
|
// ----- jsdoc/tag-lines -----
|
|
@@ -11306,6 +11394,12 @@ type MarkdownNoDuplicateDefinitions = [] | [{
|
|
|
11306
11394
|
type MarkdownNoDuplicateHeadings = [] | [{
|
|
11307
11395
|
checkSiblingsOnly?: boolean;
|
|
11308
11396
|
}];
|
|
11397
|
+
// ----- markdown/no-empty-definitions -----
|
|
11398
|
+
type MarkdownNoEmptyDefinitions = [] | [{
|
|
11399
|
+
allowDefinitions?: string[];
|
|
11400
|
+
allowFootnoteDefinitions?: string[];
|
|
11401
|
+
checkFootnoteDefinitions?: boolean;
|
|
11402
|
+
}];
|
|
11309
11403
|
// ----- markdown/no-html -----
|
|
11310
11404
|
type MarkdownNoHtml = [] | [{
|
|
11311
11405
|
allowed?: string[];
|
|
@@ -11319,6 +11413,11 @@ type MarkdownNoMissingLinkFragments = [] | [{
|
|
|
11319
11413
|
type MarkdownNoMultipleH1 = [] | [{
|
|
11320
11414
|
frontmatterTitle?: string;
|
|
11321
11415
|
}];
|
|
11416
|
+
// ----- markdown/no-unused-definitions -----
|
|
11417
|
+
type MarkdownNoUnusedDefinitions = [] | [{
|
|
11418
|
+
allowDefinitions?: string[];
|
|
11419
|
+
allowFootnoteDefinitions?: string[];
|
|
11420
|
+
}];
|
|
11322
11421
|
// ----- max-classes-per-file -----
|
|
11323
11422
|
type MaxClassesPerFile = [] | [(number | {
|
|
11324
11423
|
ignoreExpressions?: boolean;
|
|
@@ -14460,7 +14559,7 @@ type SvgoSvgo = [] | [{
|
|
|
14460
14559
|
textStart?: string;
|
|
14461
14560
|
useShortTags?: boolean;
|
|
14462
14561
|
};
|
|
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" | "
|
|
14562
|
+
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
14563
|
name: "addAttributesToSVGElement";
|
|
14465
14564
|
params?: {
|
|
14466
14565
|
attribute?: (string | {
|
package/dist/index.js
CHANGED
|
@@ -115,6 +115,7 @@ const GLOB_EXCLUDE = [
|
|
|
115
115
|
GLOB_NODE_MODULES,
|
|
116
116
|
GLOB_DIST,
|
|
117
117
|
...GLOB_LOCKFILE,
|
|
118
|
+
"**/.pnpm-store/**",
|
|
118
119
|
"!.github",
|
|
119
120
|
"!.vitepress",
|
|
120
121
|
"!.vuepress",
|
|
@@ -941,6 +942,11 @@ const configSort = (options = {}) => {
|
|
|
941
942
|
order: { type: "asc" },
|
|
942
943
|
pathPattern: "^contributes.*$"
|
|
943
944
|
},
|
|
945
|
+
(
|
|
946
|
+
/**
|
|
947
|
+
* pnpm publish config
|
|
948
|
+
* @see {@link https://pnpm.io/package_json#publishconfig}
|
|
949
|
+
*/
|
|
944
950
|
{
|
|
945
951
|
pathPattern: "^publishConfig.*$",
|
|
946
952
|
order: [
|
|
@@ -951,7 +957,7 @@ const configSort = (options = {}) => {
|
|
|
951
957
|
"default",
|
|
952
958
|
{ order: { type: "asc" } }
|
|
953
959
|
]
|
|
954
|
-
},
|
|
960
|
+
}),
|
|
955
961
|
{
|
|
956
962
|
order: { type: "asc" },
|
|
957
963
|
pathPattern: "^scripts$"
|
|
@@ -1114,7 +1120,16 @@ const configSVGO = (options = {}) => {
|
|
|
1114
1120
|
ignores,
|
|
1115
1121
|
plugins: { svgo: pluginSvgo },
|
|
1116
1122
|
languageOptions: { parser: parserPlain },
|
|
1117
|
-
rules: {
|
|
1123
|
+
rules: {
|
|
1124
|
+
"svgo/svgo": ["error", {
|
|
1125
|
+
plugins: ["preset-default"],
|
|
1126
|
+
js2svg: {
|
|
1127
|
+
indent: 2,
|
|
1128
|
+
pretty: true
|
|
1129
|
+
}
|
|
1130
|
+
}],
|
|
1131
|
+
...options.overrides
|
|
1132
|
+
}
|
|
1118
1133
|
}];
|
|
1119
1134
|
};
|
|
1120
1135
|
|
|
@@ -2150,12 +2165,16 @@ const configMarkdown = (options = {}) => {
|
|
|
2150
2165
|
...config,
|
|
2151
2166
|
name: `ntnyq/${config.name}`
|
|
2152
2167
|
})),
|
|
2168
|
+
(
|
|
2169
|
+
/**
|
|
2170
|
+
* enhance `markdown/recommended/processor`
|
|
2171
|
+
*/
|
|
2153
2172
|
{
|
|
2154
2173
|
name: "ntnyq/markdown/processor",
|
|
2155
2174
|
files,
|
|
2156
2175
|
ignores: [GLOB_MARKDOWN_NESTED],
|
|
2157
2176
|
processor: mergeProcessors([pluginMarkdown.processors.markdown, processorPassThrough])
|
|
2158
|
-
},
|
|
2177
|
+
}),
|
|
2159
2178
|
{
|
|
2160
2179
|
name: "ntnyq/markdown/parser",
|
|
2161
2180
|
files,
|
|
@@ -2260,12 +2279,16 @@ const configPrettier = (options = {}) => {
|
|
|
2260
2279
|
"prettier/prettier": options.severity || "warn",
|
|
2261
2280
|
...options.overrides
|
|
2262
2281
|
}
|
|
2263
|
-
},
|
|
2282
|
+
}, (
|
|
2283
|
+
/**
|
|
2284
|
+
* Languages that prettier currently does not support
|
|
2285
|
+
*/
|
|
2286
|
+
{
|
|
2264
2287
|
name: "ntnyq/prettier/disabled",
|
|
2265
2288
|
files: [...disabledFiles, ...userDisabledFiles],
|
|
2266
2289
|
plugins: { prettier: pluginPrettier },
|
|
2267
2290
|
rules: { "prettier/prettier": "off" }
|
|
2268
|
-
}];
|
|
2291
|
+
})];
|
|
2269
2292
|
};
|
|
2270
2293
|
|
|
2271
2294
|
//#endregion
|
|
@@ -2839,7 +2862,7 @@ const configGitHubAction = (options = {}) => {
|
|
|
2839
2862
|
* @returns ESLint configs
|
|
2840
2863
|
*/
|
|
2841
2864
|
const configPerfectionist = (options = {}) => {
|
|
2842
|
-
const { partitionByComment = PERFECTIONIST.partialRuleOptions.partitionByComment, sortConstants: enableSortConstants = true, sortEnums: enableSortEnums = true, sortTypes: enableSortTypes = true } = options;
|
|
2865
|
+
const { filesEnums = [`**/enums/${GLOB_SRC}`, `**/enums.${GLOB_SRC_EXT}`], filesTypes = [...GLOB_TYPES], partitionByComment = PERFECTIONIST.partialRuleOptions.partitionByComment, sortConstants: enableSortConstants = true, sortEnums: enableSortEnums = true, sortTypes: enableSortTypes = true, filesConstants = [`**/constants/${GLOB_SRC}`, `**/constants.${GLOB_SRC_EXT}`] } = options;
|
|
2843
2866
|
const sharedOptionsWithNewlinesBetween = {
|
|
2844
2867
|
newlinesBetween: "ignore",
|
|
2845
2868
|
partitionByComment
|
|
@@ -2936,7 +2959,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
2936
2959
|
if (options.all) return configs;
|
|
2937
2960
|
if (enableSortEnums) configs.push({
|
|
2938
2961
|
name: "ntnyq/perfectionist/enums",
|
|
2939
|
-
files:
|
|
2962
|
+
files: filesEnums,
|
|
2940
2963
|
plugins: { perfectionist: pluginPerfectionist },
|
|
2941
2964
|
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
2942
2965
|
rules: {
|
|
@@ -2947,7 +2970,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
2947
2970
|
});
|
|
2948
2971
|
if (enableSortTypes) configs.push({
|
|
2949
2972
|
name: "ntnyq/perfectionist/types",
|
|
2950
|
-
files:
|
|
2973
|
+
files: filesTypes,
|
|
2951
2974
|
plugins: { perfectionist: pluginPerfectionist },
|
|
2952
2975
|
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
2953
2976
|
rules: {
|
|
@@ -2958,7 +2981,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
2958
2981
|
});
|
|
2959
2982
|
if (enableSortConstants) configs.push({
|
|
2960
2983
|
name: "ntnyq/perfectionist/constants",
|
|
2961
|
-
files:
|
|
2984
|
+
files: filesConstants,
|
|
2962
2985
|
plugins: { perfectionist: pluginPerfectionist },
|
|
2963
2986
|
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
2964
2987
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"tag": "latest"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
40
|
-
"@html-eslint/parser": "^0.
|
|
39
|
+
"@html-eslint/eslint-plugin": "^0.42.0",
|
|
40
|
+
"@html-eslint/parser": "^0.42.0",
|
|
41
41
|
"astro-eslint-parser": "^1.2.2",
|
|
42
42
|
"eslint": "^9.20.0",
|
|
43
43
|
"eslint-plugin-astro": "^1.3.1",
|
|
44
|
-
"eslint-plugin-eslint-plugin": "^6.
|
|
44
|
+
"eslint-plugin-eslint-plugin": "^6.5.0",
|
|
45
45
|
"eslint-plugin-format": "^1.0.1",
|
|
46
|
-
"eslint-plugin-pnpm": "^0.
|
|
47
|
-
"eslint-plugin-svelte": "^3.
|
|
46
|
+
"eslint-plugin-pnpm": "^1.0.0",
|
|
47
|
+
"eslint-plugin-svelte": "^3.10.1",
|
|
48
48
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
49
49
|
"svelte": "^5.31.1",
|
|
50
50
|
"svelte-eslint-parser": "^1.2.0"
|
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
"@antfu/install-pkg": "^1.1.0",
|
|
89
89
|
"@clack/prompts": "^0.11.0",
|
|
90
90
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
91
|
-
"@eslint/js": "^9.
|
|
92
|
-
"@eslint/markdown": "^
|
|
93
|
-
"@unocss/eslint-plugin": "^66.3.
|
|
94
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
91
|
+
"@eslint/js": "^9.31.0",
|
|
92
|
+
"@eslint/markdown": "^7.0.0",
|
|
93
|
+
"@unocss/eslint-plugin": "^66.3.3",
|
|
94
|
+
"@vitest/eslint-plugin": "^1.3.4",
|
|
95
95
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
96
96
|
"eslint-flat-config-utils": "^2.1.0",
|
|
97
97
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
@@ -103,39 +103,39 @@
|
|
|
103
103
|
"eslint-plugin-depend": "^1.2.0",
|
|
104
104
|
"eslint-plugin-github-action": "^0.0.16",
|
|
105
105
|
"eslint-plugin-import-x": "^4.16.1",
|
|
106
|
-
"eslint-plugin-jsdoc": "^51.
|
|
106
|
+
"eslint-plugin-jsdoc": "^51.4.1",
|
|
107
107
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
108
|
-
"eslint-plugin-n": "^17.
|
|
108
|
+
"eslint-plugin-n": "^17.21.0",
|
|
109
109
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
110
110
|
"eslint-plugin-ntnyq": "^0.11.0",
|
|
111
111
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
112
112
|
"eslint-plugin-pinia": "^0.4.1",
|
|
113
|
-
"eslint-plugin-prettier": "^5.5.
|
|
113
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
114
114
|
"eslint-plugin-regexp": "^2.9.0",
|
|
115
|
-
"eslint-plugin-svgo": "^0.
|
|
115
|
+
"eslint-plugin-svgo": "^0.10.0",
|
|
116
116
|
"eslint-plugin-toml": "^0.12.0",
|
|
117
117
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
118
|
-
"eslint-plugin-vue": "^10.
|
|
118
|
+
"eslint-plugin-vue": "^10.3.0",
|
|
119
119
|
"eslint-plugin-yml": "^1.18.0",
|
|
120
120
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
121
|
-
"globals": "^16.
|
|
121
|
+
"globals": "^16.3.0",
|
|
122
122
|
"jsonc-eslint-parser": "^2.4.0",
|
|
123
123
|
"local-pkg": "^1.1.1",
|
|
124
124
|
"prettier": "^3.6.2",
|
|
125
125
|
"toml-eslint-parser": "^0.10.0",
|
|
126
|
-
"typescript-eslint": "^8.
|
|
127
|
-
"vue-eslint-parser": "^10.
|
|
126
|
+
"typescript-eslint": "^8.37.0",
|
|
127
|
+
"vue-eslint-parser": "^10.2.0",
|
|
128
128
|
"yaml-eslint-parser": "^1.3.0"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
131
|
"@ntnyq/prettier-config": "^3.0.1",
|
|
132
|
-
"@types/node": "^24.0.
|
|
133
|
-
"@typescript-eslint/utils": "^8.
|
|
132
|
+
"@types/node": "^24.0.15",
|
|
133
|
+
"@typescript-eslint/utils": "^8.37.0",
|
|
134
134
|
"bumpp": "^10.2.0",
|
|
135
135
|
"consola": "^3.4.2",
|
|
136
|
-
"eslint": "^9.
|
|
136
|
+
"eslint": "^9.31.0",
|
|
137
137
|
"eslint-plugin-eslint-plugin": "^6.5.0",
|
|
138
|
-
"eslint-typegen": "^2.2.
|
|
138
|
+
"eslint-typegen": "^2.2.1",
|
|
139
139
|
"husky": "^9.1.7",
|
|
140
140
|
"jiti": "^2.4.2",
|
|
141
141
|
"nano-staged": "^0.8.0",
|