@herb-tools/linter 0.4.3 → 0.6.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.
Files changed (254) hide show
  1. package/README.md +216 -19
  2. package/dist/herb-lint.js +5559 -1860
  3. package/dist/herb-lint.js.map +1 -1
  4. package/dist/index.cjs +722 -187
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.js +714 -189
  7. package/dist/index.js.map +1 -1
  8. package/dist/package.json +4 -4
  9. package/dist/src/cli/argument-parser.js +28 -22
  10. package/dist/src/cli/argument-parser.js.map +1 -1
  11. package/dist/src/cli/file-processor.js +19 -13
  12. package/dist/src/cli/file-processor.js.map +1 -1
  13. package/dist/src/cli/formatters/detailed-formatter.js +9 -9
  14. package/dist/src/cli/formatters/detailed-formatter.js.map +1 -1
  15. package/dist/src/cli/formatters/github-actions-formatter.js +50 -0
  16. package/dist/src/cli/formatters/github-actions-formatter.js.map +1 -0
  17. package/dist/src/cli/formatters/index.js +2 -0
  18. package/dist/src/cli/formatters/index.js.map +1 -1
  19. package/dist/src/cli/formatters/json-formatter.js +58 -0
  20. package/dist/src/cli/formatters/json-formatter.js.map +1 -0
  21. package/dist/src/cli/formatters/simple-formatter.js +15 -15
  22. package/dist/src/cli/formatters/simple-formatter.js.map +1 -1
  23. package/dist/src/cli/output-manager.js +120 -0
  24. package/dist/src/cli/output-manager.js.map +1 -0
  25. package/dist/src/cli/summary-reporter.js +22 -22
  26. package/dist/src/cli/summary-reporter.js.map +1 -1
  27. package/dist/src/cli.js +41 -26
  28. package/dist/src/cli.js.map +1 -1
  29. package/dist/src/default-rules.js +22 -0
  30. package/dist/src/default-rules.js.map +1 -1
  31. package/dist/src/linter.js +29 -4
  32. package/dist/src/linter.js.map +1 -1
  33. package/dist/src/rules/erb-no-empty-tags.js +2 -2
  34. package/dist/src/rules/erb-no-empty-tags.js.map +1 -1
  35. package/dist/src/rules/erb-no-output-control-flow.js +2 -2
  36. package/dist/src/rules/erb-no-output-control-flow.js.map +1 -1
  37. package/dist/src/rules/erb-no-silent-tag-in-attribute-name.js +26 -0
  38. package/dist/src/rules/erb-no-silent-tag-in-attribute-name.js.map +1 -0
  39. package/dist/src/rules/erb-prefer-image-tag-helper.js +2 -6
  40. package/dist/src/rules/erb-prefer-image-tag-helper.js.map +1 -1
  41. package/dist/src/rules/erb-require-whitespace-inside-tags.js +2 -2
  42. package/dist/src/rules/erb-require-whitespace-inside-tags.js.map +1 -1
  43. package/dist/src/rules/erb-requires-trailing-newline.js.map +1 -1
  44. package/dist/src/rules/html-anchor-require-href.js +2 -2
  45. package/dist/src/rules/html-anchor-require-href.js.map +1 -1
  46. package/dist/src/rules/html-aria-attribute-must-be-valid.js +13 -12
  47. package/dist/src/rules/html-aria-attribute-must-be-valid.js.map +1 -1
  48. package/dist/src/rules/html-aria-label-is-well-formatted.js +33 -0
  49. package/dist/src/rules/html-aria-label-is-well-formatted.js.map +1 -0
  50. package/dist/src/rules/html-aria-level-must-be-valid.js +28 -6
  51. package/dist/src/rules/html-aria-level-must-be-valid.js.map +1 -1
  52. package/dist/src/rules/html-aria-role-heading-requires-level.js +9 -15
  53. package/dist/src/rules/html-aria-role-heading-requires-level.js.map +1 -1
  54. package/dist/src/rules/html-aria-role-must-be-valid.js +5 -5
  55. package/dist/src/rules/html-aria-role-must-be-valid.js.map +1 -1
  56. package/dist/src/rules/html-attribute-double-quotes.js +16 -6
  57. package/dist/src/rules/html-attribute-double-quotes.js.map +1 -1
  58. package/dist/src/rules/html-attribute-equals-spacing.js +24 -0
  59. package/dist/src/rules/html-attribute-equals-spacing.js.map +1 -0
  60. package/dist/src/rules/html-attribute-values-require-quotes.js +21 -10
  61. package/dist/src/rules/html-attribute-values-require-quotes.js.map +1 -1
  62. package/dist/src/rules/html-avoid-both-disabled-and-aria-disabled.js +47 -0
  63. package/dist/src/rules/html-avoid-both-disabled-and-aria-disabled.js.map +1 -0
  64. package/dist/src/rules/html-boolean-attributes-no-value.js +11 -4
  65. package/dist/src/rules/html-boolean-attributes-no-value.js.map +1 -1
  66. package/dist/src/rules/html-iframe-has-title.js +39 -0
  67. package/dist/src/rules/html-iframe-has-title.js.map +1 -0
  68. package/dist/src/rules/html-img-require-alt.js +2 -6
  69. package/dist/src/rules/html-img-require-alt.js.map +1 -1
  70. package/dist/src/rules/html-navigation-has-label.js +43 -0
  71. package/dist/src/rules/html-navigation-has-label.js.map +1 -0
  72. package/dist/src/rules/html-no-aria-hidden-on-focusable.js +67 -0
  73. package/dist/src/rules/html-no-aria-hidden-on-focusable.js.map +1 -0
  74. package/dist/src/rules/html-no-block-inside-inline.js +4 -4
  75. package/dist/src/rules/html-no-block-inside-inline.js.map +1 -1
  76. package/dist/src/rules/html-no-duplicate-attributes.js +24 -27
  77. package/dist/src/rules/html-no-duplicate-attributes.js.map +1 -1
  78. package/dist/src/rules/html-no-duplicate-ids.js +4 -4
  79. package/dist/src/rules/html-no-duplicate-ids.js.map +1 -1
  80. package/dist/src/rules/html-no-empty-headings.js +2 -23
  81. package/dist/src/rules/html-no-empty-headings.js.map +1 -1
  82. package/dist/src/rules/html-no-nested-links.js +2 -2
  83. package/dist/src/rules/html-no-nested-links.js.map +1 -1
  84. package/dist/src/rules/html-no-positive-tab-index.js +21 -0
  85. package/dist/src/rules/html-no-positive-tab-index.js.map +1 -0
  86. package/dist/src/rules/html-no-self-closing.js +22 -0
  87. package/dist/src/rules/html-no-self-closing.js.map +1 -0
  88. package/dist/src/rules/html-no-title-attribute.js +27 -0
  89. package/dist/src/rules/html-no-title-attribute.js.map +1 -0
  90. package/dist/src/rules/html-tag-name-lowercase.js +37 -25
  91. package/dist/src/rules/html-tag-name-lowercase.js.map +1 -1
  92. package/dist/src/rules/index.js +10 -0
  93. package/dist/src/rules/index.js.map +1 -1
  94. package/dist/src/rules/parser-no-errors.js +18 -0
  95. package/dist/src/rules/parser-no-errors.js.map +1 -0
  96. package/dist/src/rules/rule-utils.js +176 -22
  97. package/dist/src/rules/rule-utils.js.map +1 -1
  98. package/dist/src/rules/svg-tag-name-capitalization.js +2 -10
  99. package/dist/src/rules/svg-tag-name-capitalization.js.map +1 -1
  100. package/dist/src/types.js.map +1 -1
  101. package/dist/tsconfig.tsbuildinfo +1 -1
  102. package/dist/types/cli/argument-parser.d.ts +2 -1
  103. package/dist/types/cli/file-processor.d.ts +6 -5
  104. package/dist/types/cli/formatters/base-formatter.d.ts +2 -2
  105. package/dist/types/cli/formatters/detailed-formatter.d.ts +2 -2
  106. package/dist/types/cli/formatters/github-actions-formatter.d.ts +12 -0
  107. package/dist/types/cli/formatters/index.d.ts +2 -0
  108. package/dist/types/cli/formatters/json-formatter.d.ts +42 -0
  109. package/dist/types/cli/formatters/simple-formatter.d.ts +2 -2
  110. package/dist/types/cli/index.d.ts +4 -0
  111. package/dist/types/cli/output-manager.d.ts +31 -0
  112. package/dist/types/cli/summary-reporter.d.ts +3 -3
  113. package/dist/types/cli.d.ts +3 -1
  114. package/dist/types/rules/erb-no-empty-tags.d.ts +2 -2
  115. package/dist/types/rules/erb-no-output-control-flow.d.ts +2 -2
  116. package/dist/types/rules/erb-no-silent-tag-in-attribute-name.d.ts +7 -0
  117. package/dist/types/rules/erb-prefer-image-tag-helper.d.ts +2 -2
  118. package/dist/types/rules/erb-require-whitespace-inside-tags.d.ts +2 -2
  119. package/dist/types/rules/html-anchor-require-href.d.ts +2 -2
  120. package/dist/types/rules/html-aria-attribute-must-be-valid.d.ts +2 -2
  121. package/dist/types/rules/html-aria-label-is-well-formatted.d.ts +7 -0
  122. package/dist/types/rules/html-aria-level-must-be-valid.d.ts +2 -2
  123. package/dist/types/rules/html-aria-role-heading-requires-level.d.ts +2 -2
  124. package/dist/types/rules/html-aria-role-must-be-valid.d.ts +2 -2
  125. package/dist/types/rules/html-attribute-double-quotes.d.ts +2 -2
  126. package/dist/types/rules/html-attribute-equals-spacing.d.ts +7 -0
  127. package/dist/types/rules/html-attribute-values-require-quotes.d.ts +2 -2
  128. package/dist/types/rules/html-avoid-both-disabled-and-aria-disabled.d.ts +7 -0
  129. package/dist/types/rules/html-boolean-attributes-no-value.d.ts +2 -2
  130. package/dist/types/rules/html-iframe-has-title.d.ts +7 -0
  131. package/dist/types/rules/html-img-require-alt.d.ts +2 -2
  132. package/dist/types/rules/html-navigation-has-label.d.ts +7 -0
  133. package/dist/types/rules/html-no-aria-hidden-on-focusable.d.ts +7 -0
  134. package/dist/types/rules/html-no-block-inside-inline.d.ts +2 -2
  135. package/dist/types/rules/html-no-duplicate-attributes.d.ts +2 -2
  136. package/dist/types/rules/html-no-duplicate-ids.d.ts +2 -2
  137. package/dist/types/rules/html-no-empty-headings.d.ts +2 -2
  138. package/dist/types/rules/html-no-nested-links.d.ts +2 -2
  139. package/dist/types/rules/html-no-positive-tab-index.d.ts +7 -0
  140. package/dist/types/rules/html-no-self-closing.d.ts +7 -0
  141. package/dist/types/rules/html-no-title-attribute.d.ts +7 -0
  142. package/dist/types/rules/html-tag-name-lowercase.d.ts +3 -2
  143. package/dist/types/rules/index.d.ts +10 -0
  144. package/dist/types/rules/parser-no-errors.d.ts +8 -0
  145. package/dist/types/rules/rule-utils.d.ts +107 -13
  146. package/dist/types/rules/svg-tag-name-capitalization.d.ts +2 -2
  147. package/dist/types/src/cli/argument-parser.d.ts +2 -1
  148. package/dist/types/src/cli/file-processor.d.ts +6 -5
  149. package/dist/types/src/cli/formatters/base-formatter.d.ts +2 -2
  150. package/dist/types/src/cli/formatters/detailed-formatter.d.ts +2 -2
  151. package/dist/types/src/cli/formatters/github-actions-formatter.d.ts +12 -0
  152. package/dist/types/src/cli/formatters/index.d.ts +2 -0
  153. package/dist/types/src/cli/formatters/json-formatter.d.ts +42 -0
  154. package/dist/types/src/cli/formatters/simple-formatter.d.ts +2 -2
  155. package/dist/types/src/cli/output-manager.d.ts +31 -0
  156. package/dist/types/src/cli/summary-reporter.d.ts +3 -3
  157. package/dist/types/src/cli.d.ts +3 -1
  158. package/dist/types/src/rules/erb-no-empty-tags.d.ts +2 -2
  159. package/dist/types/src/rules/erb-no-output-control-flow.d.ts +2 -2
  160. package/dist/types/src/rules/erb-no-silent-tag-in-attribute-name.d.ts +7 -0
  161. package/dist/types/src/rules/erb-prefer-image-tag-helper.d.ts +2 -2
  162. package/dist/types/src/rules/erb-require-whitespace-inside-tags.d.ts +2 -2
  163. package/dist/types/src/rules/html-anchor-require-href.d.ts +2 -2
  164. package/dist/types/src/rules/html-aria-attribute-must-be-valid.d.ts +2 -2
  165. package/dist/types/src/rules/html-aria-label-is-well-formatted.d.ts +7 -0
  166. package/dist/types/src/rules/html-aria-level-must-be-valid.d.ts +2 -2
  167. package/dist/types/src/rules/html-aria-role-heading-requires-level.d.ts +2 -2
  168. package/dist/types/src/rules/html-aria-role-must-be-valid.d.ts +2 -2
  169. package/dist/types/src/rules/html-attribute-double-quotes.d.ts +2 -2
  170. package/dist/types/src/rules/html-attribute-equals-spacing.d.ts +7 -0
  171. package/dist/types/src/rules/html-attribute-values-require-quotes.d.ts +2 -2
  172. package/dist/types/src/rules/html-avoid-both-disabled-and-aria-disabled.d.ts +7 -0
  173. package/dist/types/src/rules/html-boolean-attributes-no-value.d.ts +2 -2
  174. package/dist/types/src/rules/html-iframe-has-title.d.ts +7 -0
  175. package/dist/types/src/rules/html-img-require-alt.d.ts +2 -2
  176. package/dist/types/src/rules/html-navigation-has-label.d.ts +7 -0
  177. package/dist/types/src/rules/html-no-aria-hidden-on-focusable.d.ts +7 -0
  178. package/dist/types/src/rules/html-no-block-inside-inline.d.ts +2 -2
  179. package/dist/types/src/rules/html-no-duplicate-attributes.d.ts +2 -2
  180. package/dist/types/src/rules/html-no-duplicate-ids.d.ts +2 -2
  181. package/dist/types/src/rules/html-no-empty-headings.d.ts +2 -2
  182. package/dist/types/src/rules/html-no-nested-links.d.ts +2 -2
  183. package/dist/types/src/rules/html-no-positive-tab-index.d.ts +7 -0
  184. package/dist/types/src/rules/html-no-self-closing.d.ts +7 -0
  185. package/dist/types/src/rules/html-no-title-attribute.d.ts +7 -0
  186. package/dist/types/src/rules/html-tag-name-lowercase.d.ts +3 -2
  187. package/dist/types/src/rules/index.d.ts +10 -0
  188. package/dist/types/src/rules/parser-no-errors.d.ts +8 -0
  189. package/dist/types/src/rules/rule-utils.d.ts +107 -13
  190. package/dist/types/src/rules/svg-tag-name-capitalization.d.ts +2 -2
  191. package/dist/types/src/types.d.ts +27 -3
  192. package/dist/types/types.d.ts +27 -3
  193. package/docs/rules/README.md +13 -2
  194. package/docs/rules/erb-no-silent-tag-in-attribute-name.md +34 -0
  195. package/docs/rules/html-aria-label-is-well-formatted.md +49 -0
  196. package/docs/rules/html-attribute-equals-spacing.md +35 -0
  197. package/docs/rules/html-avoid-both-disabled-and-aria-disabled.md +48 -0
  198. package/docs/rules/html-iframe-has-title.md +43 -0
  199. package/docs/rules/html-navigation-has-label.md +61 -0
  200. package/docs/rules/html-no-aria-hidden-on-focusable.md +54 -0
  201. package/docs/rules/html-no-positive-tab-index.md +55 -0
  202. package/docs/rules/html-no-self-closing.md +65 -0
  203. package/docs/rules/html-no-title-attribute.md +69 -0
  204. package/docs/rules/html-tag-name-lowercase.md +16 -3
  205. package/docs/rules/parser-no-errors.md +84 -0
  206. package/package.json +4 -4
  207. package/src/cli/argument-parser.ts +33 -24
  208. package/src/cli/file-processor.ts +25 -17
  209. package/src/cli/formatters/base-formatter.ts +2 -2
  210. package/src/cli/formatters/detailed-formatter.ts +9 -9
  211. package/src/cli/formatters/github-actions-formatter.ts +70 -0
  212. package/src/cli/formatters/index.ts +2 -0
  213. package/src/cli/formatters/json-formatter.ts +107 -0
  214. package/src/cli/formatters/simple-formatter.ts +15 -15
  215. package/src/cli/output-manager.ts +143 -0
  216. package/src/cli/summary-reporter.ts +24 -24
  217. package/src/cli.ts +48 -31
  218. package/src/default-rules.ts +22 -0
  219. package/src/linter.ts +30 -4
  220. package/src/rules/erb-no-empty-tags.ts +3 -3
  221. package/src/rules/erb-no-output-control-flow.ts +3 -3
  222. package/src/rules/erb-no-silent-tag-in-attribute-name.ts +40 -0
  223. package/src/rules/erb-prefer-image-tag-helper.ts +4 -9
  224. package/src/rules/erb-require-whitespace-inside-tags.ts +3 -3
  225. package/src/rules/erb-requires-trailing-newline.ts +2 -0
  226. package/src/rules/html-anchor-require-href.ts +3 -3
  227. package/src/rules/html-aria-attribute-must-be-valid.ts +29 -33
  228. package/src/rules/html-aria-label-is-well-formatted.ts +59 -0
  229. package/src/rules/html-aria-level-must-be-valid.ts +40 -7
  230. package/src/rules/html-aria-role-heading-requires-level.ts +18 -30
  231. package/src/rules/html-aria-role-must-be-valid.ts +7 -7
  232. package/src/rules/html-attribute-double-quotes.ts +23 -8
  233. package/src/rules/html-attribute-equals-spacing.ts +41 -0
  234. package/src/rules/html-attribute-values-require-quotes.ts +32 -12
  235. package/src/rules/html-avoid-both-disabled-and-aria-disabled.ts +66 -0
  236. package/src/rules/html-boolean-attributes-no-value.ts +19 -6
  237. package/src/rules/html-iframe-has-title.ts +62 -0
  238. package/src/rules/html-img-require-alt.ts +4 -9
  239. package/src/rules/html-navigation-has-label.ts +64 -0
  240. package/src/rules/html-no-aria-hidden-on-focusable.ts +90 -0
  241. package/src/rules/html-no-block-inside-inline.ts +5 -5
  242. package/src/rules/html-no-duplicate-attributes.ts +30 -30
  243. package/src/rules/html-no-duplicate-ids.ts +6 -5
  244. package/src/rules/html-no-empty-headings.ts +4 -33
  245. package/src/rules/html-no-nested-links.ts +3 -3
  246. package/src/rules/html-no-positive-tab-index.ts +33 -0
  247. package/src/rules/html-no-self-closing.ts +36 -0
  248. package/src/rules/html-no-title-attribute.ts +42 -0
  249. package/src/rules/html-tag-name-lowercase.ts +44 -31
  250. package/src/rules/index.ts +10 -0
  251. package/src/rules/parser-no-errors.ts +25 -0
  252. package/src/rules/rule-utils.ts +260 -39
  253. package/src/rules/svg-tag-name-capitalization.ts +4 -11
  254. package/src/types.ts +30 -3
