# Repository Briefing: ngocanhnckh/renderlint
> Source: https://repoforai.com/repo/ngocanhnckh/renderlint (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/ngocanhnckh/renderlint
- **Official Docs / Website**: https://renderlint.yitec.net
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: JavaScript
- **License**: MIT
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.2.0 (2026-11-18) — https://github.com/ngocanhnckh/renderlint/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: CLI
- **Momentum**: 817 ★ total (+1 24h / +52 7d) · 182 forks
- **Topics**: `a11y`, `accessibility`, `ai-agents`, `ai-coding`, `claude-code`, `contrast`, `css`, `cursor`, `developer-tools`, `frontend`, `linter`, `nextjs`
- **When to Use**: Best for: 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. Skip if: Your primary requirement is pixel-exact baseline matching, comprehensive accessibility sign-off, canvas-label inspection, or exhaustive workflow coverage without writing test states.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Pixel contrast: compares captures with and without visible text to measure the actual backdrop, including gradients and images.
- Responsive stress: sweeps widths between configured viewports and retests with longer copy, larger numbers, and longer API data.
- Interaction checks: opens menus, hovers tooltips, walks focus in both directions, and uses wheel input to verify suspected scroll traps.
- UX probes: delays fetch/XHR by one second for loading checks; optional `--ux` probes bounded samples of controls for feedback, failure handling, and duplicate submissions.
- Actionable reports: groups duplicate findings and links them to numbered screenshots and, where supported, component source locations.
- Quality gate: provides an error exit status, JSON and Markdown reports, GitHub annotations, and an optional Claude Code hook.
```

## Quick Start / Clone
```bash
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
```
