@html-eslint/eslint-plugin 0.42.0 → 0.43.1

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 (189) hide show
  1. package/lib/languages/html-language.js +3 -3
  2. package/lib/languages/html-source-code.js +9 -11
  3. package/lib/languages/html-traversal-step.js +4 -3
  4. package/lib/rules/attrs-newline.js +3 -4
  5. package/lib/rules/element-newline.js +4 -14
  6. package/lib/rules/id-naming-convention.js +3 -6
  7. package/lib/rules/indent/indent-level.js +1 -1
  8. package/lib/rules/indent/indent.js +18 -23
  9. package/lib/rules/lowercase.js +3 -5
  10. package/lib/rules/max-element-depth.js +3 -5
  11. package/lib/rules/no-abstract-roles.js +3 -5
  12. package/lib/rules/no-accesskey-attrs.js +3 -5
  13. package/lib/rules/no-aria-hidden-body.js +2 -2
  14. package/lib/rules/no-aria-hidden-on-focusable.js +3 -3
  15. package/lib/rules/no-duplicate-attrs.js +8 -8
  16. package/lib/rules/no-duplicate-class.js +3 -6
  17. package/lib/rules/no-duplicate-id.js +6 -9
  18. package/lib/rules/no-duplicate-in-head.js +6 -9
  19. package/lib/rules/no-empty-headings.js +3 -4
  20. package/lib/rules/no-extra-spacing-attrs.js +4 -14
  21. package/lib/rules/no-extra-spacing-text.js +3 -9
  22. package/lib/rules/no-heading-inside-button.js +2 -2
  23. package/lib/rules/no-inline-styles.js +2 -2
  24. package/lib/rules/no-invalid-entity.js +3 -4
  25. package/lib/rules/no-invalid-role.js +2 -2
  26. package/lib/rules/no-multiple-empty-lines.js +10 -11
  27. package/lib/rules/no-multiple-h1.js +3 -3
  28. package/lib/rules/no-nested-interactive.js +3 -3
  29. package/lib/rules/no-non-scalable-viewport.js +2 -2
  30. package/lib/rules/no-obsolete-tags.js +2 -2
  31. package/lib/rules/no-positive-tabindex.js +3 -5
  32. package/lib/rules/no-restricted-attr-values.js +4 -6
  33. package/lib/rules/no-restricted-attrs.js +4 -6
  34. package/lib/rules/no-script-style-type.js +3 -5
  35. package/lib/rules/no-skip-heading-levels.js +3 -3
  36. package/lib/rules/no-target-blank.js +2 -2
  37. package/lib/rules/no-trailing-spaces.js +10 -9
  38. package/lib/rules/prefer-https.js +3 -6
  39. package/lib/rules/quotes.js +25 -10
  40. package/lib/rules/require-attrs.js +3 -8
  41. package/lib/rules/require-button-type.js +3 -4
  42. package/lib/rules/require-closing-tags.js +3 -3
  43. package/lib/rules/require-doctype.js +2 -2
  44. package/lib/rules/require-explicit-size.js +2 -5
  45. package/lib/rules/require-form-method.js +2 -2
  46. package/lib/rules/require-frame-title.js +2 -2
  47. package/lib/rules/require-img-alt.js +4 -4
  48. package/lib/rules/require-input-label.js +3 -3
  49. package/lib/rules/require-lang.js +2 -2
  50. package/lib/rules/require-li-container.js +2 -2
  51. package/lib/rules/require-meta-charset.js +3 -4
  52. package/lib/rules/require-meta-description.js +3 -4
  53. package/lib/rules/require-meta-viewport.js +3 -4
  54. package/lib/rules/require-open-graph-protocol.js +3 -6
  55. package/lib/rules/require-title.js +3 -5
  56. package/lib/rules/sort-attrs.js +4 -5
  57. package/lib/rules/use-baseline.js +3 -6
  58. package/lib/rules/utils/baseline.js +7 -4
  59. package/lib/rules/utils/node.js +11 -26
  60. package/lib/rules/utils/settings.js +4 -7
  61. package/lib/rules/utils/source-code.js +2 -2
  62. package/lib/rules/utils/template-literal.js +43 -0
  63. package/lib/rules/utils/visitors.js +6 -7
  64. package/package.json +6 -6
  65. package/types/languages/html-language.d.ts +0 -5
  66. package/types/languages/html-language.d.ts.map +1 -1
  67. package/types/languages/html-source-code.d.ts +13 -14
  68. package/types/languages/html-source-code.d.ts.map +1 -1
  69. package/types/languages/html-traversal-step.d.ts +5 -5
  70. package/types/languages/html-traversal-step.d.ts.map +1 -1
  71. package/types/rules/attrs-newline.d.ts +3 -4
  72. package/types/rules/attrs-newline.d.ts.map +1 -1
  73. package/types/rules/element-newline.d.ts +5 -13
  74. package/types/rules/element-newline.d.ts.map +1 -1
  75. package/types/rules/id-naming-convention.d.ts +3 -6
  76. package/types/rules/id-naming-convention.d.ts.map +1 -1
  77. package/types/rules/indent/indent-level.d.ts +3 -3
  78. package/types/rules/indent/indent-level.d.ts.map +1 -1
  79. package/types/rules/indent/indent.d.ts +5 -18
  80. package/types/rules/indent/indent.d.ts.map +1 -1
  81. package/types/rules/lowercase.d.ts +2 -8
  82. package/types/rules/lowercase.d.ts.map +1 -1
  83. package/types/rules/max-element-depth.d.ts +3 -6
  84. package/types/rules/max-element-depth.d.ts.map +1 -1
  85. package/types/rules/no-abstract-roles.d.ts +2 -8
  86. package/types/rules/no-abstract-roles.d.ts.map +1 -1
  87. package/types/rules/no-accesskey-attrs.d.ts +2 -8
  88. package/types/rules/no-accesskey-attrs.d.ts.map +1 -1
  89. package/types/rules/no-aria-hidden-body.d.ts +2 -5
  90. package/types/rules/no-aria-hidden-body.d.ts.map +1 -1
  91. package/types/rules/no-aria-hidden-on-focusable.d.ts +2 -6
  92. package/types/rules/no-aria-hidden-on-focusable.d.ts.map +1 -1
  93. package/types/rules/no-duplicate-attrs.d.ts +2 -10
  94. package/types/rules/no-duplicate-attrs.d.ts.map +1 -1
  95. package/types/rules/no-duplicate-class.d.ts +3 -7
  96. package/types/rules/no-duplicate-class.d.ts.map +1 -1
  97. package/types/rules/no-duplicate-id.d.ts +2 -9
  98. package/types/rules/no-duplicate-id.d.ts.map +1 -1
  99. package/types/rules/no-duplicate-in-head.d.ts +2 -9
  100. package/types/rules/no-duplicate-in-head.d.ts.map +1 -1
  101. package/types/rules/no-empty-headings.d.ts +2 -7
  102. package/types/rules/no-empty-headings.d.ts.map +1 -1
  103. package/types/rules/no-extra-spacing-attrs.d.ts +3 -14
  104. package/types/rules/no-extra-spacing-attrs.d.ts.map +1 -1
  105. package/types/rules/no-extra-spacing-text.d.ts +3 -9
  106. package/types/rules/no-extra-spacing-text.d.ts.map +1 -1
  107. package/types/rules/no-heading-inside-button.d.ts +2 -5
  108. package/types/rules/no-heading-inside-button.d.ts.map +1 -1
  109. package/types/rules/no-inline-styles.d.ts +2 -5
  110. package/types/rules/no-inline-styles.d.ts.map +1 -1
  111. package/types/rules/no-invalid-entity.d.ts +3 -5
  112. package/types/rules/no-invalid-entity.d.ts.map +1 -1
  113. package/types/rules/no-invalid-role.d.ts +2 -5
  114. package/types/rules/no-invalid-role.d.ts.map +1 -1
  115. package/types/rules/no-multiple-empty-lines.d.ts +3 -7
  116. package/types/rules/no-multiple-empty-lines.d.ts.map +1 -1
  117. package/types/rules/no-multiple-h1.d.ts +2 -6
  118. package/types/rules/no-multiple-h1.d.ts.map +1 -1
  119. package/types/rules/no-nested-interactive.d.ts +2 -6
  120. package/types/rules/no-nested-interactive.d.ts.map +1 -1
  121. package/types/rules/no-non-scalable-viewport.d.ts +2 -5
  122. package/types/rules/no-non-scalable-viewport.d.ts.map +1 -1
  123. package/types/rules/no-obsolete-tags.d.ts +2 -5
  124. package/types/rules/no-obsolete-tags.d.ts.map +1 -1
  125. package/types/rules/no-positive-tabindex.d.ts +2 -8
  126. package/types/rules/no-positive-tabindex.d.ts.map +1 -1
  127. package/types/rules/no-restricted-attr-values.d.ts +3 -7
  128. package/types/rules/no-restricted-attr-values.d.ts.map +1 -1
  129. package/types/rules/no-restricted-attrs.d.ts +3 -7
  130. package/types/rules/no-restricted-attrs.d.ts.map +1 -1
  131. package/types/rules/no-script-style-type.d.ts +2 -8
  132. package/types/rules/no-script-style-type.d.ts.map +1 -1
  133. package/types/rules/no-skip-heading-levels.d.ts +2 -6
  134. package/types/rules/no-skip-heading-levels.d.ts.map +1 -1
  135. package/types/rules/no-target-blank.d.ts +2 -5
  136. package/types/rules/no-target-blank.d.ts.map +1 -1
  137. package/types/rules/no-trailing-spaces.d.ts +2 -7
  138. package/types/rules/no-trailing-spaces.d.ts.map +1 -1
  139. package/types/rules/prefer-https.d.ts +2 -9
  140. package/types/rules/prefer-https.d.ts.map +1 -1
  141. package/types/rules/quotes.d.ts +7 -9
  142. package/types/rules/quotes.d.ts.map +1 -1
  143. package/types/rules/require-attrs.d.ts +3 -8
  144. package/types/rules/require-attrs.d.ts.map +1 -1
  145. package/types/rules/require-button-type.d.ts +2 -7
  146. package/types/rules/require-button-type.d.ts.map +1 -1
  147. package/types/rules/require-closing-tags.d.ts +3 -4
  148. package/types/rules/require-closing-tags.d.ts.map +1 -1
  149. package/types/rules/require-doctype.d.ts +2 -5
  150. package/types/rules/require-doctype.d.ts.map +1 -1
  151. package/types/rules/require-explicit-size.d.ts +3 -5
  152. package/types/rules/require-explicit-size.d.ts.map +1 -1
  153. package/types/rules/require-form-method.d.ts +2 -5
  154. package/types/rules/require-form-method.d.ts.map +1 -1
  155. package/types/rules/require-frame-title.d.ts +2 -5
  156. package/types/rules/require-frame-title.d.ts.map +1 -1
  157. package/types/rules/require-img-alt.d.ts +3 -4
  158. package/types/rules/require-img-alt.d.ts.map +1 -1
  159. package/types/rules/require-input-label.d.ts +2 -6
  160. package/types/rules/require-input-label.d.ts.map +1 -1
  161. package/types/rules/require-lang.d.ts +2 -5
  162. package/types/rules/require-lang.d.ts.map +1 -1
  163. package/types/rules/require-li-container.d.ts +2 -5
  164. package/types/rules/require-li-container.d.ts.map +1 -1
  165. package/types/rules/require-meta-charset.d.ts +2 -7
  166. package/types/rules/require-meta-charset.d.ts.map +1 -1
  167. package/types/rules/require-meta-description.d.ts +2 -7
  168. package/types/rules/require-meta-description.d.ts.map +1 -1
  169. package/types/rules/require-meta-viewport.d.ts +2 -7
  170. package/types/rules/require-meta-viewport.d.ts.map +1 -1
  171. package/types/rules/require-open-graph-protocol.d.ts +3 -5
  172. package/types/rules/require-open-graph-protocol.d.ts.map +1 -1
  173. package/types/rules/require-title.d.ts +2 -8
  174. package/types/rules/require-title.d.ts.map +1 -1
  175. package/types/rules/sort-attrs.d.ts +3 -6
  176. package/types/rules/sort-attrs.d.ts.map +1 -1
  177. package/types/rules/use-baseline.d.ts +3 -7
  178. package/types/rules/use-baseline.d.ts.map +1 -1
  179. package/types/rules/utils/baseline.d.ts.map +1 -1
  180. package/types/rules/utils/node.d.ts +25 -29
  181. package/types/rules/utils/node.d.ts.map +1 -1
  182. package/types/rules/utils/settings.d.ts +7 -9
  183. package/types/rules/utils/settings.d.ts.map +1 -1
  184. package/types/rules/utils/source-code.d.ts +4 -4
  185. package/types/rules/utils/source-code.d.ts.map +1 -1
  186. package/types/rules/utils/template-literal.d.ts +18 -0
  187. package/types/rules/utils/template-literal.d.ts.map +1 -0
  188. package/types/rules/utils/visitors.d.ts +4 -4
  189. package/types/rules/utils/visitors.d.ts.map +1 -1
