Files
hyperframes/packages/cli/src/utils/lintProject.ts
T
Miguel Ángel 7b79ab4290 fix(check): lint and check skip compositions the project never mounts (#7369)
* fix(check): lint and check skip compositions the project never mounts

* refactor(lint): let two new names stand without doc comments

* test(cli): lint tests that lint unmounted files say so
2026-11-07 21:47:17 +00:00

24 lines
911 B
TypeScript

// CLI facade: the linter stays reusable without the CLI, while command-specific gates live here.
export { lintProject, shouldBlockRender } from "@hyperframes/lint";
export type { ProjectLintOptions, ProjectLintResult } from "@hyperframes/lint";
import type { ProjectLintResult } from "@hyperframes/lint";
export function hasDefinitiveEntryMismatch(result: ProjectLintResult): boolean {
return result.results.some((entry) =>
entry.result.findings.some(
(finding) => finding.code === "blank_root_with_standalone_composition",
),
);
}
export function definitiveEntryMismatchComposition(result: ProjectLintResult): string | undefined {
for (const entry of result.results) {
const finding = entry.result.findings.find(
(candidate) => candidate.code === "blank_root_with_standalone_composition",
);
if (finding) return finding.suggestedComposition;
}
return undefined;
}