html-validate-vue 7.2.0 → 7.2.2

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  // src/index.ts
4
- var import_html_validate6 = require("html-validate");
4
+ var import_html_validate7 = require("html-validate");
5
5
 
6
6
  // package.json
7
7
  var name = "html-validate-vue";
@@ -9,8 +9,9 @@ var peerDependencies = {
9
9
  "html-validate": "^8.10.0 || ^9.0.0"
10
10
  };
11
11
 
12
- // elements.json
13
- var elements_default = {
12
+ // src/elements.ts
13
+ var import_html_validate = require("html-validate");
14
+ var elements_default = (0, import_html_validate.defineMetadata)({
14
15
  component: {
15
16
  flow: true,
16
17
  phrasing: true,
@@ -66,7 +67,7 @@ var elements_default = {
66
67
  transparent: true,
67
68
  component: "tag"
68
69
  }
69
- };
70
+ });
70
71
 
71
72
  // src/configs/recommended.ts
72
73
  function createConfig() {
@@ -94,7 +95,7 @@ var configs_default = {
94
95
  };
95
96
 
96
97
  // src/rules/available-slots.ts
97
- var import_html_validate = require("html-validate");
98
+ var import_html_validate2 = require("html-validate");
98
99
 
99
100
  // src/utils/strip-templating.ts
100
101
  function stripTemplating(str) {
@@ -140,7 +141,7 @@ function difference(a, b) {
140
141
  }
141
142
  return result;
142
143
  }
143
- var AvailableSlots = class extends import_html_validate.Rule {
144
+ var AvailableSlots = class extends import_html_validate2.Rule {
144
145
  documentation(context) {
145
146
  if (context) {
146
147
  return {
@@ -190,7 +191,7 @@ var AvailableSlots = class extends import_html_validate.Rule {
190
191
  };
191
192
 
192
193
  // src/rules/prefer-slot-shorthand.ts
193
- var import_html_validate2 = require("html-validate");
194
+ var import_html_validate3 = require("html-validate");
194
195
  var prefix = "v-slot:";
195
196
  function isVSlot(attr) {
196
197
  if (!attr.startsWith(prefix)) {
@@ -209,7 +210,7 @@ function isDeprecatedSlot(attr, value) {
209
210
  if (attr !== "slot") {
210
211
  return null;
211
212
  }
212
- if (value instanceof import_html_validate2.DynamicValue) {
213
+ if (value instanceof import_html_validate3.DynamicValue) {
213
214
  return null;
214
215
  }
215
216
  if (value === null || value === "") {
@@ -217,7 +218,7 @@ function isDeprecatedSlot(attr, value) {
217
218
  }
218
219
  return value.toString();
219
220
  }
220
- var PreferSlotShorthand = class extends import_html_validate2.Rule {
221
+ var PreferSlotShorthand = class extends import_html_validate3.Rule {
221
222
  documentation(context) {
222
223
  const slot = context?.slot ?? "my-slot";
223
224
  return {
@@ -249,7 +250,7 @@ var PreferSlotShorthand = class extends import_html_validate2.Rule {
249
250
  };
250
251
 
251
252
  // src/rules/required-slots.ts
252
- var import_html_validate3 = require("html-validate");
253
+ var import_html_validate4 = require("html-validate");
253
254
  function difference2(a, b) {
254
255
  const result = new Set(a);
255
256
  for (const elem of b) {
@@ -257,7 +258,7 @@ function difference2(a, b) {
257
258
  }
258
259
  return result;
259
260
  }
260
- var RequiredSlots = class extends import_html_validate3.Rule {
261
+ var RequiredSlots = class extends import_html_validate4.Rule {
261
262
  documentation(context) {
262
263
  if (context) {
263
264
  return {
@@ -315,7 +316,7 @@ var rules = {
315
316
  var rules_default = rules;
316
317
 
317
318
  // src/hooks/attribute.ts
318
- var import_html_validate4 = require("html-validate");
319
+ var import_html_validate5 = require("html-validate");
319
320
  function* processAttribute(attr) {
320
321
  yield attr;
321
322
  const bind = /^(?:v-bind)?:(.*)$/.exec(attr.key);
@@ -324,14 +325,14 @@ function* processAttribute(attr) {
324
325
  yield {
325
326
  ...attr,
326
327
  key,
327
- value: new import_html_validate4.DynamicValue(attr.value ? String(attr.value) : ""),
328
+ value: new import_html_validate5.DynamicValue(attr.value ? String(attr.value) : ""),
328
329
  originalAttribute: attr.key
329
330
  };
330
331
  }
331
332
  }
332
333
 
333
334
  // src/hooks/element.ts
334
- var import_html_validate5 = require("html-validate");
335
+ var import_html_validate6 = require("html-validate");
335
336
  function isBound(node) {
336
337
  return node.hasAttribute("v-html");
337
338
  }
@@ -387,8 +388,11 @@ function processElement(node) {
387
388
  if (node.meta?.component) {
388
389
  loadComponentMeta(this, node, node.meta.component);
389
390
  }
391
+ if (node.is("template") && node.meta) {
392
+ node.meta.templateRoot = false;
393
+ }
390
394
  if (isBound(node) || isSlot(node)) {
391
- node.appendText(new import_html_validate5.DynamicValue(""), node.location);
395
+ node.appendText(new import_html_validate6.DynamicValue(""), node.location);
392
396
  }
393
397
  }
394
398
 
@@ -450,20 +454,19 @@ function computeIndent(text) {
450
454
  }
451
455
  function* transformSFC(source) {
452
456
  const indent = computeIndent(source.data);
453
- const sfc = new RegExp(`^${indent}(<template([^>]*)>)([^]*?)^${indent}</template>`, "gm");
457
+ const sfc = new RegExp(`^${indent}(<template([^>]*)>)([^]*?)^${indent}(</template>)`, "gm");
454
458
  let match;
455
459
  while ((match = sfc.exec(source.data)) !== null) {
456
- const preamble = match[1] ?? "";
457
460
  const attr = match[2] ?? "";
458
- const data = match[3] ?? "";
461
+ const data = `${match[1]}${match[3]}${match[4]}`;
459
462
  if (!/lang=".*?"/.exec(attr)) {
460
- const [line, column] = findLocation(source.data, match.index, preamble.length);
463
+ const [line, column] = findLocation(source.data, match.index, 0);
461
464
  yield {
462
465
  data: stripTemplating(data),
463
466
  filename: source.filename,
464
467
  line: line + (source.line - 1),
465
468
  column: column + (source.column - 1),
466
- offset: match.index + (source.offset || 0) + preamble.length,
469
+ offset: match.index + source.offset,
467
470
  originalData: source.originalData ?? source.data,
468
471
  hooks: {
469
472
  processAttribute,
@@ -527,7 +530,7 @@ var schema_default = {
527
530
 
528
531
  // src/index.ts
529
532
  var range = peerDependencies["html-validate"];
530
- (0, import_html_validate6.compatibilityCheck)(name, range);
533
+ (0, import_html_validate7.compatibilityCheck)(name, range);
531
534
  var plugin = {
532
535
  name,
533
536
  configs: configs_default,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts", "../../package.json", "../../elements.json", "../../src/configs/recommended.ts", "../../src/configs/index.ts", "../../src/rules/available-slots.ts", "../../src/utils/strip-templating.ts", "../../src/utils/slots.ts", "../../src/rules/prefer-slot-shorthand.ts", "../../src/rules/required-slots.ts", "../../src/rules/index.ts", "../../src/hooks/attribute.ts", "../../src/hooks/element.ts", "../../src/transform/html.transform.ts", "../../src/transform/js.transform.ts", "../../src/transform/sfc.transform.ts", "../../src/transform/auto.transform.ts", "../../src/transform/index.ts", "../../src/schema.json", "../../src/entry-cjs.ts"],
4
- "sourcesContent": ["import { type Plugin, compatibilityCheck } from \"html-validate\";\nimport { name, peerDependencies } from \"../package.json\";\nimport configs from \"./configs\";\nimport rules from \"./rules\";\nimport transformer from \"./transform\";\nimport elementSchema from \"./schema.json\";\n\nconst range = peerDependencies[\"html-validate\"];\ncompatibilityCheck(name, range);\n\nconst plugin: Plugin = {\n\tname,\n\tconfigs,\n\trules,\n\ttransformer,\n\telementSchema,\n};\n\nexport default plugin;\n", "{\n \"name\": \"html-validate-vue\",\n \"version\": \"7.1.6\",\n \"description\": \"vue transform for html-validate\",\n \"keywords\": [\n \"html\",\n \"lint\",\n \"html-validate\",\n \"vue\"\n ],\n \"homepage\": \"https://html-validate.org/frameworks/vue.html\",\n \"bugs\": {\n \"url\": \"https://gitlab.com/html-validate/html-validate-vue/issues/new\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://gitlab.com/html-validate/html-validate-vue.git\"\n },\n \"license\": \"MIT\",\n \"author\": \"David Sveningsson <ext@sidvind.com>\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/esm/index.d.mts\",\n \"default\": \"./dist/esm/index.mjs\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/index.d.cts\",\n \"default\": \"./dist/cjs/index.cjs\"\n }\n }\n },\n \"main\": \"dist/cjs/index.cjs\",\n \"module\": \"dist/esm/index.mjs\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"prebuild\": \"tsc\",\n \"build\": \"run-s build:*\",\n \"build:lib\": \"node build.mjs\",\n \"build:cjs\": \"dts-bundle-generator --no-banner --project tsconfig.cjs.json -o dist/cjs/index.d.cts src/entry-cjs.ts\",\n \"build:esm\": \"dts-bundle-generator --no-banner --project tsconfig.esm.json -o dist/esm/index.d.mts src/entry-esm.ts\",\n \"eslint\": \"eslint --cache .\",\n \"eslint:fix\": \"eslint --cache --fix .\",\n \"prepack\": \"release-prepack package.json --bundle\",\n \"postpack\": \"release-postpack package.json\",\n \"prepare\": \"husky\",\n \"prepublishOnly\": \"release-prepack package.json --bundle\",\n \"prettier:check\": \"prettier --check .\",\n \"prettier:write\": \"prettier --write .\",\n \"postpublish\": \"release-postpack package.json\",\n \"attw\": \"attw --no-emoji --pack .\",\n \"test\": \"jest\"\n },\n \"commitlint\": {\n \"extends\": \"@html-validate\"\n },\n \"prettier\": \"@html-validate/prettier-config\",\n \"release\": {\n \"extends\": \"@html-validate/semantic-release-config\"\n },\n \"jest\": {\n \"preset\": \"@html-validate/jest-config\"\n },\n \"dependencies\": {\n \"@html-validate/plugin-utils\": \"2.0.3\",\n \"semver\": \"7.7.2\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"0.18.1\",\n \"@html-validate/commitlint-config\": \"3.4.4\",\n \"@html-validate/eslint-config\": \"6.3.0\",\n \"@html-validate/eslint-config-jest\": \"6.3.0\",\n \"@html-validate/eslint-config-typescript\": \"6.3.0\",\n \"@html-validate/eslint-config-typescript-typeinfo\": \"6.3.0\",\n \"@html-validate/jest-config\": \"3.12.1\",\n \"@html-validate/prettier-config\": \"3.0.1\",\n \"@html-validate/release-scripts\": \"6.8.4\",\n \"@tsconfig/node18\": \"18.2.4\",\n \"@tsconfig/strictest\": \"2.0.5\",\n \"@types/estree\": \"1.0.7\",\n \"@types/glob\": \"8.1.0\",\n \"@types/jest\": \"29.5.14\",\n \"@types/node\": \"18.19.103\",\n \"@types/semver\": \"7.7.0\",\n \"dts-bundle-generator\": \"9.5.1\",\n \"esbuild\": \"0.25.4\",\n \"html-validate\": \"9.5.4\",\n \"husky\": \"9.1.7\",\n \"jest\": \"29.7.0\",\n \"jest-environment-jsdom\": \"29.7.0\",\n \"npm-pkg-lint\": \"3.10.12\",\n \"npm-run-all2\": \"8.0.3\",\n \"ts-jest\": \"29.3.4\",\n \"typescript\": \"5.8.3\"\n },\n \"peerDependencies\": {\n \"html-validate\": \"^8.10.0 || ^9.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18.0\"\n },\n \"externalDependencies\": [\n \"@html-validate/plugin-utils\"\n ]\n}\n", "{\n \"component\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true,\n \"component\": \"is\",\n \"requiredAttributes\": [\"is\"]\n },\n\n \"keep-alive\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true\n },\n\n \"portal\": {\n \"deprecated\": {\n \"source\": \"vue\",\n \"message\": \"the <portal> element has been renamed to <teleport>\",\n \"documentation\": \"The `<portal>` element has been renamed to `<teleport>`\"\n }\n },\n\n \"router-link\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true\n },\n\n \"router-view\": {\n \"flow\": true,\n \"slots\": [\"default\"]\n },\n\n \"slot\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true,\n \"scriptSupporting\": true\n },\n\n \"suspense\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true,\n \"slots\": [\"default\", \"fallback\"]\n },\n\n \"teleport\": {\n \"flow\": true,\n \"phrasing\": true\n },\n\n \"transition\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true\n },\n\n \"transition-group\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true,\n \"component\": \"tag\"\n }\n}\n", "import { type ConfigData } from \"html-validate\";\nimport vueElements from \"../../elements.json\";\n\nexport function createConfig(): ConfigData {\n\tconst config: ConfigData = {\n\t\telements: [vueElements],\n\t\trules: {\n\t\t\t/* vue modifiers often use camelcase so allow by default */\n\t\t\t\"attr-case\": [\"error\", { style: \"camelcase\" }],\n\n\t\t\t/* self closing tags often used in vue code so allow by default*/\n\t\t\t\"void-style\": [\"error\", { style: \"selfclose\" }],\n\t\t\t\"no-self-closing\": \"off\",\n\n\t\t\t/* enable rules from this plugin */\n\t\t\t\"vue/available-slots\": \"error\",\n\t\t\t\"vue/prefer-slot-shorthand\": \"error\",\n\t\t\t\"vue/required-slots\": \"error\",\n\t\t},\n\t};\n\n\treturn config;\n}\n\nexport default createConfig();\n", "import recommended from \"./recommended\";\n\nexport default {\n\trecommended,\n};\n", "import { type HtmlElement, Rule, type RuleDocumentation, type DOMReadyEvent } from \"html-validate\";\nimport { findUsedSlots } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\tinterface MetaElement {\n\t\tslots?: string[];\n\t}\n}\n\ninterface Context {\n\telement: string;\n\tslot: string;\n\tavailable: string[];\n}\n\nfunction difference<T>(a: Set<T>, b: Set<T>): Set<T> {\n\tconst result = new Set(a);\n\tfor (const elem of b) {\n\t\tresult.delete(elem);\n\t}\n\treturn result;\n}\n\nexport class AvailableSlots extends Rule<Context> {\n\tpublic override documentation(context?: Context): RuleDocumentation {\n\t\tif (context) {\n\t\t\treturn {\n\t\t\t\tdescription: [\n\t\t\t\t\t`The <${context.element}> component does not have a slot named \"${context.slot}\". Only known slots can be specified.`,\n\t\t\t\t\t\"\",\n\t\t\t\t\t\"The following slots are available\",\n\t\t\t\t]\n\t\t\t\t\t.concat(context.available.map((slot) => `- ${slot}`))\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tdescription: \"Only known slots can be specified.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"dom:ready\", (event: DOMReadyEvent) => {\n\t\t\tconst doc = event.document;\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-deprecated -- need to\n\t\t\t * use this for backwards compatibility until support for v7 is dropped */\n\t\t\tdoc.visitDepthFirst((node: HtmlElement) => {\n\t\t\t\t/* ignore rule if element has no meta or meta does not specify available slots */\n\t\t\t\tconst meta = node.meta;\n\t\t\t\tif (!meta?.slots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validateSlots(node, meta.slots);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate validateSlots(node: HtmlElement, slots: string[]): void {\n\t\tconst usedSlots = findUsedSlots(node);\n\t\tconst available = new Set(slots);\n\t\tconst used = new Set(usedSlots.keys());\n\t\tconst diff = difference(used, available);\n\n\t\tfor (const missing of diff) {\n\t\t\tconst context: Context = {\n\t\t\t\telement: node.tagName,\n\t\t\t\tslot: missing,\n\t\t\t\tavailable: slots,\n\t\t\t};\n\t\t\tthis.report(\n\t\t\t\tnode,\n\t\t\t\t`<${node.tagName}> component has no slot \"${missing}\"`,\n\t\t\t\tusedSlots.get(missing),\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}\n\t}\n}\n", "/**\n * Strip anything inside `{{ .. }}` in case it contains anything that looks like\n * markup, i.e. it will be ignored\n */\nexport function stripTemplating(str: string): string {\n\t/* eslint-disable-next-line sonarjs/slow-regex -- technical debt, should refactor */\n\treturn str.replace(/{{(.*?)}}/g, (_, m: string) => {\n\t\tconst filler = \" \".repeat(m.length);\n\t\treturn `{{${filler}}}`;\n\t});\n}\n", "import { type HtmlElement, type Location } from \"html-validate\";\n\nconst slotAttr = /(?:v-slot:|#)([^[]+)/;\n\nfunction haveSlot(value: [string, Location] | null): value is [string, Location] {\n\treturn value !== null;\n}\n\n/**\n * Search all children for slots and return both slot names and locations.\n */\nexport function findUsedSlots(node: HtmlElement): Map<string, Location> {\n\tconst template = node.querySelectorAll(\">template, >[slot]\");\n\tconst slots = template.map((child) => findSlotAttribute(child)).filter(haveSlot);\n\tconst initial = new Map<string, Location>();\n\treturn slots.reduce((result: Map<string, Location>, [key, val]) => {\n\t\tresult.set(key, val);\n\t\treturn result;\n\t}, initial);\n}\n\n/**\n * Find the name of the slot and its location used by an element. Searches\n * both v-slot:foo and slot=\"foo\".\n */\nexport function findSlotAttribute(node: HtmlElement): [string, Location] | null {\n\tfor (const attr of node.attributes) {\n\t\t/* find v-slot directive */\n\t\tconst match = slotAttr.exec(attr.key);\n\t\tif (match) {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if slot matches [1] will exist */\n\t\t\tconst slot = match[1]!;\n\t\t\treturn [slot, attr.keyLocation];\n\t\t}\n\n\t\t/* find deprecated slot attribute */\n\t\tif (attr.key === \"slot\" && typeof attr.value === \"string\") {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- valueLocation will always be set the value is present */\n\t\t\treturn [attr.value.toString(), attr.valueLocation!];\n\t\t}\n\t}\n\treturn null;\n}\n", "import { Rule, type RuleDocumentation, type AttributeEvent, DynamicValue } from \"html-validate\";\n\ninterface RuleContext {\n\tslot: string;\n}\n\nconst prefix = \"v-slot:\";\n\nfunction isVSlot(attr: string): string | null {\n\tif (!attr.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tif (attr.length <= prefix.length) {\n\t\treturn null;\n\t}\n\tconst slot = attr.slice(prefix.length);\n\tif (/^\\[.*\\]$/.exec(slot)) {\n\t\treturn null;\n\t}\n\treturn slot;\n}\n\nfunction isDeprecatedSlot(attr: string, value: null | string | DynamicValue): string | null {\n\tif (attr !== \"slot\") {\n\t\treturn null;\n\t}\n\tif (value instanceof DynamicValue) {\n\t\treturn null;\n\t}\n\tif (value === null || value === \"\") {\n\t\treturn null;\n\t}\n\treturn value.toString();\n}\n\nexport class PreferSlotShorthand extends Rule<RuleContext> {\n\tpublic override documentation(context?: RuleContext): RuleDocumentation {\n\t\tconst slot = context?.slot ?? \"my-slot\";\n\t\treturn {\n\t\t\tdescription: [\n\t\t\t\t`Prefer to use \\`#${slot}\\` over \\`v-slot:${slot}\\`.`,\n\t\t\t\t\"\",\n\t\t\t\t\"Vue.js supports a shorthand syntax for slots using `#` instead of `v-slot:` or the deprecated `slot` attribute, e.g. using `#header` instead of `v-slot:header`.\",\n\t\t\t].join(\"\\n\"),\n\t\t};\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"attr\", (event: AttributeEvent) => {\n\t\t\tconst { key: attr, value, target, keyLocation: location } = event;\n\n\t\t\tlet slot: string | null;\n\n\t\t\t/* handle v-slot:xyz */\n\t\t\tslot = isVSlot(attr);\n\t\t\tif (slot) {\n\t\t\t\tconst context: RuleContext = { slot };\n\t\t\t\tconst message = `Prefer to use #${slot} over ${attr}`;\n\t\t\t\tthis.report(target, message, location, context);\n\t\t\t}\n\n\t\t\t/* handle slot=\"xyz\" */\n\t\t\tslot = isDeprecatedSlot(attr, value);\n\t\t\tif (slot) {\n\t\t\t\tconst context: RuleContext = { slot };\n\t\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- value is checked by isDeprecatedSlot */\n\t\t\t\tconst message = `Prefer to use #${slot} over ${attr}=\"${value!.toString()}\"`;\n\t\t\t\tthis.report(target, message, location, context);\n\t\t\t}\n\t\t});\n\t}\n}\n", "import { type DOMReadyEvent, type HtmlElement, type RuleDocumentation, Rule } from \"html-validate\";\nimport { findUsedSlots } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\tinterface MetaElement {\n\t\trequiredSlots?: string[];\n\t}\n}\n\ninterface Context {\n\telement: string;\n\tslot: string;\n\trequired: string[];\n}\n\nfunction difference<T>(a: Set<T>, b: Set<T>): Set<T> {\n\tconst result = new Set(a);\n\tfor (const elem of b) {\n\t\tresult.delete(elem);\n\t}\n\treturn result;\n}\n\nexport class RequiredSlots extends Rule<Context> {\n\tpublic override documentation(context?: Context): RuleDocumentation {\n\t\tif (context) {\n\t\t\treturn {\n\t\t\t\tdescription: [\n\t\t\t\t\t`The <${context.element}> component requires slot \"${context.slot}\" to be implemented. Add \\`<template v-slot:${context.slot}>\\``,\n\t\t\t\t\t\"\",\n\t\t\t\t\t\"The following slots are required\",\n\t\t\t\t]\n\t\t\t\t\t.concat(context.required.map((slot) => `- ${slot}`))\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tdescription: \"All required slots must be implemented.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"dom:ready\", (event: DOMReadyEvent) => {\n\t\t\tconst doc = event.document;\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-deprecated -- need to\n\t\t\t * use this for backwards compatibility until support for v7 is dropped */\n\t\t\tdoc.visitDepthFirst((node: HtmlElement) => {\n\t\t\t\t/* ignore rule if element has no meta or meta does not specify available slots */\n\t\t\t\tconst meta = node.meta;\n\t\t\t\tif (!meta?.requiredSlots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validateSlots(node, meta.requiredSlots);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate validateSlots(node: HtmlElement, requiredSlots: string[]): void {\n\t\tconst usedSlots = findUsedSlots(node);\n\t\tconst required = new Set(requiredSlots);\n\t\tconst used = new Set(usedSlots.keys());\n\t\tconst diff = difference(required, used);\n\n\t\tfor (const missing of diff) {\n\t\t\tconst context: Context = {\n\t\t\t\telement: node.tagName,\n\t\t\t\tslot: missing,\n\t\t\t\trequired: requiredSlots,\n\t\t\t};\n\t\t\tthis.report(\n\t\t\t\tnode,\n\t\t\t\t`<${node.tagName}> component requires slot \"${missing}\" to be implemented`,\n\t\t\t\tnull,\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}\n\t}\n}\n", "import { AvailableSlots } from \"./available-slots\";\nimport { PreferSlotShorthand } from \"./prefer-slot-shorthand\";\nimport { RequiredSlots } from \"./required-slots\";\n\nconst rules = {\n\t\"vue/available-slots\": AvailableSlots,\n\t\"vue/prefer-slot-shorthand\": PreferSlotShorthand,\n\t\"vue/required-slots\": RequiredSlots,\n};\n\nexport default rules;\n", "import { DynamicValue, type AttributeData } from \"html-validate\";\n\nexport function* processAttribute(attr: AttributeData): Iterable<AttributeData> {\n\t/* always yield original attribute */\n\tyield attr;\n\n\t/* setup :foo and v-bind:foo alias */\n\tconst bind = /^(?:v-bind)?:(.*)$/.exec(attr.key);\n\tif (bind) {\n\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if bind matches [1] will exist */\n\t\tconst key = bind[1]!;\n\t\tyield {\n\t\t\t...attr,\n\t\t\tkey,\n\t\t\tvalue: new DynamicValue(attr.value ? String(attr.value) : \"\"),\n\t\t\toriginalAttribute: attr.key,\n\t\t};\n\t}\n}\n", "import {\n\tDynamicValue,\n\ttype HtmlElement,\n\ttype MetaElement,\n\ttype ProcessElementContext,\n} from \"html-validate\";\nimport { findSlotAttribute } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\texport interface MetaData {\n\t\tcomponent?: string;\n\t}\n}\n\nfunction isBound(node: HtmlElement): boolean {\n\treturn node.hasAttribute(\"v-html\");\n}\n\nfunction isSlot(node: HtmlElement): boolean {\n\treturn node.is(\"slot\");\n}\n\nfunction loadSlotMeta(context: ProcessElementContext, slotname: string, node: HtmlElement): void {\n\tconst parent = node.parent;\n\tif (!parent) {\n\t\treturn;\n\t}\n\n\t/* Generate a new virtual tagname to load meta element from */\n\tconst getMetaFor = (tagName: string): MetaElement | null => {\n\t\tconst meta = context.getMetaFor(tagName);\n\t\treturn meta && meta.tagName !== \"*\" ? meta : null;\n\t};\n\tconst key = `${parent.tagName}#${slotname}`;\n\tconst fallbackKey = `${parent.tagName}:${slotname}`;\n\tconst meta = getMetaFor(key) ?? getMetaFor(fallbackKey);\n\tif (!meta) {\n\t\treturn;\n\t}\n\n\tnode.loadMeta(meta);\n\n\t/* add an annotation so error messages will be more understandable */\n\tnode.setAnnotation(`slot \"${slotname}\" (<${parent.tagName}>)`);\n}\n\n/**\n * Handle <component> or a component with a slot wrapped in it.\n */\nfunction loadComponentMeta(\n\tcontext: ProcessElementContext,\n\tnode: HtmlElement,\n\tcomponent: string,\n): void {\n\tlet src: HtmlElement = node;\n\n\t/* if this is a slot with wrapped in a <component> we fetch attributes from\n\t * the parent element, i.e. the actual component */\n\tif (node.tagName === \"template\" && src.parent) {\n\t\tsrc = src.parent;\n\t}\n\n\t/* try to fetch the attribute containing the element to use */\n\tconst attr = src.getAttribute(component);\n\tif (!attr || attr.isDynamic) {\n\t\treturn;\n\t}\n\n\t/* use the attribute value to lookup new metadata based on the tagname */\n\tconst tagName = attr.value as string;\n\tconst meta = context.getMetaFor(tagName);\n\tif (!meta || meta.tagName === \"*\") {\n\t\treturn;\n\t}\n\n\tnode.loadMeta(meta);\n\n\t/* update or add new annotation so error messages will be more descriptive */\n\tif (node.isSameNode(src)) {\n\t\tnode.setAnnotation(`<${meta.tagName}> (<${node.tagName}>)`);\n\t} else {\n\t\tconst name = node.annotatedName.replace(\"(<\", `(<${meta.tagName}> via <`);\n\t\tnode.setAnnotation(name);\n\t}\n}\n\nexport function processElement(this: ProcessElementContext, node: HtmlElement): void {\n\tconst slot = findSlotAttribute(node);\n\n\t/* If this element is a slot we load new metadata properties onto the element\n\t * to support adding properties directly to slots, e.g. to allow/disallow\n\t * content in the slot. */\n\tif (slot) {\n\t\tconst [slotname] = slot;\n\t\tloadSlotMeta(this, slotname, node);\n\t}\n\n\t/* handle usage of <component>, either directly or inside a component */\n\tif (node.meta?.component) {\n\t\tloadComponentMeta(this, node, node.meta.component);\n\t}\n\n\t/* Mark as having dynamic text if the element either content bound via v-html\n\t * or if it is a slot. This is needed for rules with requires textual content,\n\t * e.g a heading cannot be empty. */\n\tif (isBound(node) || isSlot(node)) {\n\t\tnode.appendText(new DynamicValue(\"\"), node.location);\n\t}\n}\n", "import { type Source } from \"html-validate\";\nimport { processAttribute, processElement } from \"../hooks\";\n\n/**\n * Transform a regular HTML file. In practice this only applies hooks without\n * any extraction.\n */\nexport function* transformHTML(source: Source): Iterable<Source> {\n\tyield {\n\t\t...source,\n\t\thooks: {\n\t\t\tprocessAttribute,\n\t\t\tprocessElement,\n\t\t},\n\t};\n}\n\ntransformHTML.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { TemplateExtractor } from \"@html-validate/plugin-utils\";\nimport { processAttribute, processElement } from \"../hooks\";\n\n/**\n * Match template property in `Vue.component` call\n */\nexport function transformJS(source: Source): Iterable<Source> {\n\tconst te = TemplateExtractor.fromString(source.data, source.filename);\n\treturn Array.from(te.extractObjectProperty(\"template\"), (cur) => {\n\t\tcur.originalData = source.originalData ?? source.data;\n\t\tcur.hooks = {\n\t\t\tprocessAttribute,\n\t\t\tprocessElement,\n\t\t};\n\t\treturn cur;\n\t});\n}\n\ntransformJS.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { processAttribute, processElement } from \"../hooks\";\nimport { stripTemplating } from \"../utils\";\n\nfunction findLocation(source: string, index: number, preamble: number): [number, number] {\n\tlet line = 1;\n\tlet prev = 0;\n\tlet pos = source.indexOf(\"\\n\");\n\twhile (pos !== -1) {\n\t\tif (pos > index) {\n\t\t\treturn [line, index - prev + preamble + 1];\n\t\t}\n\t\tline++;\n\t\tprev = pos;\n\t\tpos = source.indexOf(\"\\n\", pos + 1);\n\t}\n\treturn [line, 1];\n}\n\nfunction computeIndent(text: string): string {\n\tconst lines = text.split(\"\\n\");\n\tconst initial = null as string | null;\n\tconst common = lines.reduce((common, line) => {\n\t\tconst match = /^(\\s*)\\S/.exec(line);\n\t\tif (match) {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if match matches [1] will exist */\n\t\t\tconst indent = match[1]!;\n\t\t\treturn common === null || indent.length < common.length ? indent : common;\n\t\t} else {\n\t\t\treturn common;\n\t\t}\n\t}, initial);\n\treturn common ?? \"\";\n}\n\n/**\n * Match templates from SFC <template> tag\n */\nexport function* transformSFC(source: Source): Iterable<Source> {\n\tconst indent = computeIndent(source.data);\n\t/* eslint-disable-next-line security/detect-non-literal-regexp -- will only contain whitespace */\n\tconst sfc = new RegExp(`^${indent}(<template([^>]*)>)([^]*?)^${indent}</template>`, \"gm\");\n\tlet match: RegExpExecArray | null;\n\twhile ((match = sfc.exec(source.data)) !== null) {\n\t\tconst preamble = match[1] ?? \"\";\n\t\tconst attr = match[2] ?? \"\";\n\t\tconst data = match[3] ?? \"\";\n\t\tif (!/lang=\".*?\"/.exec(attr)) {\n\t\t\tconst [line, column] = findLocation(source.data, match.index, preamble.length);\n\t\t\tyield {\n\t\t\t\tdata: stripTemplating(data),\n\t\t\t\tfilename: source.filename,\n\t\t\t\tline: line + (source.line - 1),\n\t\t\t\tcolumn: column + (source.column - 1),\n\t\t\t\toffset: match.index + (source.offset || 0) + preamble.length,\n\t\t\t\toriginalData: source.originalData ?? source.data,\n\t\t\t\thooks: {\n\t\t\t\t\tprocessAttribute,\n\t\t\t\t\tprocessElement,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n}\n\ntransformSFC.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { transformHTML } from \"./html.transform\";\nimport { transformJS } from \"./js.transform\";\nimport { transformSFC } from \"./sfc.transform\";\n\n/**\n * Returns true if the source is considered a SFC component\n */\nfunction isVue(source: Source): boolean {\n\treturn !!/\\.vue$/i.exec(source.filename);\n}\n\n/**\n * Returns true if the source is considered javascript\n */\nfunction isJavascript(source: Source): boolean {\n\treturn !!/\\.(jsx?|tsx?)$/i.exec(source.filename);\n}\n\nexport function* autodetect(source: Source): Iterable<Source> {\n\tif (isVue(source)) {\n\t\tyield* transformSFC(source);\n\t} else if (isJavascript(source)) {\n\t\tyield* transformJS(source);\n\t} else {\n\t\tyield* transformHTML(source);\n\t}\n}\n\nautodetect.api = 1;\n", "import { type Transformer } from \"html-validate\";\nimport { autodetect } from \"./auto.transform\";\nimport { transformHTML } from \"./html.transform\";\nimport { transformJS } from \"./js.transform\";\nimport { transformSFC } from \"./sfc.transform\";\n\nconst transformer: Record<string, Transformer> = {\n\tdefault: autodetect,\n\tauto: autodetect,\n\tjs: transformJS,\n\tsfc: transformSFC,\n\thtml: transformHTML,\n};\n\nexport default transformer;\n", "{\n \"properties\": {\n \"component\": {\n \"type\": \"string\",\n \"copyable\": true\n },\n \"requiredSlots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"slots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n}\n", "/* istanbul ignore file */\n\nimport plugin from \"./index\";\n\nexport = plugin;\n"],
5
- "mappings": ";;;AAAA,IAAAA,wBAAgD;;;ACC9C,WAAQ;AAgGR,uBAAoB;AAAA,EAClB,iBAAiB;AACnB;;;ACnGF;AAAA,EACE,WAAa;AAAA,IACX,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,IACf,WAAa;AAAA,IACb,oBAAsB,CAAC,IAAI;AAAA,EAC7B;AAAA,EAEA,cAAc;AAAA,IACZ,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,EACjB;AAAA,EAEA,QAAU;AAAA,IACR,YAAc;AAAA,MACZ,QAAU;AAAA,MACV,SAAW;AAAA,MACX,eAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,eAAe;AAAA,IACb,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,EACjB;AAAA,EAEA,eAAe;AAAA,IACb,MAAQ;AAAA,IACR,OAAS,CAAC,SAAS;AAAA,EACrB;AAAA,EAEA,MAAQ;AAAA,IACN,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,IACf,kBAAoB;AAAA,EACtB;AAAA,EAEA,UAAY;AAAA,IACV,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,IACf,OAAS,CAAC,WAAW,UAAU;AAAA,EACjC;AAAA,EAEA,UAAY;AAAA,IACV,MAAQ;AAAA,IACR,UAAY;AAAA,EACd;AAAA,EAEA,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,EACjB;AAAA,EAEA,oBAAoB;AAAA,IAClB,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,IACf,WAAa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AA,MACP,MAAQ;AAAA,MACR,OAAS;AAAA,QACP,MAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;;;AlBZA,IAAM,QAAQ,iBAAiB,eAAe;AAAA,IAC9C,0CAAmB,MAAM,KAAK;AAE9B,IAAM,SAAiB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAO,cAAQ;;;AmBdf,iBAAS;",
6
- "names": ["import_html_validate", "import_html_validate", "import_html_validate", "difference", "import_html_validate", "import_html_validate", "meta", "name", "common"]
3
+ "sources": ["../../src/index.ts", "../../package.json", "../../src/elements.ts", "../../src/configs/recommended.ts", "../../src/configs/index.ts", "../../src/rules/available-slots.ts", "../../src/utils/strip-templating.ts", "../../src/utils/slots.ts", "../../src/rules/prefer-slot-shorthand.ts", "../../src/rules/required-slots.ts", "../../src/rules/index.ts", "../../src/hooks/attribute.ts", "../../src/hooks/element.ts", "../../src/transform/html.transform.ts", "../../src/transform/js.transform.ts", "../../src/transform/sfc.transform.ts", "../../src/transform/auto.transform.ts", "../../src/transform/index.ts", "../../src/schema.json", "../../src/entry-cjs.ts"],
4
+ "sourcesContent": ["import { type Plugin, compatibilityCheck } from \"html-validate\";\nimport { name, peerDependencies } from \"../package.json\";\nimport configs from \"./configs\";\nimport rules from \"./rules\";\nimport transformer from \"./transform\";\nimport elementSchema from \"./schema.json\";\n\nconst range = peerDependencies[\"html-validate\"];\ncompatibilityCheck(name, range);\n\nconst plugin: Plugin = {\n\tname,\n\tconfigs,\n\trules,\n\ttransformer,\n\telementSchema,\n};\n\nexport default plugin;\n", "{\n \"name\": \"html-validate-vue\",\n \"version\": \"7.2.1\",\n \"description\": \"vue transform for html-validate\",\n \"keywords\": [\n \"html\",\n \"lint\",\n \"html-validate\",\n \"vue\"\n ],\n \"homepage\": \"https://html-validate.org/frameworks/vue.html\",\n \"bugs\": {\n \"url\": \"https://gitlab.com/html-validate/html-validate-vue/issues/new\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://gitlab.com/html-validate/html-validate-vue.git\"\n },\n \"license\": \"MIT\",\n \"author\": \"David Sveningsson <ext@sidvind.com>\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/esm/index.d.mts\",\n \"default\": \"./dist/esm/index.mjs\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/index.d.cts\",\n \"default\": \"./dist/cjs/index.cjs\"\n }\n }\n },\n \"main\": \"dist/cjs/index.cjs\",\n \"module\": \"dist/esm/index.mjs\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"prebuild\": \"tsc\",\n \"build\": \"run-s build:*\",\n \"build:lib\": \"node build.mjs\",\n \"build:cjs\": \"dts-bundle-generator --no-banner --project tsconfig.cjs.json -o dist/cjs/index.d.cts src/entry-cjs.ts\",\n \"build:esm\": \"dts-bundle-generator --no-banner --project tsconfig.esm.json -o dist/esm/index.d.mts src/entry-esm.ts\",\n \"eslint\": \"eslint --cache .\",\n \"eslint:fix\": \"eslint --cache --fix .\",\n \"prepack\": \"release-prepack package.json --bundle\",\n \"postpack\": \"release-postpack package.json\",\n \"prepare\": \"husky\",\n \"prepublishOnly\": \"release-prepack package.json --bundle\",\n \"prettier:check\": \"prettier --check .\",\n \"prettier:write\": \"prettier --write .\",\n \"postpublish\": \"release-postpack package.json\",\n \"attw\": \"attw --no-emoji --pack .\",\n \"test\": \"jest\"\n },\n \"commitlint\": {\n \"extends\": \"@html-validate\"\n },\n \"prettier\": \"@html-validate/prettier-config\",\n \"release\": {\n \"extends\": \"@html-validate/semantic-release-config\"\n },\n \"jest\": {\n \"preset\": \"@html-validate/jest-config\"\n },\n \"dependencies\": {\n \"@html-validate/plugin-utils\": \"2.0.3\",\n \"semver\": \"7.7.2\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"0.18.2\",\n \"@html-validate/commitlint-config\": \"3.5.0\",\n \"@html-validate/eslint-config\": \"6.4.1\",\n \"@html-validate/eslint-config-jest\": \"6.4.1\",\n \"@html-validate/eslint-config-typescript\": \"6.4.0\",\n \"@html-validate/eslint-config-typescript-typeinfo\": \"6.4.0\",\n \"@html-validate/jest-config\": \"3.13.0\",\n \"@html-validate/prettier-config\": \"3.0.4\",\n \"@html-validate/release-scripts\": \"6.9.0\",\n \"@tsconfig/node18\": \"18.2.4\",\n \"@tsconfig/strictest\": \"2.0.5\",\n \"@types/estree\": \"1.0.8\",\n \"@types/glob\": \"8.1.0\",\n \"@types/jest\": \"29.5.14\",\n \"@types/node\": \"18.19.111\",\n \"@types/semver\": \"7.7.0\",\n \"dts-bundle-generator\": \"9.5.1\",\n \"esbuild\": \"0.25.5\",\n \"html-validate\": \"9.7.0\",\n \"husky\": \"9.1.7\",\n \"jest\": \"29.7.0\",\n \"jest-environment-jsdom\": \"29.7.0\",\n \"npm-pkg-lint\": \"4.0.0\",\n \"npm-run-all2\": \"8.0.4\",\n \"ts-jest\": \"29.4.0\",\n \"typescript\": \"5.8.3\"\n },\n \"peerDependencies\": {\n \"html-validate\": \"^8.10.0 || ^9.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18.0\"\n },\n \"externalDependencies\": [\n \"@html-validate/plugin-utils\"\n ]\n}\n", "import { defineMetadata } from \"html-validate\";\n\nexport default defineMetadata({\n\tcomponent: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t\tcomponent: \"is\",\n\t\trequiredAttributes: [\"is\"],\n\t},\n\n\t\"keep-alive\": {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t},\n\n\tportal: {\n\t\tdeprecated: {\n\t\t\tsource: \"vue\",\n\t\t\tmessage: \"the <portal> element has been renamed to <teleport>\",\n\t\t\tdocumentation: \"The `<portal>` element has been renamed to `<teleport>`\",\n\t\t},\n\t},\n\n\t\"router-link\": {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t},\n\n\t\"router-view\": {\n\t\tflow: true,\n\t\tslots: [\"default\"],\n\t},\n\n\tslot: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t\tscriptSupporting: true,\n\t},\n\n\tsuspense: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t\tslots: [\"default\", \"fallback\"],\n\t},\n\n\tteleport: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t},\n\n\ttransition: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t},\n\n\t\"transition-group\": {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t\tcomponent: \"tag\",\n\t},\n});\n", "import { type ConfigData } from \"html-validate\";\nimport vueElements from \"../elements\";\n\nexport function createConfig(): ConfigData {\n\tconst config: ConfigData = {\n\t\telements: [vueElements],\n\t\trules: {\n\t\t\t/* vue modifiers often use camelcase so allow by default */\n\t\t\t\"attr-case\": [\"error\", { style: \"camelcase\" }],\n\n\t\t\t/* self closing tags often used in vue code so allow by default*/\n\t\t\t\"void-style\": [\"error\", { style: \"selfclose\" }],\n\t\t\t\"no-self-closing\": \"off\",\n\n\t\t\t/* enable rules from this plugin */\n\t\t\t\"vue/available-slots\": \"error\",\n\t\t\t\"vue/prefer-slot-shorthand\": \"error\",\n\t\t\t\"vue/required-slots\": \"error\",\n\t\t},\n\t};\n\n\treturn config;\n}\n\nexport default createConfig();\n", "import recommended from \"./recommended\";\n\nexport default {\n\trecommended,\n};\n", "import { type HtmlElement, Rule, type RuleDocumentation, type DOMReadyEvent } from \"html-validate\";\nimport { findUsedSlots } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\tinterface MetaData {\n\t\tslots?: string[];\n\t}\n\tinterface MetaElement {\n\t\tslots?: string[];\n\t}\n}\n\ninterface Context {\n\telement: string;\n\tslot: string;\n\tavailable: string[];\n}\n\nfunction difference<T>(a: Set<T>, b: Set<T>): Set<T> {\n\tconst result = new Set(a);\n\tfor (const elem of b) {\n\t\tresult.delete(elem);\n\t}\n\treturn result;\n}\n\nexport class AvailableSlots extends Rule<Context> {\n\tpublic override documentation(context?: Context): RuleDocumentation {\n\t\tif (context) {\n\t\t\treturn {\n\t\t\t\tdescription: [\n\t\t\t\t\t`The <${context.element}> component does not have a slot named \"${context.slot}\". Only known slots can be specified.`,\n\t\t\t\t\t\"\",\n\t\t\t\t\t\"The following slots are available\",\n\t\t\t\t]\n\t\t\t\t\t.concat(context.available.map((slot) => `- ${slot}`))\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tdescription: \"Only known slots can be specified.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"dom:ready\", (event: DOMReadyEvent) => {\n\t\t\tconst doc = event.document;\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-deprecated -- need to\n\t\t\t * use this for backwards compatibility until support for v7 is dropped */\n\t\t\tdoc.visitDepthFirst((node: HtmlElement) => {\n\t\t\t\t/* ignore rule if element has no meta or meta does not specify available slots */\n\t\t\t\tconst meta = node.meta;\n\t\t\t\tif (!meta?.slots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validateSlots(node, meta.slots);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate validateSlots(node: HtmlElement, slots: string[]): void {\n\t\tconst usedSlots = findUsedSlots(node);\n\t\tconst available = new Set(slots);\n\t\tconst used = new Set(usedSlots.keys());\n\t\tconst diff = difference(used, available);\n\n\t\tfor (const missing of diff) {\n\t\t\tconst context: Context = {\n\t\t\t\telement: node.tagName,\n\t\t\t\tslot: missing,\n\t\t\t\tavailable: slots,\n\t\t\t};\n\t\t\tthis.report(\n\t\t\t\tnode,\n\t\t\t\t`<${node.tagName}> component has no slot \"${missing}\"`,\n\t\t\t\tusedSlots.get(missing),\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}\n\t}\n}\n", "/**\n * Strip anything inside `{{ .. }}` in case it contains anything that looks like\n * markup, i.e. it will be ignored\n */\nexport function stripTemplating(str: string): string {\n\t/* eslint-disable-next-line sonarjs/slow-regex -- technical debt, should refactor */\n\treturn str.replace(/{{(.*?)}}/g, (_, m: string) => {\n\t\tconst filler = \" \".repeat(m.length);\n\t\treturn `{{${filler}}}`;\n\t});\n}\n", "import { type HtmlElement, type Location } from \"html-validate\";\n\nconst slotAttr = /(?:v-slot:|#)([^[]+)/;\n\nfunction haveSlot(value: [string, Location] | null): value is [string, Location] {\n\treturn value !== null;\n}\n\n/**\n * Search all children for slots and return both slot names and locations.\n */\nexport function findUsedSlots(node: HtmlElement): Map<string, Location> {\n\tconst template = node.querySelectorAll(\">template, >[slot]\");\n\tconst slots = template.map((child) => findSlotAttribute(child)).filter(haveSlot);\n\tconst initial = new Map<string, Location>();\n\treturn slots.reduce((result: Map<string, Location>, [key, val]) => {\n\t\tresult.set(key, val);\n\t\treturn result;\n\t}, initial);\n}\n\n/**\n * Find the name of the slot and its location used by an element. Searches\n * both v-slot:foo and slot=\"foo\".\n */\nexport function findSlotAttribute(node: HtmlElement): [string, Location] | null {\n\tfor (const attr of node.attributes) {\n\t\t/* find v-slot directive */\n\t\tconst match = slotAttr.exec(attr.key);\n\t\tif (match) {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if slot matches [1] will exist */\n\t\t\tconst slot = match[1]!;\n\t\t\treturn [slot, attr.keyLocation];\n\t\t}\n\n\t\t/* find deprecated slot attribute */\n\t\tif (attr.key === \"slot\" && typeof attr.value === \"string\") {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- valueLocation will always be set the value is present */\n\t\t\treturn [attr.value.toString(), attr.valueLocation!];\n\t\t}\n\t}\n\treturn null;\n}\n", "import { Rule, type RuleDocumentation, type AttributeEvent, DynamicValue } from \"html-validate\";\n\ninterface RuleContext {\n\tslot: string;\n}\n\nconst prefix = \"v-slot:\";\n\nfunction isVSlot(attr: string): string | null {\n\tif (!attr.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tif (attr.length <= prefix.length) {\n\t\treturn null;\n\t}\n\tconst slot = attr.slice(prefix.length);\n\tif (/^\\[.*\\]$/.exec(slot)) {\n\t\treturn null;\n\t}\n\treturn slot;\n}\n\nfunction isDeprecatedSlot(attr: string, value: null | string | DynamicValue): string | null {\n\tif (attr !== \"slot\") {\n\t\treturn null;\n\t}\n\tif (value instanceof DynamicValue) {\n\t\treturn null;\n\t}\n\tif (value === null || value === \"\") {\n\t\treturn null;\n\t}\n\treturn value.toString();\n}\n\nexport class PreferSlotShorthand extends Rule<RuleContext> {\n\tpublic override documentation(context?: RuleContext): RuleDocumentation {\n\t\tconst slot = context?.slot ?? \"my-slot\";\n\t\treturn {\n\t\t\tdescription: [\n\t\t\t\t`Prefer to use \\`#${slot}\\` over \\`v-slot:${slot}\\`.`,\n\t\t\t\t\"\",\n\t\t\t\t\"Vue.js supports a shorthand syntax for slots using `#` instead of `v-slot:` or the deprecated `slot` attribute, e.g. using `#header` instead of `v-slot:header`.\",\n\t\t\t].join(\"\\n\"),\n\t\t};\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"attr\", (event: AttributeEvent) => {\n\t\t\tconst { key: attr, value, target, keyLocation: location } = event;\n\n\t\t\tlet slot: string | null;\n\n\t\t\t/* handle v-slot:xyz */\n\t\t\tslot = isVSlot(attr);\n\t\t\tif (slot) {\n\t\t\t\tconst context: RuleContext = { slot };\n\t\t\t\tconst message = `Prefer to use #${slot} over ${attr}`;\n\t\t\t\tthis.report(target, message, location, context);\n\t\t\t}\n\n\t\t\t/* handle slot=\"xyz\" */\n\t\t\tslot = isDeprecatedSlot(attr, value);\n\t\t\tif (slot) {\n\t\t\t\tconst context: RuleContext = { slot };\n\t\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- value is checked by isDeprecatedSlot */\n\t\t\t\tconst message = `Prefer to use #${slot} over ${attr}=\"${value!.toString()}\"`;\n\t\t\t\tthis.report(target, message, location, context);\n\t\t\t}\n\t\t});\n\t}\n}\n", "import { type DOMReadyEvent, type HtmlElement, type RuleDocumentation, Rule } from \"html-validate\";\nimport { findUsedSlots } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\tinterface MetaData {\n\t\trequiredSlots?: string[];\n\t}\n\tinterface MetaElement {\n\t\trequiredSlots?: string[];\n\t}\n}\n\ninterface Context {\n\telement: string;\n\tslot: string;\n\trequired: string[];\n}\n\nfunction difference<T>(a: Set<T>, b: Set<T>): Set<T> {\n\tconst result = new Set(a);\n\tfor (const elem of b) {\n\t\tresult.delete(elem);\n\t}\n\treturn result;\n}\n\nexport class RequiredSlots extends Rule<Context> {\n\tpublic override documentation(context?: Context): RuleDocumentation {\n\t\tif (context) {\n\t\t\treturn {\n\t\t\t\tdescription: [\n\t\t\t\t\t`The <${context.element}> component requires slot \"${context.slot}\" to be implemented. Add \\`<template v-slot:${context.slot}>\\``,\n\t\t\t\t\t\"\",\n\t\t\t\t\t\"The following slots are required\",\n\t\t\t\t]\n\t\t\t\t\t.concat(context.required.map((slot) => `- ${slot}`))\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tdescription: \"All required slots must be implemented.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"dom:ready\", (event: DOMReadyEvent) => {\n\t\t\tconst doc = event.document;\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-deprecated -- need to\n\t\t\t * use this for backwards compatibility until support for v7 is dropped */\n\t\t\tdoc.visitDepthFirst((node: HtmlElement) => {\n\t\t\t\t/* ignore rule if element has no meta or meta does not specify available slots */\n\t\t\t\tconst meta = node.meta;\n\t\t\t\tif (!meta?.requiredSlots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validateSlots(node, meta.requiredSlots);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate validateSlots(node: HtmlElement, requiredSlots: string[]): void {\n\t\tconst usedSlots = findUsedSlots(node);\n\t\tconst required = new Set(requiredSlots);\n\t\tconst used = new Set(usedSlots.keys());\n\t\tconst diff = difference(required, used);\n\n\t\tfor (const missing of diff) {\n\t\t\tconst context: Context = {\n\t\t\t\telement: node.tagName,\n\t\t\t\tslot: missing,\n\t\t\t\trequired: requiredSlots,\n\t\t\t};\n\t\t\tthis.report(\n\t\t\t\tnode,\n\t\t\t\t`<${node.tagName}> component requires slot \"${missing}\" to be implemented`,\n\t\t\t\tnull,\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}\n\t}\n}\n", "import { AvailableSlots } from \"./available-slots\";\nimport { PreferSlotShorthand } from \"./prefer-slot-shorthand\";\nimport { RequiredSlots } from \"./required-slots\";\n\nconst rules = {\n\t\"vue/available-slots\": AvailableSlots,\n\t\"vue/prefer-slot-shorthand\": PreferSlotShorthand,\n\t\"vue/required-slots\": RequiredSlots,\n};\n\nexport default rules;\n", "import { DynamicValue, type AttributeData } from \"html-validate\";\n\nexport function* processAttribute(attr: AttributeData): Iterable<AttributeData> {\n\t/* always yield original attribute */\n\tyield attr;\n\n\t/* setup :foo and v-bind:foo alias */\n\tconst bind = /^(?:v-bind)?:(.*)$/.exec(attr.key);\n\tif (bind) {\n\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if bind matches [1] will exist */\n\t\tconst key = bind[1]!;\n\t\tyield {\n\t\t\t...attr,\n\t\t\tkey,\n\t\t\tvalue: new DynamicValue(attr.value ? String(attr.value) : \"\"),\n\t\t\toriginalAttribute: attr.key,\n\t\t};\n\t}\n}\n", "import {\n\tDynamicValue,\n\ttype HtmlElement,\n\ttype MetaElement,\n\ttype ProcessElementContext,\n} from \"html-validate\";\nimport { findSlotAttribute } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\texport interface MetaData {\n\t\tcomponent?: string;\n\t}\n}\n\nfunction isBound(node: HtmlElement): boolean {\n\treturn node.hasAttribute(\"v-html\");\n}\n\nfunction isSlot(node: HtmlElement): boolean {\n\treturn node.is(\"slot\");\n}\n\nfunction loadSlotMeta(context: ProcessElementContext, slotname: string, node: HtmlElement): void {\n\tconst parent = node.parent;\n\tif (!parent) {\n\t\treturn;\n\t}\n\n\t/* Generate a new virtual tagname to load meta element from */\n\tconst getMetaFor = (tagName: string): MetaElement | null => {\n\t\tconst meta = context.getMetaFor(tagName);\n\t\treturn meta && meta.tagName !== \"*\" ? meta : null;\n\t};\n\tconst key = `${parent.tagName}#${slotname}`;\n\tconst fallbackKey = `${parent.tagName}:${slotname}`;\n\tconst meta = getMetaFor(key) ?? getMetaFor(fallbackKey);\n\tif (!meta) {\n\t\treturn;\n\t}\n\n\tnode.loadMeta(meta);\n\n\t/* add an annotation so error messages will be more understandable */\n\tnode.setAnnotation(`slot \"${slotname}\" (<${parent.tagName}>)`);\n}\n\n/**\n * Handle <component> or a component with a slot wrapped in it.\n */\nfunction loadComponentMeta(\n\tcontext: ProcessElementContext,\n\tnode: HtmlElement,\n\tcomponent: string,\n): void {\n\tlet src: HtmlElement = node;\n\n\t/* if this is a slot with wrapped in a <component> we fetch attributes from\n\t * the parent element, i.e. the actual component */\n\tif (node.tagName === \"template\" && src.parent) {\n\t\tsrc = src.parent;\n\t}\n\n\t/* try to fetch the attribute containing the element to use */\n\tconst attr = src.getAttribute(component);\n\tif (!attr || attr.isDynamic) {\n\t\treturn;\n\t}\n\n\t/* use the attribute value to lookup new metadata based on the tagname */\n\tconst tagName = attr.value as string;\n\tconst meta = context.getMetaFor(tagName);\n\tif (!meta || meta.tagName === \"*\") {\n\t\treturn;\n\t}\n\n\tnode.loadMeta(meta);\n\n\t/* update or add new annotation so error messages will be more descriptive */\n\tif (node.isSameNode(src)) {\n\t\tnode.setAnnotation(`<${meta.tagName}> (<${node.tagName}>)`);\n\t} else {\n\t\tconst name = node.annotatedName.replace(\"(<\", `(<${meta.tagName}> via <`);\n\t\tnode.setAnnotation(name);\n\t}\n}\n\nexport function processElement(this: ProcessElementContext, node: HtmlElement): void {\n\tconst slot = findSlotAttribute(node);\n\n\t/* If this element is a slot we load new metadata properties onto the element\n\t * to support adding properties directly to slots, e.g. to allow/disallow\n\t * content in the slot. */\n\tif (slot) {\n\t\tconst [slotname] = slot;\n\t\tloadSlotMeta(this, slotname, node);\n\t}\n\n\t/* handle usage of <component>, either directly or inside a component */\n\tif (node.meta?.component) {\n\t\tloadComponentMeta(this, node, node.meta.component);\n\t}\n\n\t/* Since html-validate v9.5.4 `<template>` tags are generally ignored when\n\t * checking descendants but since v9.6.1 the checks are enabled if this flag\n\t * is disabled. This is a needed both for `<template #slot>` and when using\n\t * `<template>` inside a Vue SFC where the element is transparent instead of\n\t * acting as a `HTMLTemplateElement`. */\n\tif (node.is(\"template\") && node.meta) {\n\t\tnode.meta.templateRoot = false;\n\t}\n\n\t/* Mark as having dynamic text if the element either content bound via v-html\n\t * or if it is a slot. This is needed for rules with requires textual content,\n\t * e.g a heading cannot be empty. */\n\tif (isBound(node) || isSlot(node)) {\n\t\tnode.appendText(new DynamicValue(\"\"), node.location);\n\t}\n}\n", "import { type Source } from \"html-validate\";\nimport { processAttribute, processElement } from \"../hooks\";\n\n/**\n * Transform a regular HTML file. In practice this only applies hooks without\n * any extraction.\n */\nexport function* transformHTML(source: Source): Iterable<Source> {\n\tyield {\n\t\t...source,\n\t\thooks: {\n\t\t\tprocessAttribute,\n\t\t\tprocessElement,\n\t\t},\n\t};\n}\n\ntransformHTML.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { TemplateExtractor } from \"@html-validate/plugin-utils\";\nimport { processAttribute, processElement } from \"../hooks\";\n\n/**\n * Match template property in `Vue.component` call\n */\nexport function transformJS(source: Source): Iterable<Source> {\n\tconst te = TemplateExtractor.fromString(source.data, source.filename);\n\treturn Array.from(te.extractObjectProperty(\"template\"), (cur) => {\n\t\tcur.originalData = source.originalData ?? source.data;\n\t\tcur.hooks = {\n\t\t\tprocessAttribute,\n\t\t\tprocessElement,\n\t\t};\n\t\treturn cur;\n\t});\n}\n\ntransformJS.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { processAttribute, processElement } from \"../hooks\";\nimport { stripTemplating } from \"../utils\";\n\nfunction findLocation(source: string, index: number, preamble: number): [number, number] {\n\tlet line = 1;\n\tlet prev = 0;\n\tlet pos = source.indexOf(\"\\n\");\n\twhile (pos !== -1) {\n\t\tif (pos > index) {\n\t\t\treturn [line, index - prev + preamble + 1];\n\t\t}\n\t\tline++;\n\t\tprev = pos;\n\t\tpos = source.indexOf(\"\\n\", pos + 1);\n\t}\n\treturn [line, 1];\n}\n\nfunction computeIndent(text: string): string {\n\tconst lines = text.split(\"\\n\");\n\tconst initial = null as string | null;\n\tconst common = lines.reduce((common, line) => {\n\t\tconst match = /^(\\s*)\\S/.exec(line);\n\t\tif (match) {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if match matches [1] will exist */\n\t\t\tconst indent = match[1]!;\n\t\t\treturn common === null || indent.length < common.length ? indent : common;\n\t\t} else {\n\t\t\treturn common;\n\t\t}\n\t}, initial);\n\treturn common ?? \"\";\n}\n\n/**\n * Match templates from SFC <template> tag\n */\nexport function* transformSFC(source: Source): Iterable<Source> {\n\tconst indent = computeIndent(source.data);\n\t/* eslint-disable-next-line security/detect-non-literal-regexp -- will only contain whitespace */\n\tconst sfc = new RegExp(`^${indent}(<template([^>]*)>)([^]*?)^${indent}(</template>)`, \"gm\");\n\tlet match: RegExpExecArray | null;\n\twhile ((match = sfc.exec(source.data)) !== null) {\n\t\tconst attr = match[2] ?? \"\";\n\t\tconst data = `${match[1]!}${match[3]!}${match[4]!}`; // eslint-disable-line @typescript-eslint/no-non-null-assertion -- groups exists when regex matches\n\t\tif (!/lang=\".*?\"/.exec(attr)) {\n\t\t\tconst [line, column] = findLocation(source.data, match.index, 0);\n\t\t\tyield {\n\t\t\t\tdata: stripTemplating(data),\n\t\t\t\tfilename: source.filename,\n\t\t\t\tline: line + (source.line - 1),\n\t\t\t\tcolumn: column + (source.column - 1),\n\t\t\t\toffset: match.index + source.offset,\n\t\t\t\toriginalData: source.originalData ?? source.data,\n\t\t\t\thooks: {\n\t\t\t\t\tprocessAttribute,\n\t\t\t\t\tprocessElement,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n}\n\ntransformSFC.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { transformHTML } from \"./html.transform\";\nimport { transformJS } from \"./js.transform\";\nimport { transformSFC } from \"./sfc.transform\";\n\n/**\n * Returns true if the source is considered a SFC component\n */\nfunction isVue(source: Source): boolean {\n\treturn !!/\\.vue$/i.exec(source.filename);\n}\n\n/**\n * Returns true if the source is considered javascript\n */\nfunction isJavascript(source: Source): boolean {\n\treturn !!/\\.(jsx?|tsx?)$/i.exec(source.filename);\n}\n\nexport function* autodetect(source: Source): Iterable<Source> {\n\tif (isVue(source)) {\n\t\tyield* transformSFC(source);\n\t} else if (isJavascript(source)) {\n\t\tyield* transformJS(source);\n\t} else {\n\t\tyield* transformHTML(source);\n\t}\n}\n\nautodetect.api = 1;\n", "import { type Transformer } from \"html-validate\";\nimport { autodetect } from \"./auto.transform\";\nimport { transformHTML } from \"./html.transform\";\nimport { transformJS } from \"./js.transform\";\nimport { transformSFC } from \"./sfc.transform\";\n\nconst transformer: Record<string, Transformer> = {\n\tdefault: autodetect,\n\tauto: autodetect,\n\tjs: transformJS,\n\tsfc: transformSFC,\n\thtml: transformHTML,\n};\n\nexport default transformer;\n", "{\n \"properties\": {\n \"component\": {\n \"type\": \"string\",\n \"copyable\": true\n },\n \"requiredSlots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"slots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n}\n", "/* istanbul ignore file */\n\nimport plugin from \"./index\";\n\nexport = plugin;\n"],
5
+ "mappings": ";;;AAAA,IAAAA,wBAAgD;;;ACC9C,WAAQ;AAgGR,uBAAoB;AAAA,EAClB,iBAAiB;AACnB;;;ACnGF,2BAA+B;AAE/B,IAAO,uBAAQ,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AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAO,cAAQ;;;AmBdf,iBAAS;",
6
+ "names": ["import_html_validate", "import_html_validate", "import_html_validate", "import_html_validate", "difference", "import_html_validate", "import_html_validate", "meta", "name", "common"]
7
7
  }
@@ -7,8 +7,9 @@ var peerDependencies = {
7
7
  "html-validate": "^8.10.0 || ^9.0.0"
8
8
  };
9
9
 
10
- // elements.json
11
- var elements_default = {
10
+ // src/elements.ts
11
+ import { defineMetadata } from "html-validate";
12
+ var elements_default = defineMetadata({
12
13
  component: {
13
14
  flow: true,
14
15
  phrasing: true,
@@ -64,7 +65,7 @@ var elements_default = {
64
65
  transparent: true,
65
66
  component: "tag"
66
67
  }
67
- };
68
+ });
68
69
 
69
70
  // src/configs/recommended.ts
70
71
  function createConfig() {
@@ -387,6 +388,9 @@ function processElement(node) {
387
388
  if (node.meta?.component) {
388
389
  loadComponentMeta(this, node, node.meta.component);
389
390
  }
391
+ if (node.is("template") && node.meta) {
392
+ node.meta.templateRoot = false;
393
+ }
390
394
  if (isBound(node) || isSlot(node)) {
391
395
  node.appendText(new DynamicValue3(""), node.location);
392
396
  }
@@ -450,20 +454,19 @@ function computeIndent(text) {
450
454
  }
451
455
  function* transformSFC(source) {
452
456
  const indent = computeIndent(source.data);
453
- const sfc = new RegExp(`^${indent}(<template([^>]*)>)([^]*?)^${indent}</template>`, "gm");
457
+ const sfc = new RegExp(`^${indent}(<template([^>]*)>)([^]*?)^${indent}(</template>)`, "gm");
454
458
  let match;
455
459
  while ((match = sfc.exec(source.data)) !== null) {
456
- const preamble = match[1] ?? "";
457
460
  const attr = match[2] ?? "";
458
- const data = match[3] ?? "";
461
+ const data = `${match[1]}${match[3]}${match[4]}`;
459
462
  if (!/lang=".*?"/.exec(attr)) {
460
- const [line, column] = findLocation(source.data, match.index, preamble.length);
463
+ const [line, column] = findLocation(source.data, match.index, 0);
461
464
  yield {
462
465
  data: stripTemplating(data),
463
466
  filename: source.filename,
464
467
  line: line + (source.line - 1),
465
468
  column: column + (source.column - 1),
466
- offset: match.index + (source.offset || 0) + preamble.length,
469
+ offset: match.index + source.offset,
467
470
  originalData: source.originalData ?? source.data,
468
471
  hooks: {
469
472
  processAttribute,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts", "../../package.json", "../../elements.json", "../../src/configs/recommended.ts", "../../src/configs/index.ts", "../../src/rules/available-slots.ts", "../../src/utils/strip-templating.ts", "../../src/utils/slots.ts", "../../src/rules/prefer-slot-shorthand.ts", "../../src/rules/required-slots.ts", "../../src/rules/index.ts", "../../src/hooks/attribute.ts", "../../src/hooks/element.ts", "../../src/transform/html.transform.ts", "../../src/transform/js.transform.ts", "../../src/transform/sfc.transform.ts", "../../src/transform/auto.transform.ts", "../../src/transform/index.ts", "../../src/schema.json", "../../src/entry-esm.ts"],
4
- "sourcesContent": ["import { type Plugin, compatibilityCheck } from \"html-validate\";\nimport { name, peerDependencies } from \"../package.json\";\nimport configs from \"./configs\";\nimport rules from \"./rules\";\nimport transformer from \"./transform\";\nimport elementSchema from \"./schema.json\";\n\nconst range = peerDependencies[\"html-validate\"];\ncompatibilityCheck(name, range);\n\nconst plugin: Plugin = {\n\tname,\n\tconfigs,\n\trules,\n\ttransformer,\n\telementSchema,\n};\n\nexport default plugin;\n", "{\n \"name\": \"html-validate-vue\",\n \"version\": \"7.1.6\",\n \"description\": \"vue transform for html-validate\",\n \"keywords\": [\n \"html\",\n \"lint\",\n \"html-validate\",\n \"vue\"\n ],\n \"homepage\": \"https://html-validate.org/frameworks/vue.html\",\n \"bugs\": {\n \"url\": \"https://gitlab.com/html-validate/html-validate-vue/issues/new\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://gitlab.com/html-validate/html-validate-vue.git\"\n },\n \"license\": \"MIT\",\n \"author\": \"David Sveningsson <ext@sidvind.com>\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/esm/index.d.mts\",\n \"default\": \"./dist/esm/index.mjs\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/index.d.cts\",\n \"default\": \"./dist/cjs/index.cjs\"\n }\n }\n },\n \"main\": \"dist/cjs/index.cjs\",\n \"module\": \"dist/esm/index.mjs\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"prebuild\": \"tsc\",\n \"build\": \"run-s build:*\",\n \"build:lib\": \"node build.mjs\",\n \"build:cjs\": \"dts-bundle-generator --no-banner --project tsconfig.cjs.json -o dist/cjs/index.d.cts src/entry-cjs.ts\",\n \"build:esm\": \"dts-bundle-generator --no-banner --project tsconfig.esm.json -o dist/esm/index.d.mts src/entry-esm.ts\",\n \"eslint\": \"eslint --cache .\",\n \"eslint:fix\": \"eslint --cache --fix .\",\n \"prepack\": \"release-prepack package.json --bundle\",\n \"postpack\": \"release-postpack package.json\",\n \"prepare\": \"husky\",\n \"prepublishOnly\": \"release-prepack package.json --bundle\",\n \"prettier:check\": \"prettier --check .\",\n \"prettier:write\": \"prettier --write .\",\n \"postpublish\": \"release-postpack package.json\",\n \"attw\": \"attw --no-emoji --pack .\",\n \"test\": \"jest\"\n },\n \"commitlint\": {\n \"extends\": \"@html-validate\"\n },\n \"prettier\": \"@html-validate/prettier-config\",\n \"release\": {\n \"extends\": \"@html-validate/semantic-release-config\"\n },\n \"jest\": {\n \"preset\": \"@html-validate/jest-config\"\n },\n \"dependencies\": {\n \"@html-validate/plugin-utils\": \"2.0.3\",\n \"semver\": \"7.7.2\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"0.18.1\",\n \"@html-validate/commitlint-config\": \"3.4.4\",\n \"@html-validate/eslint-config\": \"6.3.0\",\n \"@html-validate/eslint-config-jest\": \"6.3.0\",\n \"@html-validate/eslint-config-typescript\": \"6.3.0\",\n \"@html-validate/eslint-config-typescript-typeinfo\": \"6.3.0\",\n \"@html-validate/jest-config\": \"3.12.1\",\n \"@html-validate/prettier-config\": \"3.0.1\",\n \"@html-validate/release-scripts\": \"6.8.4\",\n \"@tsconfig/node18\": \"18.2.4\",\n \"@tsconfig/strictest\": \"2.0.5\",\n \"@types/estree\": \"1.0.7\",\n \"@types/glob\": \"8.1.0\",\n \"@types/jest\": \"29.5.14\",\n \"@types/node\": \"18.19.103\",\n \"@types/semver\": \"7.7.0\",\n \"dts-bundle-generator\": \"9.5.1\",\n \"esbuild\": \"0.25.4\",\n \"html-validate\": \"9.5.4\",\n \"husky\": \"9.1.7\",\n \"jest\": \"29.7.0\",\n \"jest-environment-jsdom\": \"29.7.0\",\n \"npm-pkg-lint\": \"3.10.12\",\n \"npm-run-all2\": \"8.0.3\",\n \"ts-jest\": \"29.3.4\",\n \"typescript\": \"5.8.3\"\n },\n \"peerDependencies\": {\n \"html-validate\": \"^8.10.0 || ^9.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18.0\"\n },\n \"externalDependencies\": [\n \"@html-validate/plugin-utils\"\n ]\n}\n", "{\n \"component\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true,\n \"component\": \"is\",\n \"requiredAttributes\": [\"is\"]\n },\n\n \"keep-alive\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true\n },\n\n \"portal\": {\n \"deprecated\": {\n \"source\": \"vue\",\n \"message\": \"the <portal> element has been renamed to <teleport>\",\n \"documentation\": \"The `<portal>` element has been renamed to `<teleport>`\"\n }\n },\n\n \"router-link\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true\n },\n\n \"router-view\": {\n \"flow\": true,\n \"slots\": [\"default\"]\n },\n\n \"slot\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true,\n \"scriptSupporting\": true\n },\n\n \"suspense\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true,\n \"slots\": [\"default\", \"fallback\"]\n },\n\n \"teleport\": {\n \"flow\": true,\n \"phrasing\": true\n },\n\n \"transition\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true\n },\n\n \"transition-group\": {\n \"flow\": true,\n \"phrasing\": true,\n \"transparent\": true,\n \"component\": \"tag\"\n }\n}\n", "import { type ConfigData } from \"html-validate\";\nimport vueElements from \"../../elements.json\";\n\nexport function createConfig(): ConfigData {\n\tconst config: ConfigData = {\n\t\telements: [vueElements],\n\t\trules: {\n\t\t\t/* vue modifiers often use camelcase so allow by default */\n\t\t\t\"attr-case\": [\"error\", { style: \"camelcase\" }],\n\n\t\t\t/* self closing tags often used in vue code so allow by default*/\n\t\t\t\"void-style\": [\"error\", { style: \"selfclose\" }],\n\t\t\t\"no-self-closing\": \"off\",\n\n\t\t\t/* enable rules from this plugin */\n\t\t\t\"vue/available-slots\": \"error\",\n\t\t\t\"vue/prefer-slot-shorthand\": \"error\",\n\t\t\t\"vue/required-slots\": \"error\",\n\t\t},\n\t};\n\n\treturn config;\n}\n\nexport default createConfig();\n", "import recommended from \"./recommended\";\n\nexport default {\n\trecommended,\n};\n", "import { type HtmlElement, Rule, type RuleDocumentation, type DOMReadyEvent } from \"html-validate\";\nimport { findUsedSlots } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\tinterface MetaElement {\n\t\tslots?: string[];\n\t}\n}\n\ninterface Context {\n\telement: string;\n\tslot: string;\n\tavailable: string[];\n}\n\nfunction difference<T>(a: Set<T>, b: Set<T>): Set<T> {\n\tconst result = new Set(a);\n\tfor (const elem of b) {\n\t\tresult.delete(elem);\n\t}\n\treturn result;\n}\n\nexport class AvailableSlots extends Rule<Context> {\n\tpublic override documentation(context?: Context): RuleDocumentation {\n\t\tif (context) {\n\t\t\treturn {\n\t\t\t\tdescription: [\n\t\t\t\t\t`The <${context.element}> component does not have a slot named \"${context.slot}\". Only known slots can be specified.`,\n\t\t\t\t\t\"\",\n\t\t\t\t\t\"The following slots are available\",\n\t\t\t\t]\n\t\t\t\t\t.concat(context.available.map((slot) => `- ${slot}`))\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tdescription: \"Only known slots can be specified.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"dom:ready\", (event: DOMReadyEvent) => {\n\t\t\tconst doc = event.document;\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-deprecated -- need to\n\t\t\t * use this for backwards compatibility until support for v7 is dropped */\n\t\t\tdoc.visitDepthFirst((node: HtmlElement) => {\n\t\t\t\t/* ignore rule if element has no meta or meta does not specify available slots */\n\t\t\t\tconst meta = node.meta;\n\t\t\t\tif (!meta?.slots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validateSlots(node, meta.slots);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate validateSlots(node: HtmlElement, slots: string[]): void {\n\t\tconst usedSlots = findUsedSlots(node);\n\t\tconst available = new Set(slots);\n\t\tconst used = new Set(usedSlots.keys());\n\t\tconst diff = difference(used, available);\n\n\t\tfor (const missing of diff) {\n\t\t\tconst context: Context = {\n\t\t\t\telement: node.tagName,\n\t\t\t\tslot: missing,\n\t\t\t\tavailable: slots,\n\t\t\t};\n\t\t\tthis.report(\n\t\t\t\tnode,\n\t\t\t\t`<${node.tagName}> component has no slot \"${missing}\"`,\n\t\t\t\tusedSlots.get(missing),\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}\n\t}\n}\n", "/**\n * Strip anything inside `{{ .. }}` in case it contains anything that looks like\n * markup, i.e. it will be ignored\n */\nexport function stripTemplating(str: string): string {\n\t/* eslint-disable-next-line sonarjs/slow-regex -- technical debt, should refactor */\n\treturn str.replace(/{{(.*?)}}/g, (_, m: string) => {\n\t\tconst filler = \" \".repeat(m.length);\n\t\treturn `{{${filler}}}`;\n\t});\n}\n", "import { type HtmlElement, type Location } from \"html-validate\";\n\nconst slotAttr = /(?:v-slot:|#)([^[]+)/;\n\nfunction haveSlot(value: [string, Location] | null): value is [string, Location] {\n\treturn value !== null;\n}\n\n/**\n * Search all children for slots and return both slot names and locations.\n */\nexport function findUsedSlots(node: HtmlElement): Map<string, Location> {\n\tconst template = node.querySelectorAll(\">template, >[slot]\");\n\tconst slots = template.map((child) => findSlotAttribute(child)).filter(haveSlot);\n\tconst initial = new Map<string, Location>();\n\treturn slots.reduce((result: Map<string, Location>, [key, val]) => {\n\t\tresult.set(key, val);\n\t\treturn result;\n\t}, initial);\n}\n\n/**\n * Find the name of the slot and its location used by an element. Searches\n * both v-slot:foo and slot=\"foo\".\n */\nexport function findSlotAttribute(node: HtmlElement): [string, Location] | null {\n\tfor (const attr of node.attributes) {\n\t\t/* find v-slot directive */\n\t\tconst match = slotAttr.exec(attr.key);\n\t\tif (match) {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if slot matches [1] will exist */\n\t\t\tconst slot = match[1]!;\n\t\t\treturn [slot, attr.keyLocation];\n\t\t}\n\n\t\t/* find deprecated slot attribute */\n\t\tif (attr.key === \"slot\" && typeof attr.value === \"string\") {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- valueLocation will always be set the value is present */\n\t\t\treturn [attr.value.toString(), attr.valueLocation!];\n\t\t}\n\t}\n\treturn null;\n}\n", "import { Rule, type RuleDocumentation, type AttributeEvent, DynamicValue } from \"html-validate\";\n\ninterface RuleContext {\n\tslot: string;\n}\n\nconst prefix = \"v-slot:\";\n\nfunction isVSlot(attr: string): string | null {\n\tif (!attr.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tif (attr.length <= prefix.length) {\n\t\treturn null;\n\t}\n\tconst slot = attr.slice(prefix.length);\n\tif (/^\\[.*\\]$/.exec(slot)) {\n\t\treturn null;\n\t}\n\treturn slot;\n}\n\nfunction isDeprecatedSlot(attr: string, value: null | string | DynamicValue): string | null {\n\tif (attr !== \"slot\") {\n\t\treturn null;\n\t}\n\tif (value instanceof DynamicValue) {\n\t\treturn null;\n\t}\n\tif (value === null || value === \"\") {\n\t\treturn null;\n\t}\n\treturn value.toString();\n}\n\nexport class PreferSlotShorthand extends Rule<RuleContext> {\n\tpublic override documentation(context?: RuleContext): RuleDocumentation {\n\t\tconst slot = context?.slot ?? \"my-slot\";\n\t\treturn {\n\t\t\tdescription: [\n\t\t\t\t`Prefer to use \\`#${slot}\\` over \\`v-slot:${slot}\\`.`,\n\t\t\t\t\"\",\n\t\t\t\t\"Vue.js supports a shorthand syntax for slots using `#` instead of `v-slot:` or the deprecated `slot` attribute, e.g. using `#header` instead of `v-slot:header`.\",\n\t\t\t].join(\"\\n\"),\n\t\t};\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"attr\", (event: AttributeEvent) => {\n\t\t\tconst { key: attr, value, target, keyLocation: location } = event;\n\n\t\t\tlet slot: string | null;\n\n\t\t\t/* handle v-slot:xyz */\n\t\t\tslot = isVSlot(attr);\n\t\t\tif (slot) {\n\t\t\t\tconst context: RuleContext = { slot };\n\t\t\t\tconst message = `Prefer to use #${slot} over ${attr}`;\n\t\t\t\tthis.report(target, message, location, context);\n\t\t\t}\n\n\t\t\t/* handle slot=\"xyz\" */\n\t\t\tslot = isDeprecatedSlot(attr, value);\n\t\t\tif (slot) {\n\t\t\t\tconst context: RuleContext = { slot };\n\t\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- value is checked by isDeprecatedSlot */\n\t\t\t\tconst message = `Prefer to use #${slot} over ${attr}=\"${value!.toString()}\"`;\n\t\t\t\tthis.report(target, message, location, context);\n\t\t\t}\n\t\t});\n\t}\n}\n", "import { type DOMReadyEvent, type HtmlElement, type RuleDocumentation, Rule } from \"html-validate\";\nimport { findUsedSlots } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\tinterface MetaElement {\n\t\trequiredSlots?: string[];\n\t}\n}\n\ninterface Context {\n\telement: string;\n\tslot: string;\n\trequired: string[];\n}\n\nfunction difference<T>(a: Set<T>, b: Set<T>): Set<T> {\n\tconst result = new Set(a);\n\tfor (const elem of b) {\n\t\tresult.delete(elem);\n\t}\n\treturn result;\n}\n\nexport class RequiredSlots extends Rule<Context> {\n\tpublic override documentation(context?: Context): RuleDocumentation {\n\t\tif (context) {\n\t\t\treturn {\n\t\t\t\tdescription: [\n\t\t\t\t\t`The <${context.element}> component requires slot \"${context.slot}\" to be implemented. Add \\`<template v-slot:${context.slot}>\\``,\n\t\t\t\t\t\"\",\n\t\t\t\t\t\"The following slots are required\",\n\t\t\t\t]\n\t\t\t\t\t.concat(context.required.map((slot) => `- ${slot}`))\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tdescription: \"All required slots must be implemented.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"dom:ready\", (event: DOMReadyEvent) => {\n\t\t\tconst doc = event.document;\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-deprecated -- need to\n\t\t\t * use this for backwards compatibility until support for v7 is dropped */\n\t\t\tdoc.visitDepthFirst((node: HtmlElement) => {\n\t\t\t\t/* ignore rule if element has no meta or meta does not specify available slots */\n\t\t\t\tconst meta = node.meta;\n\t\t\t\tif (!meta?.requiredSlots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validateSlots(node, meta.requiredSlots);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate validateSlots(node: HtmlElement, requiredSlots: string[]): void {\n\t\tconst usedSlots = findUsedSlots(node);\n\t\tconst required = new Set(requiredSlots);\n\t\tconst used = new Set(usedSlots.keys());\n\t\tconst diff = difference(required, used);\n\n\t\tfor (const missing of diff) {\n\t\t\tconst context: Context = {\n\t\t\t\telement: node.tagName,\n\t\t\t\tslot: missing,\n\t\t\t\trequired: requiredSlots,\n\t\t\t};\n\t\t\tthis.report(\n\t\t\t\tnode,\n\t\t\t\t`<${node.tagName}> component requires slot \"${missing}\" to be implemented`,\n\t\t\t\tnull,\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}\n\t}\n}\n", "import { AvailableSlots } from \"./available-slots\";\nimport { PreferSlotShorthand } from \"./prefer-slot-shorthand\";\nimport { RequiredSlots } from \"./required-slots\";\n\nconst rules = {\n\t\"vue/available-slots\": AvailableSlots,\n\t\"vue/prefer-slot-shorthand\": PreferSlotShorthand,\n\t\"vue/required-slots\": RequiredSlots,\n};\n\nexport default rules;\n", "import { DynamicValue, type AttributeData } from \"html-validate\";\n\nexport function* processAttribute(attr: AttributeData): Iterable<AttributeData> {\n\t/* always yield original attribute */\n\tyield attr;\n\n\t/* setup :foo and v-bind:foo alias */\n\tconst bind = /^(?:v-bind)?:(.*)$/.exec(attr.key);\n\tif (bind) {\n\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if bind matches [1] will exist */\n\t\tconst key = bind[1]!;\n\t\tyield {\n\t\t\t...attr,\n\t\t\tkey,\n\t\t\tvalue: new DynamicValue(attr.value ? String(attr.value) : \"\"),\n\t\t\toriginalAttribute: attr.key,\n\t\t};\n\t}\n}\n", "import {\n\tDynamicValue,\n\ttype HtmlElement,\n\ttype MetaElement,\n\ttype ProcessElementContext,\n} from \"html-validate\";\nimport { findSlotAttribute } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\texport interface MetaData {\n\t\tcomponent?: string;\n\t}\n}\n\nfunction isBound(node: HtmlElement): boolean {\n\treturn node.hasAttribute(\"v-html\");\n}\n\nfunction isSlot(node: HtmlElement): boolean {\n\treturn node.is(\"slot\");\n}\n\nfunction loadSlotMeta(context: ProcessElementContext, slotname: string, node: HtmlElement): void {\n\tconst parent = node.parent;\n\tif (!parent) {\n\t\treturn;\n\t}\n\n\t/* Generate a new virtual tagname to load meta element from */\n\tconst getMetaFor = (tagName: string): MetaElement | null => {\n\t\tconst meta = context.getMetaFor(tagName);\n\t\treturn meta && meta.tagName !== \"*\" ? meta : null;\n\t};\n\tconst key = `${parent.tagName}#${slotname}`;\n\tconst fallbackKey = `${parent.tagName}:${slotname}`;\n\tconst meta = getMetaFor(key) ?? getMetaFor(fallbackKey);\n\tif (!meta) {\n\t\treturn;\n\t}\n\n\tnode.loadMeta(meta);\n\n\t/* add an annotation so error messages will be more understandable */\n\tnode.setAnnotation(`slot \"${slotname}\" (<${parent.tagName}>)`);\n}\n\n/**\n * Handle <component> or a component with a slot wrapped in it.\n */\nfunction loadComponentMeta(\n\tcontext: ProcessElementContext,\n\tnode: HtmlElement,\n\tcomponent: string,\n): void {\n\tlet src: HtmlElement = node;\n\n\t/* if this is a slot with wrapped in a <component> we fetch attributes from\n\t * the parent element, i.e. the actual component */\n\tif (node.tagName === \"template\" && src.parent) {\n\t\tsrc = src.parent;\n\t}\n\n\t/* try to fetch the attribute containing the element to use */\n\tconst attr = src.getAttribute(component);\n\tif (!attr || attr.isDynamic) {\n\t\treturn;\n\t}\n\n\t/* use the attribute value to lookup new metadata based on the tagname */\n\tconst tagName = attr.value as string;\n\tconst meta = context.getMetaFor(tagName);\n\tif (!meta || meta.tagName === \"*\") {\n\t\treturn;\n\t}\n\n\tnode.loadMeta(meta);\n\n\t/* update or add new annotation so error messages will be more descriptive */\n\tif (node.isSameNode(src)) {\n\t\tnode.setAnnotation(`<${meta.tagName}> (<${node.tagName}>)`);\n\t} else {\n\t\tconst name = node.annotatedName.replace(\"(<\", `(<${meta.tagName}> via <`);\n\t\tnode.setAnnotation(name);\n\t}\n}\n\nexport function processElement(this: ProcessElementContext, node: HtmlElement): void {\n\tconst slot = findSlotAttribute(node);\n\n\t/* If this element is a slot we load new metadata properties onto the element\n\t * to support adding properties directly to slots, e.g. to allow/disallow\n\t * content in the slot. */\n\tif (slot) {\n\t\tconst [slotname] = slot;\n\t\tloadSlotMeta(this, slotname, node);\n\t}\n\n\t/* handle usage of <component>, either directly or inside a component */\n\tif (node.meta?.component) {\n\t\tloadComponentMeta(this, node, node.meta.component);\n\t}\n\n\t/* Mark as having dynamic text if the element either content bound via v-html\n\t * or if it is a slot. This is needed for rules with requires textual content,\n\t * e.g a heading cannot be empty. */\n\tif (isBound(node) || isSlot(node)) {\n\t\tnode.appendText(new DynamicValue(\"\"), node.location);\n\t}\n}\n", "import { type Source } from \"html-validate\";\nimport { processAttribute, processElement } from \"../hooks\";\n\n/**\n * Transform a regular HTML file. In practice this only applies hooks without\n * any extraction.\n */\nexport function* transformHTML(source: Source): Iterable<Source> {\n\tyield {\n\t\t...source,\n\t\thooks: {\n\t\t\tprocessAttribute,\n\t\t\tprocessElement,\n\t\t},\n\t};\n}\n\ntransformHTML.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { TemplateExtractor } from \"@html-validate/plugin-utils\";\nimport { processAttribute, processElement } from \"../hooks\";\n\n/**\n * Match template property in `Vue.component` call\n */\nexport function transformJS(source: Source): Iterable<Source> {\n\tconst te = TemplateExtractor.fromString(source.data, source.filename);\n\treturn Array.from(te.extractObjectProperty(\"template\"), (cur) => {\n\t\tcur.originalData = source.originalData ?? source.data;\n\t\tcur.hooks = {\n\t\t\tprocessAttribute,\n\t\t\tprocessElement,\n\t\t};\n\t\treturn cur;\n\t});\n}\n\ntransformJS.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { processAttribute, processElement } from \"../hooks\";\nimport { stripTemplating } from \"../utils\";\n\nfunction findLocation(source: string, index: number, preamble: number): [number, number] {\n\tlet line = 1;\n\tlet prev = 0;\n\tlet pos = source.indexOf(\"\\n\");\n\twhile (pos !== -1) {\n\t\tif (pos > index) {\n\t\t\treturn [line, index - prev + preamble + 1];\n\t\t}\n\t\tline++;\n\t\tprev = pos;\n\t\tpos = source.indexOf(\"\\n\", pos + 1);\n\t}\n\treturn [line, 1];\n}\n\nfunction computeIndent(text: string): string {\n\tconst lines = text.split(\"\\n\");\n\tconst initial = null as string | null;\n\tconst common = lines.reduce((common, line) => {\n\t\tconst match = /^(\\s*)\\S/.exec(line);\n\t\tif (match) {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if match matches [1] will exist */\n\t\t\tconst indent = match[1]!;\n\t\t\treturn common === null || indent.length < common.length ? indent : common;\n\t\t} else {\n\t\t\treturn common;\n\t\t}\n\t}, initial);\n\treturn common ?? \"\";\n}\n\n/**\n * Match templates from SFC <template> tag\n */\nexport function* transformSFC(source: Source): Iterable<Source> {\n\tconst indent = computeIndent(source.data);\n\t/* eslint-disable-next-line security/detect-non-literal-regexp -- will only contain whitespace */\n\tconst sfc = new RegExp(`^${indent}(<template([^>]*)>)([^]*?)^${indent}</template>`, \"gm\");\n\tlet match: RegExpExecArray | null;\n\twhile ((match = sfc.exec(source.data)) !== null) {\n\t\tconst preamble = match[1] ?? \"\";\n\t\tconst attr = match[2] ?? \"\";\n\t\tconst data = match[3] ?? \"\";\n\t\tif (!/lang=\".*?\"/.exec(attr)) {\n\t\t\tconst [line, column] = findLocation(source.data, match.index, preamble.length);\n\t\t\tyield {\n\t\t\t\tdata: stripTemplating(data),\n\t\t\t\tfilename: source.filename,\n\t\t\t\tline: line + (source.line - 1),\n\t\t\t\tcolumn: column + (source.column - 1),\n\t\t\t\toffset: match.index + (source.offset || 0) + preamble.length,\n\t\t\t\toriginalData: source.originalData ?? source.data,\n\t\t\t\thooks: {\n\t\t\t\t\tprocessAttribute,\n\t\t\t\t\tprocessElement,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n}\n\ntransformSFC.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { transformHTML } from \"./html.transform\";\nimport { transformJS } from \"./js.transform\";\nimport { transformSFC } from \"./sfc.transform\";\n\n/**\n * Returns true if the source is considered a SFC component\n */\nfunction isVue(source: Source): boolean {\n\treturn !!/\\.vue$/i.exec(source.filename);\n}\n\n/**\n * Returns true if the source is considered javascript\n */\nfunction isJavascript(source: Source): boolean {\n\treturn !!/\\.(jsx?|tsx?)$/i.exec(source.filename);\n}\n\nexport function* autodetect(source: Source): Iterable<Source> {\n\tif (isVue(source)) {\n\t\tyield* transformSFC(source);\n\t} else if (isJavascript(source)) {\n\t\tyield* transformJS(source);\n\t} else {\n\t\tyield* transformHTML(source);\n\t}\n}\n\nautodetect.api = 1;\n", "import { type Transformer } from \"html-validate\";\nimport { autodetect } from \"./auto.transform\";\nimport { transformHTML } from \"./html.transform\";\nimport { transformJS } from \"./js.transform\";\nimport { transformSFC } from \"./sfc.transform\";\n\nconst transformer: Record<string, Transformer> = {\n\tdefault: autodetect,\n\tauto: autodetect,\n\tjs: transformJS,\n\tsfc: transformSFC,\n\thtml: transformHTML,\n};\n\nexport default transformer;\n", "{\n \"properties\": {\n \"component\": {\n \"type\": \"string\",\n \"copyable\": true\n },\n \"requiredSlots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"slots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n}\n", "/* istanbul ignore file */\n\nimport plugin from \"./index\";\n\nexport default plugin;\n"],
5
- "mappings": ";AAAA,SAAsB,0BAA0B;;;ACC9C,WAAQ;AAgGR,uBAAoB;AAAA,EAClB,iBAAiB;AACnB;;;ACnGF;AAAA,EACE,WAAa;AAAA,IACX,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,IACf,WAAa;AAAA,IACb,oBAAsB,CAAC,IAAI;AAAA,EAC7B;AAAA,EAEA,cAAc;AAAA,IACZ,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,EACjB;AAAA,EAEA,QAAU;AAAA,IACR,YAAc;AAAA,MACZ,QAAU;AAAA,MACV,SAAW;AAAA,MACX,eAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,eAAe;AAAA,IACb,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,EACjB;AAAA,EAEA,eAAe;AAAA,IACb,MAAQ;AAAA,IACR,OAAS,CAAC,SAAS;AAAA,EACrB;AAAA,EAEA,MAAQ;AAAA,IACN,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,IACf,kBAAoB;AAAA,EACtB;AAAA,EAEA,UAAY;AAAA,IACV,MAAQ;AAAA,IACR,UAAY;AAAA,IACZ,aAAe;AAAA,IACf,OAAS,CAAC,WA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AAA,EAChD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,MAAM;AACP;AAEA,IAAO,oBAAQ;;;ACdf;AAAA,EACE,YAAc;AAAA,IACZ,WAAa;AAAA,MACX,MAAQ;AAAA,MACR,UAAY;AAAA,IACd;AAAA,IACA,eAAiB;AAAA,MACf,MAAQ;AAAA,MACR,OAAS;AAAA,QACP,MAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,OAAS;AAAA,MACP,MAAQ;AAAA,MACR,OAAS;AAAA,QACP,MAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;;;AlBZA,IAAM,QAAQ,iBAAiB,eAAe;AAC9C,mBAAmB,MAAM,KAAK;AAE9B,IAAM,SAAiB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAO,cAAQ;;;AmBdf,IAAO,oBAAQ;",
3
+ "sources": ["../../src/index.ts", "../../package.json", "../../src/elements.ts", "../../src/configs/recommended.ts", "../../src/configs/index.ts", "../../src/rules/available-slots.ts", "../../src/utils/strip-templating.ts", "../../src/utils/slots.ts", "../../src/rules/prefer-slot-shorthand.ts", "../../src/rules/required-slots.ts", "../../src/rules/index.ts", "../../src/hooks/attribute.ts", "../../src/hooks/element.ts", "../../src/transform/html.transform.ts", "../../src/transform/js.transform.ts", "../../src/transform/sfc.transform.ts", "../../src/transform/auto.transform.ts", "../../src/transform/index.ts", "../../src/schema.json", "../../src/entry-esm.ts"],
4
+ "sourcesContent": ["import { type Plugin, compatibilityCheck } from \"html-validate\";\nimport { name, peerDependencies } from \"../package.json\";\nimport configs from \"./configs\";\nimport rules from \"./rules\";\nimport transformer from \"./transform\";\nimport elementSchema from \"./schema.json\";\n\nconst range = peerDependencies[\"html-validate\"];\ncompatibilityCheck(name, range);\n\nconst plugin: Plugin = {\n\tname,\n\tconfigs,\n\trules,\n\ttransformer,\n\telementSchema,\n};\n\nexport default plugin;\n", "{\n \"name\": \"html-validate-vue\",\n \"version\": \"7.2.1\",\n \"description\": \"vue transform for html-validate\",\n \"keywords\": [\n \"html\",\n \"lint\",\n \"html-validate\",\n \"vue\"\n ],\n \"homepage\": \"https://html-validate.org/frameworks/vue.html\",\n \"bugs\": {\n \"url\": \"https://gitlab.com/html-validate/html-validate-vue/issues/new\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://gitlab.com/html-validate/html-validate-vue.git\"\n },\n \"license\": \"MIT\",\n \"author\": \"David Sveningsson <ext@sidvind.com>\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/esm/index.d.mts\",\n \"default\": \"./dist/esm/index.mjs\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/index.d.cts\",\n \"default\": \"./dist/cjs/index.cjs\"\n }\n }\n },\n \"main\": \"dist/cjs/index.cjs\",\n \"module\": \"dist/esm/index.mjs\",\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"prebuild\": \"tsc\",\n \"build\": \"run-s build:*\",\n \"build:lib\": \"node build.mjs\",\n \"build:cjs\": \"dts-bundle-generator --no-banner --project tsconfig.cjs.json -o dist/cjs/index.d.cts src/entry-cjs.ts\",\n \"build:esm\": \"dts-bundle-generator --no-banner --project tsconfig.esm.json -o dist/esm/index.d.mts src/entry-esm.ts\",\n \"eslint\": \"eslint --cache .\",\n \"eslint:fix\": \"eslint --cache --fix .\",\n \"prepack\": \"release-prepack package.json --bundle\",\n \"postpack\": \"release-postpack package.json\",\n \"prepare\": \"husky\",\n \"prepublishOnly\": \"release-prepack package.json --bundle\",\n \"prettier:check\": \"prettier --check .\",\n \"prettier:write\": \"prettier --write .\",\n \"postpublish\": \"release-postpack package.json\",\n \"attw\": \"attw --no-emoji --pack .\",\n \"test\": \"jest\"\n },\n \"commitlint\": {\n \"extends\": \"@html-validate\"\n },\n \"prettier\": \"@html-validate/prettier-config\",\n \"release\": {\n \"extends\": \"@html-validate/semantic-release-config\"\n },\n \"jest\": {\n \"preset\": \"@html-validate/jest-config\"\n },\n \"dependencies\": {\n \"@html-validate/plugin-utils\": \"2.0.3\",\n \"semver\": \"7.7.2\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"0.18.2\",\n \"@html-validate/commitlint-config\": \"3.5.0\",\n \"@html-validate/eslint-config\": \"6.4.1\",\n \"@html-validate/eslint-config-jest\": \"6.4.1\",\n \"@html-validate/eslint-config-typescript\": \"6.4.0\",\n \"@html-validate/eslint-config-typescript-typeinfo\": \"6.4.0\",\n \"@html-validate/jest-config\": \"3.13.0\",\n \"@html-validate/prettier-config\": \"3.0.4\",\n \"@html-validate/release-scripts\": \"6.9.0\",\n \"@tsconfig/node18\": \"18.2.4\",\n \"@tsconfig/strictest\": \"2.0.5\",\n \"@types/estree\": \"1.0.8\",\n \"@types/glob\": \"8.1.0\",\n \"@types/jest\": \"29.5.14\",\n \"@types/node\": \"18.19.111\",\n \"@types/semver\": \"7.7.0\",\n \"dts-bundle-generator\": \"9.5.1\",\n \"esbuild\": \"0.25.5\",\n \"html-validate\": \"9.7.0\",\n \"husky\": \"9.1.7\",\n \"jest\": \"29.7.0\",\n \"jest-environment-jsdom\": \"29.7.0\",\n \"npm-pkg-lint\": \"4.0.0\",\n \"npm-run-all2\": \"8.0.4\",\n \"ts-jest\": \"29.4.0\",\n \"typescript\": \"5.8.3\"\n },\n \"peerDependencies\": {\n \"html-validate\": \"^8.10.0 || ^9.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18.0\"\n },\n \"externalDependencies\": [\n \"@html-validate/plugin-utils\"\n ]\n}\n", "import { defineMetadata } from \"html-validate\";\n\nexport default defineMetadata({\n\tcomponent: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t\tcomponent: \"is\",\n\t\trequiredAttributes: [\"is\"],\n\t},\n\n\t\"keep-alive\": {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t},\n\n\tportal: {\n\t\tdeprecated: {\n\t\t\tsource: \"vue\",\n\t\t\tmessage: \"the <portal> element has been renamed to <teleport>\",\n\t\t\tdocumentation: \"The `<portal>` element has been renamed to `<teleport>`\",\n\t\t},\n\t},\n\n\t\"router-link\": {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t},\n\n\t\"router-view\": {\n\t\tflow: true,\n\t\tslots: [\"default\"],\n\t},\n\n\tslot: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t\tscriptSupporting: true,\n\t},\n\n\tsuspense: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t\tslots: [\"default\", \"fallback\"],\n\t},\n\n\tteleport: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t},\n\n\ttransition: {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t},\n\n\t\"transition-group\": {\n\t\tflow: true,\n\t\tphrasing: true,\n\t\ttransparent: true,\n\t\tcomponent: \"tag\",\n\t},\n});\n", "import { type ConfigData } from \"html-validate\";\nimport vueElements from \"../elements\";\n\nexport function createConfig(): ConfigData {\n\tconst config: ConfigData = {\n\t\telements: [vueElements],\n\t\trules: {\n\t\t\t/* vue modifiers often use camelcase so allow by default */\n\t\t\t\"attr-case\": [\"error\", { style: \"camelcase\" }],\n\n\t\t\t/* self closing tags often used in vue code so allow by default*/\n\t\t\t\"void-style\": [\"error\", { style: \"selfclose\" }],\n\t\t\t\"no-self-closing\": \"off\",\n\n\t\t\t/* enable rules from this plugin */\n\t\t\t\"vue/available-slots\": \"error\",\n\t\t\t\"vue/prefer-slot-shorthand\": \"error\",\n\t\t\t\"vue/required-slots\": \"error\",\n\t\t},\n\t};\n\n\treturn config;\n}\n\nexport default createConfig();\n", "import recommended from \"./recommended\";\n\nexport default {\n\trecommended,\n};\n", "import { type HtmlElement, Rule, type RuleDocumentation, type DOMReadyEvent } from \"html-validate\";\nimport { findUsedSlots } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\tinterface MetaData {\n\t\tslots?: string[];\n\t}\n\tinterface MetaElement {\n\t\tslots?: string[];\n\t}\n}\n\ninterface Context {\n\telement: string;\n\tslot: string;\n\tavailable: string[];\n}\n\nfunction difference<T>(a: Set<T>, b: Set<T>): Set<T> {\n\tconst result = new Set(a);\n\tfor (const elem of b) {\n\t\tresult.delete(elem);\n\t}\n\treturn result;\n}\n\nexport class AvailableSlots extends Rule<Context> {\n\tpublic override documentation(context?: Context): RuleDocumentation {\n\t\tif (context) {\n\t\t\treturn {\n\t\t\t\tdescription: [\n\t\t\t\t\t`The <${context.element}> component does not have a slot named \"${context.slot}\". Only known slots can be specified.`,\n\t\t\t\t\t\"\",\n\t\t\t\t\t\"The following slots are available\",\n\t\t\t\t]\n\t\t\t\t\t.concat(context.available.map((slot) => `- ${slot}`))\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tdescription: \"Only known slots can be specified.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"dom:ready\", (event: DOMReadyEvent) => {\n\t\t\tconst doc = event.document;\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-deprecated -- need to\n\t\t\t * use this for backwards compatibility until support for v7 is dropped */\n\t\t\tdoc.visitDepthFirst((node: HtmlElement) => {\n\t\t\t\t/* ignore rule if element has no meta or meta does not specify available slots */\n\t\t\t\tconst meta = node.meta;\n\t\t\t\tif (!meta?.slots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validateSlots(node, meta.slots);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate validateSlots(node: HtmlElement, slots: string[]): void {\n\t\tconst usedSlots = findUsedSlots(node);\n\t\tconst available = new Set(slots);\n\t\tconst used = new Set(usedSlots.keys());\n\t\tconst diff = difference(used, available);\n\n\t\tfor (const missing of diff) {\n\t\t\tconst context: Context = {\n\t\t\t\telement: node.tagName,\n\t\t\t\tslot: missing,\n\t\t\t\tavailable: slots,\n\t\t\t};\n\t\t\tthis.report(\n\t\t\t\tnode,\n\t\t\t\t`<${node.tagName}> component has no slot \"${missing}\"`,\n\t\t\t\tusedSlots.get(missing),\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}\n\t}\n}\n", "/**\n * Strip anything inside `{{ .. }}` in case it contains anything that looks like\n * markup, i.e. it will be ignored\n */\nexport function stripTemplating(str: string): string {\n\t/* eslint-disable-next-line sonarjs/slow-regex -- technical debt, should refactor */\n\treturn str.replace(/{{(.*?)}}/g, (_, m: string) => {\n\t\tconst filler = \" \".repeat(m.length);\n\t\treturn `{{${filler}}}`;\n\t});\n}\n", "import { type HtmlElement, type Location } from \"html-validate\";\n\nconst slotAttr = /(?:v-slot:|#)([^[]+)/;\n\nfunction haveSlot(value: [string, Location] | null): value is [string, Location] {\n\treturn value !== null;\n}\n\n/**\n * Search all children for slots and return both slot names and locations.\n */\nexport function findUsedSlots(node: HtmlElement): Map<string, Location> {\n\tconst template = node.querySelectorAll(\">template, >[slot]\");\n\tconst slots = template.map((child) => findSlotAttribute(child)).filter(haveSlot);\n\tconst initial = new Map<string, Location>();\n\treturn slots.reduce((result: Map<string, Location>, [key, val]) => {\n\t\tresult.set(key, val);\n\t\treturn result;\n\t}, initial);\n}\n\n/**\n * Find the name of the slot and its location used by an element. Searches\n * both v-slot:foo and slot=\"foo\".\n */\nexport function findSlotAttribute(node: HtmlElement): [string, Location] | null {\n\tfor (const attr of node.attributes) {\n\t\t/* find v-slot directive */\n\t\tconst match = slotAttr.exec(attr.key);\n\t\tif (match) {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if slot matches [1] will exist */\n\t\t\tconst slot = match[1]!;\n\t\t\treturn [slot, attr.keyLocation];\n\t\t}\n\n\t\t/* find deprecated slot attribute */\n\t\tif (attr.key === \"slot\" && typeof attr.value === \"string\") {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- valueLocation will always be set the value is present */\n\t\t\treturn [attr.value.toString(), attr.valueLocation!];\n\t\t}\n\t}\n\treturn null;\n}\n", "import { Rule, type RuleDocumentation, type AttributeEvent, DynamicValue } from \"html-validate\";\n\ninterface RuleContext {\n\tslot: string;\n}\n\nconst prefix = \"v-slot:\";\n\nfunction isVSlot(attr: string): string | null {\n\tif (!attr.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tif (attr.length <= prefix.length) {\n\t\treturn null;\n\t}\n\tconst slot = attr.slice(prefix.length);\n\tif (/^\\[.*\\]$/.exec(slot)) {\n\t\treturn null;\n\t}\n\treturn slot;\n}\n\nfunction isDeprecatedSlot(attr: string, value: null | string | DynamicValue): string | null {\n\tif (attr !== \"slot\") {\n\t\treturn null;\n\t}\n\tif (value instanceof DynamicValue) {\n\t\treturn null;\n\t}\n\tif (value === null || value === \"\") {\n\t\treturn null;\n\t}\n\treturn value.toString();\n}\n\nexport class PreferSlotShorthand extends Rule<RuleContext> {\n\tpublic override documentation(context?: RuleContext): RuleDocumentation {\n\t\tconst slot = context?.slot ?? \"my-slot\";\n\t\treturn {\n\t\t\tdescription: [\n\t\t\t\t`Prefer to use \\`#${slot}\\` over \\`v-slot:${slot}\\`.`,\n\t\t\t\t\"\",\n\t\t\t\t\"Vue.js supports a shorthand syntax for slots using `#` instead of `v-slot:` or the deprecated `slot` attribute, e.g. using `#header` instead of `v-slot:header`.\",\n\t\t\t].join(\"\\n\"),\n\t\t};\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"attr\", (event: AttributeEvent) => {\n\t\t\tconst { key: attr, value, target, keyLocation: location } = event;\n\n\t\t\tlet slot: string | null;\n\n\t\t\t/* handle v-slot:xyz */\n\t\t\tslot = isVSlot(attr);\n\t\t\tif (slot) {\n\t\t\t\tconst context: RuleContext = { slot };\n\t\t\t\tconst message = `Prefer to use #${slot} over ${attr}`;\n\t\t\t\tthis.report(target, message, location, context);\n\t\t\t}\n\n\t\t\t/* handle slot=\"xyz\" */\n\t\t\tslot = isDeprecatedSlot(attr, value);\n\t\t\tif (slot) {\n\t\t\t\tconst context: RuleContext = { slot };\n\t\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- value is checked by isDeprecatedSlot */\n\t\t\t\tconst message = `Prefer to use #${slot} over ${attr}=\"${value!.toString()}\"`;\n\t\t\t\tthis.report(target, message, location, context);\n\t\t\t}\n\t\t});\n\t}\n}\n", "import { type DOMReadyEvent, type HtmlElement, type RuleDocumentation, Rule } from \"html-validate\";\nimport { findUsedSlots } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\tinterface MetaData {\n\t\trequiredSlots?: string[];\n\t}\n\tinterface MetaElement {\n\t\trequiredSlots?: string[];\n\t}\n}\n\ninterface Context {\n\telement: string;\n\tslot: string;\n\trequired: string[];\n}\n\nfunction difference<T>(a: Set<T>, b: Set<T>): Set<T> {\n\tconst result = new Set(a);\n\tfor (const elem of b) {\n\t\tresult.delete(elem);\n\t}\n\treturn result;\n}\n\nexport class RequiredSlots extends Rule<Context> {\n\tpublic override documentation(context?: Context): RuleDocumentation {\n\t\tif (context) {\n\t\t\treturn {\n\t\t\t\tdescription: [\n\t\t\t\t\t`The <${context.element}> component requires slot \"${context.slot}\" to be implemented. Add \\`<template v-slot:${context.slot}>\\``,\n\t\t\t\t\t\"\",\n\t\t\t\t\t\"The following slots are required\",\n\t\t\t\t]\n\t\t\t\t\t.concat(context.required.map((slot) => `- ${slot}`))\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tdescription: \"All required slots must be implemented.\",\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic setup(): void {\n\t\tthis.on(\"dom:ready\", (event: DOMReadyEvent) => {\n\t\t\tconst doc = event.document;\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-deprecated -- need to\n\t\t\t * use this for backwards compatibility until support for v7 is dropped */\n\t\t\tdoc.visitDepthFirst((node: HtmlElement) => {\n\t\t\t\t/* ignore rule if element has no meta or meta does not specify available slots */\n\t\t\t\tconst meta = node.meta;\n\t\t\t\tif (!meta?.requiredSlots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validateSlots(node, meta.requiredSlots);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate validateSlots(node: HtmlElement, requiredSlots: string[]): void {\n\t\tconst usedSlots = findUsedSlots(node);\n\t\tconst required = new Set(requiredSlots);\n\t\tconst used = new Set(usedSlots.keys());\n\t\tconst diff = difference(required, used);\n\n\t\tfor (const missing of diff) {\n\t\t\tconst context: Context = {\n\t\t\t\telement: node.tagName,\n\t\t\t\tslot: missing,\n\t\t\t\trequired: requiredSlots,\n\t\t\t};\n\t\t\tthis.report(\n\t\t\t\tnode,\n\t\t\t\t`<${node.tagName}> component requires slot \"${missing}\" to be implemented`,\n\t\t\t\tnull,\n\t\t\t\tcontext,\n\t\t\t);\n\t\t}\n\t}\n}\n", "import { AvailableSlots } from \"./available-slots\";\nimport { PreferSlotShorthand } from \"./prefer-slot-shorthand\";\nimport { RequiredSlots } from \"./required-slots\";\n\nconst rules = {\n\t\"vue/available-slots\": AvailableSlots,\n\t\"vue/prefer-slot-shorthand\": PreferSlotShorthand,\n\t\"vue/required-slots\": RequiredSlots,\n};\n\nexport default rules;\n", "import { DynamicValue, type AttributeData } from \"html-validate\";\n\nexport function* processAttribute(attr: AttributeData): Iterable<AttributeData> {\n\t/* always yield original attribute */\n\tyield attr;\n\n\t/* setup :foo and v-bind:foo alias */\n\tconst bind = /^(?:v-bind)?:(.*)$/.exec(attr.key);\n\tif (bind) {\n\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if bind matches [1] will exist */\n\t\tconst key = bind[1]!;\n\t\tyield {\n\t\t\t...attr,\n\t\t\tkey,\n\t\t\tvalue: new DynamicValue(attr.value ? String(attr.value) : \"\"),\n\t\t\toriginalAttribute: attr.key,\n\t\t};\n\t}\n}\n", "import {\n\tDynamicValue,\n\ttype HtmlElement,\n\ttype MetaElement,\n\ttype ProcessElementContext,\n} from \"html-validate\";\nimport { findSlotAttribute } from \"../utils\";\n\ndeclare module \"html-validate\" {\n\texport interface MetaData {\n\t\tcomponent?: string;\n\t}\n}\n\nfunction isBound(node: HtmlElement): boolean {\n\treturn node.hasAttribute(\"v-html\");\n}\n\nfunction isSlot(node: HtmlElement): boolean {\n\treturn node.is(\"slot\");\n}\n\nfunction loadSlotMeta(context: ProcessElementContext, slotname: string, node: HtmlElement): void {\n\tconst parent = node.parent;\n\tif (!parent) {\n\t\treturn;\n\t}\n\n\t/* Generate a new virtual tagname to load meta element from */\n\tconst getMetaFor = (tagName: string): MetaElement | null => {\n\t\tconst meta = context.getMetaFor(tagName);\n\t\treturn meta && meta.tagName !== \"*\" ? meta : null;\n\t};\n\tconst key = `${parent.tagName}#${slotname}`;\n\tconst fallbackKey = `${parent.tagName}:${slotname}`;\n\tconst meta = getMetaFor(key) ?? getMetaFor(fallbackKey);\n\tif (!meta) {\n\t\treturn;\n\t}\n\n\tnode.loadMeta(meta);\n\n\t/* add an annotation so error messages will be more understandable */\n\tnode.setAnnotation(`slot \"${slotname}\" (<${parent.tagName}>)`);\n}\n\n/**\n * Handle <component> or a component with a slot wrapped in it.\n */\nfunction loadComponentMeta(\n\tcontext: ProcessElementContext,\n\tnode: HtmlElement,\n\tcomponent: string,\n): void {\n\tlet src: HtmlElement = node;\n\n\t/* if this is a slot with wrapped in a <component> we fetch attributes from\n\t * the parent element, i.e. the actual component */\n\tif (node.tagName === \"template\" && src.parent) {\n\t\tsrc = src.parent;\n\t}\n\n\t/* try to fetch the attribute containing the element to use */\n\tconst attr = src.getAttribute(component);\n\tif (!attr || attr.isDynamic) {\n\t\treturn;\n\t}\n\n\t/* use the attribute value to lookup new metadata based on the tagname */\n\tconst tagName = attr.value as string;\n\tconst meta = context.getMetaFor(tagName);\n\tif (!meta || meta.tagName === \"*\") {\n\t\treturn;\n\t}\n\n\tnode.loadMeta(meta);\n\n\t/* update or add new annotation so error messages will be more descriptive */\n\tif (node.isSameNode(src)) {\n\t\tnode.setAnnotation(`<${meta.tagName}> (<${node.tagName}>)`);\n\t} else {\n\t\tconst name = node.annotatedName.replace(\"(<\", `(<${meta.tagName}> via <`);\n\t\tnode.setAnnotation(name);\n\t}\n}\n\nexport function processElement(this: ProcessElementContext, node: HtmlElement): void {\n\tconst slot = findSlotAttribute(node);\n\n\t/* If this element is a slot we load new metadata properties onto the element\n\t * to support adding properties directly to slots, e.g. to allow/disallow\n\t * content in the slot. */\n\tif (slot) {\n\t\tconst [slotname] = slot;\n\t\tloadSlotMeta(this, slotname, node);\n\t}\n\n\t/* handle usage of <component>, either directly or inside a component */\n\tif (node.meta?.component) {\n\t\tloadComponentMeta(this, node, node.meta.component);\n\t}\n\n\t/* Since html-validate v9.5.4 `<template>` tags are generally ignored when\n\t * checking descendants but since v9.6.1 the checks are enabled if this flag\n\t * is disabled. This is a needed both for `<template #slot>` and when using\n\t * `<template>` inside a Vue SFC where the element is transparent instead of\n\t * acting as a `HTMLTemplateElement`. */\n\tif (node.is(\"template\") && node.meta) {\n\t\tnode.meta.templateRoot = false;\n\t}\n\n\t/* Mark as having dynamic text if the element either content bound via v-html\n\t * or if it is a slot. This is needed for rules with requires textual content,\n\t * e.g a heading cannot be empty. */\n\tif (isBound(node) || isSlot(node)) {\n\t\tnode.appendText(new DynamicValue(\"\"), node.location);\n\t}\n}\n", "import { type Source } from \"html-validate\";\nimport { processAttribute, processElement } from \"../hooks\";\n\n/**\n * Transform a regular HTML file. In practice this only applies hooks without\n * any extraction.\n */\nexport function* transformHTML(source: Source): Iterable<Source> {\n\tyield {\n\t\t...source,\n\t\thooks: {\n\t\t\tprocessAttribute,\n\t\t\tprocessElement,\n\t\t},\n\t};\n}\n\ntransformHTML.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { TemplateExtractor } from \"@html-validate/plugin-utils\";\nimport { processAttribute, processElement } from \"../hooks\";\n\n/**\n * Match template property in `Vue.component` call\n */\nexport function transformJS(source: Source): Iterable<Source> {\n\tconst te = TemplateExtractor.fromString(source.data, source.filename);\n\treturn Array.from(te.extractObjectProperty(\"template\"), (cur) => {\n\t\tcur.originalData = source.originalData ?? source.data;\n\t\tcur.hooks = {\n\t\t\tprocessAttribute,\n\t\t\tprocessElement,\n\t\t};\n\t\treturn cur;\n\t});\n}\n\ntransformJS.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { processAttribute, processElement } from \"../hooks\";\nimport { stripTemplating } from \"../utils\";\n\nfunction findLocation(source: string, index: number, preamble: number): [number, number] {\n\tlet line = 1;\n\tlet prev = 0;\n\tlet pos = source.indexOf(\"\\n\");\n\twhile (pos !== -1) {\n\t\tif (pos > index) {\n\t\t\treturn [line, index - prev + preamble + 1];\n\t\t}\n\t\tline++;\n\t\tprev = pos;\n\t\tpos = source.indexOf(\"\\n\", pos + 1);\n\t}\n\treturn [line, 1];\n}\n\nfunction computeIndent(text: string): string {\n\tconst lines = text.split(\"\\n\");\n\tconst initial = null as string | null;\n\tconst common = lines.reduce((common, line) => {\n\t\tconst match = /^(\\s*)\\S/.exec(line);\n\t\tif (match) {\n\t\t\t/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- if match matches [1] will exist */\n\t\t\tconst indent = match[1]!;\n\t\t\treturn common === null || indent.length < common.length ? indent : common;\n\t\t} else {\n\t\t\treturn common;\n\t\t}\n\t}, initial);\n\treturn common ?? \"\";\n}\n\n/**\n * Match templates from SFC <template> tag\n */\nexport function* transformSFC(source: Source): Iterable<Source> {\n\tconst indent = computeIndent(source.data);\n\t/* eslint-disable-next-line security/detect-non-literal-regexp -- will only contain whitespace */\n\tconst sfc = new RegExp(`^${indent}(<template([^>]*)>)([^]*?)^${indent}(</template>)`, \"gm\");\n\tlet match: RegExpExecArray | null;\n\twhile ((match = sfc.exec(source.data)) !== null) {\n\t\tconst attr = match[2] ?? \"\";\n\t\tconst data = `${match[1]!}${match[3]!}${match[4]!}`; // eslint-disable-line @typescript-eslint/no-non-null-assertion -- groups exists when regex matches\n\t\tif (!/lang=\".*?\"/.exec(attr)) {\n\t\t\tconst [line, column] = findLocation(source.data, match.index, 0);\n\t\t\tyield {\n\t\t\t\tdata: stripTemplating(data),\n\t\t\t\tfilename: source.filename,\n\t\t\t\tline: line + (source.line - 1),\n\t\t\t\tcolumn: column + (source.column - 1),\n\t\t\t\toffset: match.index + source.offset,\n\t\t\t\toriginalData: source.originalData ?? source.data,\n\t\t\t\thooks: {\n\t\t\t\t\tprocessAttribute,\n\t\t\t\t\tprocessElement,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n}\n\ntransformSFC.api = 1;\n", "import { type Source } from \"html-validate\";\nimport { transformHTML } from \"./html.transform\";\nimport { transformJS } from \"./js.transform\";\nimport { transformSFC } from \"./sfc.transform\";\n\n/**\n * Returns true if the source is considered a SFC component\n */\nfunction isVue(source: Source): boolean {\n\treturn !!/\\.vue$/i.exec(source.filename);\n}\n\n/**\n * Returns true if the source is considered javascript\n */\nfunction isJavascript(source: Source): boolean {\n\treturn !!/\\.(jsx?|tsx?)$/i.exec(source.filename);\n}\n\nexport function* autodetect(source: Source): Iterable<Source> {\n\tif (isVue(source)) {\n\t\tyield* transformSFC(source);\n\t} else if (isJavascript(source)) {\n\t\tyield* transformJS(source);\n\t} else {\n\t\tyield* transformHTML(source);\n\t}\n}\n\nautodetect.api = 1;\n", "import { type Transformer } from \"html-validate\";\nimport { autodetect } from \"./auto.transform\";\nimport { transformHTML } from \"./html.transform\";\nimport { transformJS } from \"./js.transform\";\nimport { transformSFC } from \"./sfc.transform\";\n\nconst transformer: Record<string, Transformer> = {\n\tdefault: autodetect,\n\tauto: autodetect,\n\tjs: transformJS,\n\tsfc: transformSFC,\n\thtml: transformHTML,\n};\n\nexport default transformer;\n", "{\n \"properties\": {\n \"component\": {\n \"type\": \"string\",\n \"copyable\": true\n },\n \"requiredSlots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"slots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n}\n", "/* istanbul ignore file */\n\nimport plugin from \"./index\";\n\nexport default plugin;\n"],
5
+ "mappings": ";AAAA,SAAsB,0BAA0B;;;ACC9C,WAAQ;AAgGR,uBAAoB;AAAA,EAClB,iBAAiB;AACnB;;;ACnGF,SAAS,sBAAsB;AAE/B,IAAO,mBAAQ,eAAe;AAAA,EAC7B,WAAW;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa;AAAA,IACb,WAAW;AAAA,IACX,oBAAoB,CAAC,IAAI;AAAA,EAC1B;AAAA,EAEA,cAAc;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa;AAAA,EACd;AAAA,EAEA,QAAQ;AAAA,IACP,YAAY;AAAA,MACX,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,eAAe;AAAA,IAChB;AAAA,EACD;AAAA,EAEA,eAAe;AAAA,IACd,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa;AAAA,EACd;AAAA,EAEA,eAAe;AAAA,IACd,MAAM;AAAA,IACN,OAAO,CAAC,SAAS;AAAA,EAClB;AAAA,EAEA,MAAM;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa;AAAA,IACb,kBAAkB;AAAA,EACnB;AAAA,EAEA,UAAU;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa;AAAA,IACb,OAAO,CAAC,WAAW,UAAU;AAAA,EAC9B;AAAA,EAEA,UAAU;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,EACX;AAAA,EAEA,YAAY;AAAA,IACX,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa;AAAA,EACd;AAAA,EAEA,oBAAoB;AAAA,IACnB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa;AAAA,IACb,WAAW;AAAA,EACZ;AACD,CAAC;;;AChEM,SAAS,eAA2B;AAC1C,QAAM,SAAq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AQ;AAAA,MACR,OAAS;AAAA,QACP,MAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,OAAS;AAAA,MACP,MAAQ;AAAA,MACR,OAAS;AAAA,QACP,MAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACF;;;AlBZA,IAAM,QAAQ,iBAAiB,eAAe;AAC9C,mBAAmB,MAAM,KAAK;AAE9B,IAAM,SAAiB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAO,cAAQ;;;AmBdf,IAAO,oBAAQ;",
6
6
  "names": ["Rule", "Rule", "difference", "Rule", "DynamicValue", "DynamicValue", "meta", "name", "DynamicValue", "common"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-validate-vue",
3
- "version": "7.2.0",
3
+ "version": "7.2.2",
4
4
  "description": "vue transform for html-validate",
5
5
  "keywords": [
6
6
  "html",