@@ -1,3 +1,5 @@
1
1
  export { BaseFormatter } from "./base-formatter.js";
2
2
  export { SimpleFormatter } from "./simple-formatter.js";
3
3
  export { DetailedFormatter } from "./detailed-formatter.js";
4
+ export { JSONFormatter, type JSONOutput } from "./json-formatter.js";
5
+ export { GitHubActionsFormatter } from "./github-actions-formatter.js";
@@ -0,0 +1,42 @@
1
+ import { BaseFormatter } from "./base-formatter.js";
2
+ import type { Diagnostic, SerializedDiagnostic } from "@herb-tools/core";
3
+ import type { ProcessedFile } from "../file-processor.js";
4
+ interface JSONOffense extends SerializedDiagnostic {
5
+ filename: string;
6
+ }
7
+ interface JSONSummary {
8
+ filesChecked: number;
9
+ filesWithOffenses: number;
10
+ totalErrors: number;
11
+ totalWarnings: number;
12
+ totalOffenses: number;
13
+ ruleCount: number;
14
+ }
15
+ interface JSONTiming {
16
+ startTime: string;
17
+ duration: number;
18
+ }
19
+ export interface JSONOutput {
20
+ offenses: JSONOffense[];
21
+ summary: JSONSummary | null;
22
+ timing: JSONTiming | null;
23
+ completed: boolean;
24
+ clean: boolean | null;
25
+ message: string | null;
26
+ }
27
+ interface JSONFormatOptions {
28
+ files: string[];
29
+ totalErrors: number;
30
+ totalWarnings: number;
31
+ filesWithOffenses: number;
32
+ ruleCount: number;
33
+ startTime: number;
34
+ startDate: Date;
35
+ showTiming: boolean;
36
+ }
37
+ export declare class JSONFormatter extends BaseFormatter {
38
+ format(allOffenses: ProcessedFile[]): Promise<void>;
39
+ formatWithSummary(allOffenses: ProcessedFile[], options: JSONFormatOptions): Promise<void>;
40
+ formatFile(_filename: string, _offenses: Diagnostic[]): void;
41
+ }
42
+ export {};
@@ -2,6 +2,6 @@ import { BaseFormatter } from "./base-formatter.js";
2
2
  import type { Diagnostic } from "@herb-tools/core";