@@ -1,21 +1,3 @@
1
- export type Attribute = import("@html-eslint/types").Attribute;
2
- export type Tag = import("@html-eslint/types").Tag;
3
- export type ScriptTag = import("@html-eslint/types").ScriptTag;
4
- export type StyleTag = import("@html-eslint/types").StyleTag;
5
- export type AnyNode = import("@html-eslint/types").AnyNode;
6
- export type Line = import("../../types").Line;
7
- export type BaseNode = import("../../types").BaseNode;
8
- export type Text = import("@html-eslint/types").Text;
9
- export type CommentContent = import("@html-eslint/types").CommentContent;
10
- export type Comment = import("@html-eslint/types").Comment;
11
- export type AttributeValue = import("@html-eslint/types").AttributeValue;
12
- export type AttributeKey = import("@html-eslint/types").AttributeKey;
13
- export type TemplateText = import("@html-eslint/types").TemplateText;
14
- export type OpenTemplate = import("@html-eslint/types").OpenTemplate;
15
- export type CloseTemplate = import("@html-eslint/types").CloseTemplate;
16
- export type Range = import("eslint").AST.Range;
17
- export type SourceLocation = import("eslint").AST.SourceLocation;
18
- export type AnyToken = import("@html-eslint/types").AnyToken;
19
1
  /**
20
2
  * @param {Tag | ScriptTag | StyleTag} node
21
3
  * @param {string} key
@@ -42,15 +24,15 @@ export function isNodeTokensOnSameLine(node: AnyNode): boolean;
42
24
  export function splitToLineNodes(node: Text | CommentContent): Line[];
43
25
  /**
44
26
  * Get location between two nodes.
45
- * @param {{loc: SourceLocation}} before A node placed in before
46
- * @param {{loc: SourceLocation}} after A node placed in after
47
- * @returns {SourceLocation} location between two nodes.
27
+ * @param {{loc: AST.SourceLocation}} before A node placed in before
28
+ * @param {{loc: AST.SourceLocation}} after A node placed in after
29
+ * @returns {AST.SourceLocation} location between two nodes.
48
30
  */
