Ultracite & Fast Validation Recipe
Zero-config linting preset + a Bun/tsgo/oxlint stack that validates an entire repo in ~250-500ms. Fast enough to run on every line of code changed.
Ultracite
Ultracite is a zero-config preset for ESLint, Biome, and Oxlint. It provides hundreds of production-grade rules for JavaScript/TypeScript projects with framework-specific presets. Source: https://ultracite.ai; https://docs.ultracite.ai
Use Ultracite for all linting/formatting configuration instead of hand-rolling ESLint, Prettier, Biome, or oxlint configs. It handles the opinionated baseline; custom ESLint rules layer on top for repo-specific policy only (see Lint-Enforced Agent Guardrails).
Docs: https://docs.ultracite.ai | GitHub: https://github.com/haydenbleasel/ultracite
Current source snapshot: ultracite@7.8.4 is the npm latest release, published 2026-07-02; the public Git repository default branch was 9e7f4389caaad9b5895b84a7c026e6dbe702155a on review, with no public v7.8.4 tag found. Current docs still position Ultracite as a zero-config preset across Biome, ESLint/Prettier/Stylelint, and Oxlint/Oxfmt, with npx ultracite init flags for package manager, framework, editor, agent, hooks, --install-skill, and type-aware rules. The hook docs preserve the agent-loop invariant: after AI edits, run npx ultracite fix and preserve existing hook config without duplicate entries. Source: npm registry, GitHub, and docs.ultracite.ai, 2026-07-03
Setup
bun x ultracite@latest init \
--linter oxlint \
--pm bun \
--frameworks react next \
--editors cursor \
--agents universal claude \
--hooks cursor claude \
--type-aware
The CLI detects your lockfile and generates config files, editor settings, agent rule files, and hook configs in one pass. For existing projects, run bun x ultracite@latest init interactively.
Toolchain Selection
| Toolchain | Speed | Ecosystem | When to use |
|---|---|---|---|
| Oxlint + Oxfmt | 50-100x ESLint | 15 built-in plugin equivalents | Default choice. Speed-first, agentic workflows. |
| Biome | ~30x ESLint | 287 rules, all-in-one binary | Simpler single-binary setup. |
| ESLint + Prettier | Baseline | Deepest plugin ecosystem | Only when custom AST rules are needed. |
Prefer Oxlint for new projects. It handles React, TypeScript, Next.js, Vue, Jest, Vitest, JSDoc, and more out of the box.
Oxlint Configuration
// .oxlintrc.json
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"extends": [
"./node_modules/ultracite/config/oxlint/core/.oxlintrc.json",
"./node_modules/ultracite/config/oxlint/react/.oxlintrc.json",
"./node_modules/ultracite/config/oxlint/next/.oxlintrc.json"
]
}
// .oxfmtrc.jsonc
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always",
"printWidth": 80
}
CLI Commands
| Command | Purpose |
|---|---|
npx ultracite check |
Lint without modifying files |
npx ultracite fix |
Auto-fix safe issues |
npx ultracite fix --unsafe |
Include behavior-changing fixes |
npx ultracite check --type-aware |
Type-aware rules (oxlint: no-floating-promises, no-misused-promises, await-thenable) |
npx ultracite doctor |
Validate setup |
Agent Integration
Ultracite generates agent-specific rule files so AI assistants inherit lint standards:
- Agent rules (
--agents): GeneratesAGENTS.md,.claude/CLAUDE.md,.cursor/rules/ultracite.mdc- code quality guidance for AI code generation. - Agent hooks (
--hooks): Generates.cursor/hooks.json,.claude/settings.json- runsultracite fixafter every AI edit, formatting and fixing before the agent reviews its own output. - MCP server: For cloud agents without local access, add to MCP config:
{
"mcpServers": {
"ultracite": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://docs.ultracite.ai/mcp"]
}
}
}
Monorepo Setup
Config at repo root. One ultracite check covers all packages. With Turborepo, add "//#check": {} and "//#fix": { "cache": false } as root tasks.
Git Hooks
npx ultracite init --integrations husky,lint-staged
Supported: Husky, Lefthook, lint-staged, pre-commit (Python framework).
Reusable Skill
Install once, carry across repos:
npx ultracite init --install-skill
# or
npx skills add haydenbleasel/ultracite
The Fast Validation Recipe
A stack optimized for sub-500ms full-repo validation:
| Layer | Tool | Why |
|---|---|---|
| Runtime | Bun | Fast startup, native TS execution, built-in test runner |
| Type checking | tsgo (TS 7) | ~10x faster than tsc, native Go implementation. Do not use tsc. |
| Linting | Oxlint via Ultracite | ~100x faster than ESLint, Rust-native |
| Formatting | Oxfmt via Ultracite | Rust-native, consistent with oxlint |
| Tests | Focused unit tests | Small, fast, run on every change |
| Hooks | Agentic hooks | Pre-commit and agent-loop gates |
Target Performance
Full repo validation in ~250-500ms. At this speed, validation can run on every line of code changed - not just on commit or CI. This turns linting from a batch check into a real-time feedback signal for both humans and agents.
Rusty's earlier recipe bookmark states the same stack in operational terms: Bun for startup, TS7/tsgo for type checking, opinionated oxlint/oxfmt config, focused unit tests, and agentic hooks. The useful update is the per-line feedback loop, not a new package: when the validation loop is this fast, agents can run checks against each changed line or small edit batch instead of waiting until a PR-level pass. Source: X/@rustydotwtf, 2026-03-10
Agentic Hooks
When validation is fast enough to run in-loop, agents get immediate feedback on every edit. A slow lint pass (5-10s) means the agent batches code and checks later. A fast lint pass (250ms) means the agent catches mistakes on the line it just wrote.
This compounds with Lint-Enforced Agent Guardrails. Custom rules that detect slop patterns + sub-second validation = agents that cannot produce slop without immediately knowing about it.
Why Not Hand-Rolled Configs
| Approach | Problem |
|---|---|
| Hand-rolled ESLint config | Hundreds of rules to choose, version drift, slow |
| Hand-rolled Prettier config | Separate tool, conflicts with linters |
| Hand-rolled Biome config | Still need to choose rules manually |
| Hand-rolled oxlint config | Need to track categories and overrides yourself |
| Ultracite | Zero-config baseline, framework presets, agent/hook integration, one command |
Ultracite handles the hundreds of standard rules. Custom ESLint rules handle what's unique to your codebase (mock-echo detection, query-key-deps, architecture policy). This is the correct split.
Timeline
- 2026-07-04 | Reviewed Rusty's text-only fast-validation recipe row as supporting evidence for the existing Bun + tsgo + oxlint/oxfmt + focused-test + agent-hook stack. No new tool or version snapshot was needed because the durable source authority remains Ultracite/npm/GitHub; the row sharpens the "run checks on every changed line" operator model. Source: X/@rustydotwtf, 2026-03-10
- 2026-07-03 | Deep-reviewed the Rusty bookmark as Ultracite source evidence and refreshed package/source authority:
ultracite@7.8.4on npm, repo HEAD9e7f4389caaad9b5895b84a7c026e6dbe702155a, no matching publicv7.8.4Git tag found. Source: X/@rustydotwtf, 2026-03-10; Source: npm/GitHub/docs, 2026-07-03 - 2026-06-17 | Added inline provenance and timeline so the recipe can be audited separately from the executable tooling choices. Source: https://ultracite.ai; https://docs.ultracite.ai
- 2026-04-07 | Created fast-validation recipe from Kevin's manual notes, Ultracite docs, and the JS toolchain direction. Source: manual (Kevin Liu, X post); https://ultracite.ai