@@ -65,3 +65,83 @@ Options:
65
65
htmlhint --rulesdir ./rules/
66
66
"
67
67
`;
68
+
69
+ exports[`Executable should print rules with --list: stderr 1`] = `""`;
70
+
71
+ exports[`Executable should print rules with --list: stdout 1`] = `
72
+ " All rules:
73
+ ==================================================
74
+ [1malt-require[22m : The alt attribute of an <img > element must be present and alt attribute of area[href] and input[type=image] must have a value.
75
+ [1mattr-lowercase[22m : All attribute names must be in lowercase.
76
+ [1mattr-sorted[22m : Attribute tags must be in proper order.
77
+ [1mattr-no-duplication[22m : Elements cannot have duplicate attributes.
78
+ [1mattr-unsafe-chars[22m : Attribute values cannot contain unsafe chars.
79
+ [1mattr-value-double-quotes[22m : Attribute values must be in double quotes.
80
+ [1mattr-value-not-empty[22m : All attributes must have values.
81
+ [1mattr-value-single-quotes[22m : Attribute values must be in single quotes.
82
+ [1mattr-whitespace[22m : All attributes should be separated by only one space and not have leading/trailing whitespace.
83
+ [1mdoctype-first[22m : Doctype must be declared first.
84
+ [1mdoctype-html5[22m : Invalid doctype. Use: \\"<!DOCTYPE html>\\"
85
+ [1mhead-script-disabled[22m : The <script > tag cannot be used in a <head > tag.
86
+ [1mhref-abs-or-rel[22m : An href attribute must be either absolute or relative.
87
+ [1mhtml-lang-require[22m : The lang attribute of an <html > element must be present and should be valid.
88
+ [1mid-class-ad-disabled[22m : The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.
89
+ [1mid-class-value[22m : The id and class attribute values must meet the specified rules.
90
+ [1mid-unique[22m : The value of id attributes must be unique.
91
+ [1minline-script-disabled[22m : Inline script cannot be used.
92
+ [1minline-style-disabled[22m : Inline style cannot be used.
93
+ [1minput-requires-label[22m : All [ input ] tags must have a corresponding [ label ] tag.
94
+ [1mscript-disabled[22m : The <script > tag cannot be used.
95
+ [1mspace-tab-mixed-disabled[22m : Do not mix tabs and spaces for indentation.
96
+ [1mspec-char-escape[22m : Special characters must be escaped.
97
+ [1msrc-not-empty[22m : The src attribute of an img(script,link) must have a value.
98
+ [1mstyle-disabled[22m : <style > tags cannot be used.
99
+ [1mtag-pair[22m : Tag must be paired.
100
+ [1mtag-self-close[22m : Empty tags must be self closed.
101
+ [1mempty-tag-not-self-closed[22m : Empty tags must not use self closed syntax.
102
+ [1mtagname-lowercase[22m : All html element names must be in lowercase.
103
+ [1mtagname-specialchars[22m : All special characters must be escaped.
104
+ [1mtitle-require[22m : <title > must be present in <head > tag.
105
+ [1mtags-check[22m : Checks html tags.
106
+ [1mattr-no-unnecessary-whitespace[22m : No spaces between attribute names and values."
107
+ `;
108
+
109
+ exports[`Executable should print rules with -l: stderr 1`] = `""`;
110
+
111
+ exports[`Executable should print rules with -l: stdout 1`] = `
112
+ " All rules:
113
+ ==================================================
114
+ [1malt-require[22m : The alt attribute of an <img > element must be present and alt attribute of area[href] and input[type=image] must have a value.
115
+ [1mattr-lowercase[22m : All attribute names must be in lowercase.
116
+ [1mattr-sorted[22m : Attribute tags must be in proper order.
117
+ [1mattr-no-duplication[22m : Elements cannot have duplicate attributes.
118
+ [1mattr-unsafe-chars[22m : Attribute values cannot contain unsafe chars.
119
+ [1mattr-value-double-quotes[22m : Attribute values must be in double quotes.
120
+ [1mattr-value-not-empty[22m : All attributes must have values.
121
+ [1mattr-value-single-quotes[22m : Attribute values must be in single quotes.
122
+ [1mattr-whitespace[22m : All attributes should be separated by only one space and not have leading/trailing whitespace.
123
+ [1mdoctype-first[22m : Doctype must be declared first.
124
+ [1mdoctype-html5[22m : Invalid doctype. Use: \\"<!DOCTYPE html>\\"
125
+ [1mhead-script-disabled[22m : The <script > tag cannot be used in a <head > tag.
126
+ [1mhref-abs-or-rel[22m : An href attribute must be either absolute or relative.
127
+ [1mhtml-lang-require[22m : The lang attribute of an <html > element must be present and should be valid.
128
+ [1mid-class-ad-disabled[22m : The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.
129
+ [1mid-class-value[22m : The id and class attribute values must meet the specified rules.
130
+ [1mid-unique[22m : The value of id attributes must be unique.
131
+ [1minline-script-disabled[22m : Inline script cannot be used.
132
+ [1minline-style-disabled[22m : Inline style cannot be used.
133
+ [1minput-requires-label[22m : All [ input ] tags must have a corresponding [ label ] tag.
134
+ [1mscript-disabled[22m : The <script > tag cannot be used.
135
+ [1mspace-tab-mixed-disabled[22m : Do not mix tabs and spaces for indentation.
136
+ [1mspec-char-escape[22m : Special characters must be escaped.
137
+ [1msrc-not-empty[22m : The src attribute of an img(script,link) must have a value.
138
+ [1mstyle-disabled[22m : <style > tags cannot be used.
139
+ [1mtag-pair[22m : Tag must be paired.
140
+ [1mtag-self-close[22m : Empty tags must be self closed.
141
+ [1mempty-tag-not-self-closed[22m : Empty tags must not use self closed syntax.
142
+ [1mtagname-lowercase[22m : All html element names must be in lowercase.
143
+ [1mtagname-specialchars[22m : All special characters must be escaped.
144
+ [1mtitle-require[22m : <title > must be present in <head > tag.
145
+ [1mtags-check[22m : Checks html tags.
146
+ [1mattr-no-unnecessary-whitespace[22m : No spaces between attribute names and values."
147
+ `;
0 commit comments