fix(check): ignore registry component templates (#2450)

This commit is contained in:
Miguel Ángel
2026-07-14 18:21:25 -04:00
committed by GitHub
parent 9e2afbcce5
commit 14df58f017
2 changed files with 22 additions and 2 deletions
@@ -217,6 +217,21 @@ describe("lintProject", () => {
expect(results).toHaveLength(1);
});
it("ignores registry component templates under compositions/components", async () => {
const project = makeProject(validHtml());
const componentsDir = join(project, "compositions", "components", "unused-widget");
mkdirSync(componentsDir, { recursive: true });
writeFileSync(
join(componentsDir, "template.html"),
`<template><div data-duration="1">unused registry template</div></template>`,
);
const { results, totalErrors } = await lintProject(project);
expect(results.map((result) => result.file)).toEqual(["index.html"]);
expect(totalErrors).toBe(0);
});
it("ignores non-HTML files in compositions/", async () => {
const project = makeProject(validHtml(), {
"captions.html": validHtml("captions"),