3
3
  import type { ProcessedFile } from "../file-processor.js";
4
4
  export declare class SimpleFormatter extends BaseFormatter {
5
- format(allDiagnostics: ProcessedFile[]): Promise<void>;
6
- formatFile(filename: string, diagnostics: Diagnostic[]): void;
5
+ format(allOffenses: ProcessedFile[]): Promise<void>;
6
+ formatFile(filename: string, offenses: Diagnostic[]): void;
7
7
  }
@@ -0,0 +1,4 @@
1
+ export { ArgumentParser } from "./argument-parser.js";
2
+ export { FileProcessor } from "./file-processor.js";
3
+ export { SummaryReporter } from "./summary-reporter.js";
4
+ export * from "./formatters/index.js";
@@ -0,0 +1,31 @@
1
+ import type { ThemeInput } from "@herb-tools/highlighter";
2
+ import type { FormatOption } from "./argument-parser.js";
3
+ import type { ProcessingResult } from "./file-processor.js";
4
+ interface OutputOptions {
5
+ formatOption: FormatOption;
6
+ theme: ThemeInput;
7
+ wrapLines: boolean;
8
+ truncateLines: boolean;
9
+ showTiming: boolean;
10
+ startTime: number;
11
+ startDate: Date;
12
+ }
13
+ interface LintResults extends ProcessingResult {
14
+ files: string[];
15
+ }
16
+ export declare class OutputManager {
17
+ private summaryReporter;
18
+ /**
19
+ * Output successful lint results
20
+ */
21
+ outputResults(results: LintResults, options: OutputOptions): Promise<void>;
22
+ /**
23
+ * Output informational message (like "no files found")
24
+ */
25
+ outputInfo(message: string, options: OutputOptions): void;
26
+ /**
27
+ * Output error message
28
+ */
29
+ outputError(message: string, options: OutputOptions): void;
30
+ }
31
+ export {};
@@ -2,12 +2,12 @@ export interface SummaryData {
2
2
  files: string[];
3
3
  totalErrors: number;
4
4
  totalWarnings: number;
5
- filesWithViolations: number;
5
+ filesWithOffenses: number;
6
6
  ruleCount: number;
7
7
  startTime: number;
8
8
  startDate: Date;
9
9
  showTiming: boolean;
10
- ruleViolations: Map<string, {
10
+ ruleOffenses: Map<string, {
11
11
  count: number;
12
12
  files: Set<string>;
13
13
  }>;
@@ -15,7 +15,7 @@ export interface SummaryData {
15
15
  export declare class SummaryReporter {
16
16
  private pluralize;
17
17
  displaySummary(data: SummaryData): void;
18
- displayMostViolatedRules(ruleViolations: Map<string, {
18
+ displayMostViolatedRules(ruleOffenses: Map<string, {
19
19
  count: number;
20
20
  files: Set<string>;
21
21
  }>, limit?: number): void;
@@ -1,6 +1,8 @@
1
1
  export declare class CLI {
2
2
  private argumentParser;
3
3
  private fileProcessor;
4
- private summaryReporter;
4
+ private outputManager;
5
+ private exitWithError;
6
+ private exitWithInfo;
5
7
  run(): Promise<void>;
6
8
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class ERBNoEmptyTagsRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
- import type { Node } from "@herb-tools/core";
1
+ import type { ParseResult } from "@herb-tools/core";
2
2
  import { ParserRule } from "../types.js";
3
3
  import type { LintOffense, LintContext } from "../types.js";
4
4
  export declare class ERBNoOutputControlFlowRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class ERBNoSilentTagInAttributeNameRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class ERBPreferImageTagHelperRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
- import type { Node } from "@herb-tools/core";
1
+ import type { ParseResult } from "@herb-tools/core";
2
2
  import { ParserRule } from "../types.js";
3
3
  import type { LintOffense, LintContext } from "../types.js";
4
4
  export declare class ERBRequireWhitespaceRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLAnchorRequireHrefRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLAriaAttributeMustBeValid extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLAriaLabelIsWellFormattedRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLAriaLevelMustBeValidRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLAriaRoleHeadingRequiresLevelRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLAriaRoleMustBeValidRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLAttributeDoubleQuotesRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLAttributeEqualsSpacingRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLAttributeValuesRequireQuotesRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLAvoidBothDisabledAndAriaDisabledRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLBooleanAttributesNoValueRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLIframeHasTitleRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLImgRequireAltRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLNavigationHasLabelRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLNoAriaHiddenOnFocusableRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLNoBlockInsideInlineRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLNoDuplicateAttributesRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types";
2
- import type { Node } from "@herb-tools/core";
2
+ import type { ParseResult } from "@herb-tools/core";
3
3
  import type { LintOffense, LintContext } from "../types";
4
4
  export declare class HTMLNoDuplicateIdsRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLNoEmptyHeadingsRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { ParserRule } from "../types.js";
2
2
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
3
+ import type { ParseResult } from "@herb-tools/core";
4
4
  export declare class HTMLNoNestedLinksRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
7
  }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLNoPositiveTabIndexRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintContext, LintOffense } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLNoSelfClosingRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -0,0 +1,7 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense, LintContext } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class HTMLNoTitleAttributeRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
+ }
@@ -1,7 +1,8 @@
1
1
  import { ParserRule } from "../types.js";
2
+ import { ParseResult } from "@herb-tools/core";
2
3
  import type { LintOffense, LintContext } from "../types.js";
3
- import type { Node } from "@herb-tools/core";
4
4
  export declare class HTMLTagNameLowercaseRule extends ParserRule {
5
5
  name: string;
6
- check(node: Node, context?: Partial<LintContext>): LintOffense[];
6
+ isEnabled(result: ParseResult, context?: Partial<LintContext>): boolean;
7
+ check(result: ParseResult, context?: Partial<LintContext>): LintOffense[];
7
8
  }
@@ -1,19 +1,29 @@
1
1
  export * from "./erb-no-empty-tags.js";
2
2
  export * from "./erb-no-output-control-flow.js";
3
+ export * from "./erb-no-silent-tag-in-attribute-name.js";
3
4
  export * from "./erb-prefer-image-tag-helper.js";
4
5
  export * from "./erb-requires-trailing-newline.js";
5
6
  export * from "./html-anchor-require-href.js";
7
+ export * from "./html-aria-label-is-well-formatted.js";
6
8
  export * from "./html-aria-level-must-be-valid.js";
7
9
  export * from "./html-aria-role-heading-requires-level.js";
8
10
  export * from "./html-aria-role-must-be-valid.js";
9
11
  export * from "./html-attribute-double-quotes.js";
12
+ export * from "./html-attribute-equals-spacing.js";
10
13
  export * from "./html-attribute-values-require-quotes.js";
14
+ export * from "./html-avoid-both-disabled-and-aria-disabled.js";
11
15
  export * from "./html-boolean-attributes-no-value.js";
16
+ export * from "./html-iframe-has-title.js";
12
17
  export * from "./html-img-require-alt.js";
18
+ export * from "./html-navigation-has-label.js";
19
+ export * from "./html-no-aria-hidden-on-focusable.js";
13
20
  export * from "./html-no-block-inside-inline.js";
14
21
  export * from "./html-no-duplicate-attributes.js";
15
22
  export * from "./html-no-duplicate-ids.js";
16
23
  export * from "./html-no-empty-headings.js";
17
24
  export * from "./html-no-nested-links.js";
25
+ export * from "./html-no-positive-tab-index.js";
26
+ export * from "./html-no-self-closing.js";
27
+ export * from "./html-no-title-attribute.js";
18
28
  export * from "./html-tag-name-lowercase.js";
19
29
  export * from "./svg-tag-name-capitalization.js";
@@ -0,0 +1,8 @@
1
+ import { ParserRule } from "../types.js";
2
+ import type { LintOffense } from "../types.js";
3
+ import type { ParseResult } from "@herb-tools/core";
4
+ export declare class ParserNoErrorsRule extends ParserRule {
5
+ name: string;
6
+ check(result: ParseResult): LintOffense[];
7
+ private herbErrorToLintOffense;
8
+ }