import type { HyperframeLintFinding, HyperframeLinterOptions } from "./types"; import { parseHtmlStructure, findRootTag, collectCompositionIds, readAttr, stripHtmlComments, } from "./utils"; import type { OpenTag, ExtractedBlock } from "./utils"; export type { OpenTag, ExtractedBlock }; export type LintContext = { source: string; rawSource: string; tags: OpenTag[]; styles: ExtractedBlock[]; scripts: ExtractedBlock[]; compositionIds: Set; rootTag: OpenTag | null; rootCompositionId: string | null; options: HyperframeLinterOptions; }; // Re-export for convenience so rule modules only need one import for the finding type export type { HyperframeLintFinding }; export function buildLintContext(html: string, options: HyperframeLinterOptions = {}): LintContext { const rawSource = html || ""; // Strip HTML comments before scanning so a commented-out