49
31
  export function getLocBetween(before: {
50
- loc: SourceLocation;
32
+ loc: AST.SourceLocation;
51
33
  }, after: {
52
- loc: SourceLocation;
53
- }): SourceLocation;
34
+ loc: AST.SourceLocation;
35
+ }): AST.SourceLocation;
54
36
  /**
55
37
  * @param {AnyNode} node
56
38
  * @param {(node: AnyNode) => boolean} predicate
@@ -89,10 +71,10 @@ export function isScript(node: BaseNode): node is ScriptTag;
89
71
  export function isStyle(node: BaseNode): node is StyleTag;
90
72
  /**
91
73
  * @param {(Text | CommentContent)['parts']} parts
92
- * @param {Range} range
74
+ * @param {AST.Range} range
93
75
  * @returns {boolean}
94
76
  */
95
- export function isOverlapWithTemplates(parts: (Text | CommentContent)["parts"], range: Range): boolean;
77
+ export function isOverlapWithTemplates(parts: (Text | CommentContent)["parts"], range: AST.Range): boolean;
96
78
  /**
97
79
  * @param {string} source
98
80
  * @returns {string[]}
@@ -100,11 +82,11 @@ export function isOverlapWithTemplates(parts: (Text | CommentContent)["parts"],
100
82
  export function codeToLines(source: string): string[];
101
83
  /**
102
84
  *
103
- * @param {Range} rangeA
104
- * @param {Range} rangeB
85
+ * @param {AST.Range} rangeA
86
+ * @param {AST.Range} rangeB
105
87
  * @returns {boolean}
106
88
  */
