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
+7 -2
View File
@@ -212,8 +212,13 @@ export async function lintProject(
const out: string[] = [];
for (const entry of readdirSync(dir, { withFileTypes: true })) {
const relPath = rel ? `${rel}/${entry.name}` : entry.name;
if (entry.isDirectory()) out.push(...collectHtmlFiles(join(dir, entry.name), relPath));
else if (entry.isFile() && entry.name.endsWith(".html") && !entry.name.startsWith("._")) {
if (entry.isDirectory()) {
// Registry components are source snippets, not independently mounted
// sub-compositions. Linting every installed template here makes an
// unused component fail the assembled project check.
if (!rel && entry.name === "components") continue;
out.push(...collectHtmlFiles(join(dir, entry.name), relPath));
} else if (entry.isFile() && entry.name.endsWith(".html") && !entry.name.startsWith("._")) {
out.push(relPath);
}
}