Files
gstack/lib/design-lint/render.ts
T
garrytanandcapy-ai[bot] 1ba2ae0425 feat(design-lint): core of the bundled free design lint (parsers, colour, tokens, reporter, waivers, CLI)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-26 05:31:11 +00:00

28 lines
927 B
TypeScript

/**
* The render tier: what only a browser can measure. Drives the same engine
* gstack-render picks (Aside when it is running, otherwise gstack's own
* headless browser) through lib/aside-render, so nothing is installed and no
* puppeteer is needed.
*
* Ported from Nutlope/hallmark's sloplint-render.mjs (MIT, see NOTICE.md).
*/
import type { Finding } from './report';
export interface RenderOptions {
cwd?: string;
job?: string | null;
scope?: 'page' | 'component';
timeoutMs?: number;
}
export interface RenderResult {
findings: Finding[];
/** 'ran', or 'skipped: <reason>' naming why no page was measured. */
status: string;
}
export async function lintRender(targets: string[], _opts: RenderOptions = {}): Promise<RenderResult> {
if (!targets.length) return { findings: [], status: 'skipped: no HTML page to render' };
return { findings: [], status: 'skipped: render tier not built yet' };
}