107
- export function isRangesOverlap(rangeA: Range, rangeB: Range): boolean;
89
+ export function isRangesOverlap(rangeA: AST.Range, rangeB: AST.Range): boolean;
108
90
  /**
109
91
  *
110
92
  * @param {AnyToken[]} tokens
@@ -116,4 +98,18 @@ export function getTemplateTokens(tokens: AnyToken[]): ((CommentContent | Text)[
116
98
  * @returns {boolean}
117
99
  */
118
100
  export function hasTemplate(node: AttributeKey | AttributeValue | Text | CommentContent): boolean;
101
+ import type { Tag } from "@html-eslint/types";
102
+ import type { ScriptTag } from "@html-eslint/types";
103
+ import type { StyleTag } from "@html-eslint/types";
104
+ import type { Attribute } from "@html-eslint/types";
105
+ import type { AnyNode } from "@html-eslint/types";
106
+ import type { Text } from "@html-eslint/types";
107
+ import type { CommentContent } from "@html-eslint/types";
108
+ import type { Line } from "../../types";
109
+ import type { AST } from "eslint";
110
+ import type { BaseNode } from "../../types";
111
+ import type { Comment } from "@html-eslint/types";
112
+ import type { AnyToken } from "@html-eslint/types";
113
+ import type { AttributeKey } from "@html-eslint/types";
114
+ import type { AttributeValue } from "@html-eslint/types";
119
115
  //# sourceMappingURL=node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/node.js"],"names":[],"mappings":"wBACc,OAAO,oBAAoB,EAAE,SAAS;kBACtC,OAAO,oBAAoB,EAAE,GAAG;wBAChC,OAAO,oBAAoB,EAAE,SAAS;uBACtC,OAAO,oBAAoB,EAAE,QAAQ;sBACrC,OAAO,oBAAoB,EAAE,OAAO;mBACpC,OAAO,aAAa,EAAE,IAAI;uBAC1B,OAAO,aAAa,EAAE,QAAQ;mBAC9B,OAAO,oBAAoB,EAAE,IAAI;6BACjC,OAAO,oBAAoB,EAAE,cAAc;sBAC3C,OAAO,oBAAoB,EAAE,OAAO;6BACpC,OAAO,oBAAoB,EAAE,cAAc;2BAC3C,OAAO,oBAAoB,EAAE,YAAY;2BACzC,OAAO,oBAAoB,EAAE,YAAY;2BACzC,OAAO,oBAAoB,EAAE,YAAY;4BACzC,OAAO,oBAAoB,EAAE,aAAa;oBAC1C,OAAO,QAAQ,EAAE,GAAG,CAAC,KAAK;6BAC1B,OAAO,QAAQ,EAAE,GAAG,CAAC,cAAc;uBACnC,OAAO,oBAAoB,EAAE,QAAQ;AAKnD;;;;GAIG;AACH,+BAJW,GAAG,GAAG,SAAS,GAAG,QAAQ,OAC1B,MAAM,GACJ,SAAS,GAAG,SAAS,CAMjC;AAED;;;;GAIG;AACH,wCAHW,GAAG,GAAG,SAAS,GAAG,QAAQ,GACxB,O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W,QAAQ,EAAE,GACR,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAaxD;AAlLD;;;GAGG;AACH,kCAHW,YAAY,GAAG,cAAc,GAAG,IAAI,GAAG,cAAc,GACnD,OAAO,CAInB;yBA/DqI,oBAAoB;+BAApB,oBAAoB;8BAApB,oBAAoB;+BAApB,oBAAoB;6BAApB,oBAAoB;0BAApB,oBAAoB;oCAApB,oBAAoB;0BACzH,aAAa;yBACxB,QAAQ;8BADG,aAAa;6BADwF,oBAAoB;8BAApB,oBAAoB;kCAApB,oBAAoB;oCAApB,oBAAoB"}
