ngocanhnckh/renderlint
A Chromium-based CLI that catches layout, contrast, and interaction defects.
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Renderlint is a Node.js CLI and JavaScript library with two declared runtime dependencies: playwright and pngjs. It drives headless Chromium, scrolls to trigger lazy content, waits for fonts and images, and advances animations to their final state. An in-page analyzer checks text bounds against clipping boxes, box intersections, computed styles, and hit-test results. Contrast uses two captures: a normal render and one with text made transparent to reveal the background behind it.
The runner also exercises focus, scrolling, menus, and tooltips before grouping findings across viewports and pages. Findings include fix hints and annotated screenshots; React, Vue, Svelte, and Astro development builds can also provide component source locations where mapping succeeds. The integration surface is a CLI, a JavaScript API, a Vite overlay, and a Claude Code setup hook; it does not require an MCP server.
Key Capabilities & Differentiators
The 63 rules cover rendered defects such as text clipping, SVG label collisions, horizontal overflow, obscured focus, clipped popups, unreachable content, and leaked values like NaN%. Scans cover phone, tablet, and desktop widths, plus dark mode where supported. Intermediate-width sweeps and stress passes with longer copy, larger numbers, and longer API data distinguish defects visible now from brittleness reported as fragile-layout.
For pages that load data through browser fetch/XHR, the standard pass holds those requests for one second to look for missing loading feedback. The optional --ux pass samples at most 12 controls per page on fresh loads. It checks for issues such as missing feedback on an HTTP 500, duplicate submissions, and UI freezes. Configured click-and-wait states and Playwright flows extend coverage beyond initial page loads; rule severity and selector-level ignores let teams control what blocks CI.
Trade-offs & Limitations
Unlike ESLint, Renderlint inspects what the browser actually paints. Unlike Playwright screenshot assertions, it diagnoses specific defects without a reference image, but it cannot enforce exact appearance. Its contrast rule uses WCAG 2 AA rather than APCA, and DOM-based label checks work on SVG but cannot inspect text drawn inside a canvas. Treat it as a targeted quality gate, not a substitute for visual approval or a full accessibility audit.
A three-viewport scan with sweep and stress takes about 4–10 seconds per page; --ux takes about a minute per page and does not exercise hover menus or drag-and-drop. Use --sweep 1024 or --no-sweep for a faster feedback loop, and script critical states rather than assuming automatic coverage. Server-side mocking is limited to Node; server-rendered pages on other stacks need a running backend. Run interaction probes against test accounts and data, since they can activate real controls and submit forms.
Hardware & Deployment Guide
Run on Node.js 18.17 or later with Playwright Chromium. npx -y @yitec/renderlint http://localhost:3000 runs a one-off scan; npx renderlint dist serves a static build for inspection. With no explicit target, the CLI looks for a running dev server, a dev script, a build directory, then index.html. Use renderlint.config.json, .js, .mjs, or the renderlint key in package.json to specify routes, widths, states, and mocks.
init installs the tool and adds configuration, a build gate, agent instructions, and a Claude Code hook. Review those changes before committing them. The check exits with status 1 on errors and writes JSON, Markdown, and annotated screenshots under .renderlint/. Scanning runs locally without telemetry; provision Chromium ahead of time for restricted CI environments and ensure the target app is reachable. Release v0.2.0 packages this workflow around headless Chromium checks at phone, tablet, and desktop widths.
--ux probes bounded samples of controls for feedback, failure handling, and duplicate submissions.Frontend teams and coding agents that need a CI gate for cross-width layout, real-pixel contrast, and common interaction regressions, with screenshots developers can act on.
Your primary requirement is pixel-exact baseline matching, comprehensive accessibility sign-off, canvas-label inspection, or exhaustive workflow coverage without writing test states.
Quick Start & Installation
npx -y @yitec/renderlint init # one-time setup: installs it, adds config, build gate, agent instructions, Claude Code hook npx renderlint # check: exits 1 if any error is found
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| renderlint ★ | 817 | +52 | JavaScript | MIT | A Chromium-based CLI that catches layout, contrast, and interaction defects. |
| rtk | 88.7k | +684 | Rust | Apache-2.0 | A local Rust CLI wrapper that trims command output before coding agents read it. |
| ECC | 316.1k | +4.2k | JavaScript | MIT | Plugins and CLI workflows for planning, reviewing, and verifying agent-written c |
| ponytail | 204.4k | +4.1k | JavaScript | MIT | A prompt-driven coding-agent plugin for smaller changes and focused tests. |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/ngocanhnckh/renderlint.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about renderlint
How do I integrate renderlint with my app or coding agent?
renderlint CLI. It can scan a running URL, serve a static build, or manage a configured server command. JavaScript callers can use check and formatPretty. A Vite overlay and a Claude Code hook are also available; neither requires an MCP server.What runtime and hardware should I budget for?
--ux pass takes about a minute per page. Measure both on representative routes before setting a CI timeout.Can we use it commercially and run it entirely on our own infrastructure?
.renderlint/ artifacts before sharing them: screenshots and reports can expose content from authenticated or internal pages.Should renderlint replace Playwright screenshot assertions or accessibility audits?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy