MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / lintHyperframeHtml

Function lintHyperframeHtml

packages/lint/src/hyperframeLinter.ts:26–60  ·  view source on GitHub ↗
(
  html: string,
  options: HyperframeLinterOptions = {},
)

Source from the content-addressed store, hash-verified

24];
25
26export async function lintHyperframeHtml(
27 html: string,
28 options: HyperframeLinterOptions = {},
29): Promise<HyperframeLintResult> {
30 const ctx = buildLintContext(html, options);
31 const findings: HyperframeLintFinding[] = [];
32 const seen = new Set<string>();
33
34 for (const rule of ALL_RULES) {
35 for (const finding of await Promise.resolve(rule(ctx))) {
36 const dedupeKey = [
37 finding.code,
38 finding.severity,
39 finding.selector || "",
40 finding.elementId || "",
41 finding.message,
42 ].join("|");
43 if (seen.has(dedupeKey)) continue;
44 seen.add(dedupeKey);
45 findings.push(options.filePath ? { ...finding, file: options.filePath } : finding);
46 }
47 }
48
49 const errorCount = findings.filter((f) => f.severity === "error").length;
50 const warningCount = findings.filter((f) => f.severity === "warning").length;
51 const infoCount = findings.filter((f) => f.severity === "info").length;
52
53 return {
54 ok: errorCount === 0,
55 errorCount,
56 warningCount,
57 infoCount,
58 findings,
59 };
60}
61
62// ── Async media URL accessibility checker ─────────────────────────────────
63

Callers 15

runHyperframeLintFunction · 0.90
mainFunction · 0.90
testCleanFixturePassesFunction · 0.90
browser.test.tsFile · 0.85
lintProjectFunction · 0.85
gsap.test.tsFile · 0.85
findByCodeFunction · 0.85
fonts.test.tsFile · 0.85

Calls 2

buildLintContextFunction · 0.90
addMethod · 0.80

Tested by 2

findByCodeFunction · 0.68
findSlideshowFunction · 0.68