@@ -1,19 +1,17 @@
1
- export type MaybeHTMLSettings = import("../../types").MaybeHTMLSettings;
2
- export type HTMLSettings = import("../../types").HTMLSettings;
3
- export type Context = import("../../types").Context<any[]>;
4
- export type TaggedTemplateExpression = import("@html-eslint/types").TaggedTemplateExpression;
5
- export type TemplateLiteral = import("@html-eslint/types").TemplateLiteral;
6
1
  /**
7
2
  *
8
3
  * @param {TemplateLiteral} node
9
- * @param {Context} context
4
+ * @param {Context<any[]>} context
10
5
  * @returns {boolean}
11
6
  */
12
- export function shouldCheckTemplateLiteral(node: TemplateLiteral, context: Context): boolean;
7
+ export function shouldCheckTemplateLiteral(node: TemplateLiteral, context: Context<any[]>): boolean;
13
8
  /**
14
9
  * @param {TaggedTemplateExpression} node
15
- * @param {Context} context
10
+ * @param {Context<any[]>} context
16
11
  * @returns {boolean}
17
12
  */
18
- export function shouldCheckTaggedTemplateExpression(node: TaggedTemplateExpression, context: Context): boolean;
13
+ export function shouldCheckTaggedTemplateExpression(node: TaggedTemplateExpression, context: Context<any[]>): boolean;
14
+ import type { TemplateLiteral } from "@html-eslint/types";
15
+ import type { Context } from "../../types";
16
+ import type { TaggedTemplateExpression } from "@html-eslint/types";
19
17
  //# sourceMappingURL=settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/settings.js"],"names":[],"mappings":"gCACa,OAAO,aAAa,EAAE,iBAAiB;2BACvC,OAAO,aAAa,EAAE,YAAY;sBAClC,OAAO,aAAa,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;uCACpC,OAAO,oBAAoB,EAAE,wBAAwB;8BACrD,OAAO,oBAAoB,EAAE,eAAe;AA8DzD;;;;;GAKG;AACH,iDAJW,eAAe,WACf,OAAO,GACL,OAAO,CAWnB;AA7BD;;;;GAIG;AACH,0DAJW,wBAAwB,WACxB,OAAO,GACL,OAAO,CASnB"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/settings.js"],"names":[],"mappings":"AAgEA;;;;;GAKG;AACH,iDAJW,eAAe,WACf,QAAQ,GAAG,EAAE,CAAC,GACZ,OAAO,CAWnB;AA7BD;;;;GAIG;AACH,0DAJW,wBAAwB,WACxB,QAAQ,GAAG,EAAE,CAAC,GACZ,OAAO,CASnB;qCA5D2D,oBAAoB;6BADrB,aAAa;8CACZ,oBAAoB"}
@@ -1,9 +1,9 @@
1
- export type Context = import("../../types").Context<any[]>;
2
1
  /**
3
- * @typedef {import("../../types").Context<any[]>} Context
2
+ * @import {Context} from "../../types";
4
3
  */
5
4
  /**
6
- * @param {Context} context
5
+ * @param {Context<any[]>} context
7
6
  */
8
- export function getSourceCode(context: Context): import("eslint").SourceCode;
7
+ export function getSourceCode(context: Context<any[]>): import("eslint").SourceCode;
8
+ import type { Context } from "../../types";
9
9
  //# sourceMappingURL=source-code.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-code.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/source-code.js"],"names":[],"mappings":"sBACa,OAAO,aAAa,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;AADjD;;GAEG;AAEH;;GAEG;AACH,uCAFW,OAAO,+BAIjB"}
1
+ {"version":3,"file":"source-code.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/source-code.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,uCAFW,QAAQ,GAAG,EAAE,CAAC,+BAIxB;6BARyB,aAAa"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Get or create cached parse result for a template literal.
3
+ * @param {TemplateLiteral} node
4
+ * @param {SourceCode} sourceCode
5
+ * @param {TemplateHTMLVisitor} [visitor]
6
+ * @returns {{ast: DocumentNode, html: string, tokens: AnyToken[]}}
7
+ */
8
+ export function parseTemplateLiteral(node: TemplateLiteral, sourceCode: SourceCode, visitor?: TemplateHTMLVisitor): {
9
+ ast: DocumentNode;
10
+ html: string;
11
+ tokens: AnyToken[];
12
+ };
13
+ import type { TemplateLiteral } from "@html-eslint/types";
14
+ import type { SourceCode } from "eslint";
15
+ import type { TemplateHTMLVisitor } from "@html-eslint/template-parser";
16
+ import type { DocumentNode } from "es-html-parser";
17
+ import type { AnyToken } from "es-html-parser";
18
+ //# sourceMappingURL=template-literal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-literal.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/template-literal.js"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,2CALW,eAAe,cACf,UAAU,YACV,mBAAmB,GACjB;IAAC,GAAG,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,QAAQ,EAAE,CAAA;CAAC,CAmBjE;qCAvCiC,oBAAoB;gCAEzB,QAAQ;yCACC,8BAA8B;kCAF3B,gBAAgB;8BAAhB,gBAAgB"}
@@ -1,10 +1,10 @@
1
- export type Context = import("../../types").Context<any[]>;
2
- export type RuleListener = import("../../types").RuleListener;
3
1
  /**
4
- * @param {Context} context
2
+ * @param {Context<any[]>} context
5
3
  * @param {RuleListener} visitors
6
4
  * @param {any} [templateVisitors]
7
5
  * @returns {RuleListener}
8
6
  */
9
- export function createVisitors(context: Context, visitors: RuleListener, templateVisitors?: any): RuleListener;
7
+ export function createVisitors(context: Context<any[]>, visitors: RuleListener, templateVisitors?: any): RuleListener;
8
+ import type { Context } from "../../types";
9
+ import type { RuleListener } from "../../types";
10
10
  //# sourceMappingURL=visitors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visitors.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/visitors.js"],"names":[],"mappings":"sBACc,OAAO,aAAa,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;2BACpC,OAAO,aAAa,EAAE,YAAY;AA8BhD;;;;;GAKG;AACH,wCALW,OAAO,YACP,YAAY,qBACZ,GAAG,GACD,YAAY,CAWxB"}
1
+ {"version":3,"file":"visitors.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/visitors.js"],"names":[],"mappings":"AA+BA;;;;;GAKG;AACH,wCALW,QAAQ,GAAG,EAAE,CAAC,YACd,YAAY,qBACZ,GAAG,GACD,YAAY,CAWxB;6BA7CuC,aAAa;kCAAb,aAAa"}