mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(check): ignore registry component templates (#2450)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user