ultracite by haydenbleasel/ultracite
npx skills add https://github.com/haydenbleasel/ultracite --skill ultracite为 JS/TS 项目提供零配置的代码检查和格式化。支持三种检查器后端:Biome(推荐)、ESLint + Prettier,以及 Oxlint + Oxfmt。
检查 package.json 的 devDependencies 中是否包含 ultracite。通过查找以下文件来检测当前激活的检查器:
biome.jsonc → Biomeeslint.config.mjs → ESLint.oxlintrc.json → Oxlint# 检查问题(只读)
bunx ultracite check
# 自动修复问题
bunx ultracite fix
# 诊断设置问题
bunx ultracite doctor
# 在新项目中初始化
bunx ultracite init
根据包管理器的不同,可将 bunx 替换为 、 或 。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
npxpnpxyarn dlxcheck 和 fix 命令接受可选的文件路径:bunx ultracite check src/index.ts。
bunx ultracite init 会运行一个交互式设置。对于非交互式(CI)使用,请传递以下标志:
bunx ultracite init \
--pm bun \
--linter biome \
--editors vscode cursor \
--agents claude copilot \
--frameworks react next \
--integrations husky lint-staged \
--quiet
标志说明:
--pm — npm | yarn | pnpm | bun--linter — biome(推荐) | eslint | oxlint--editors — vscode | zed | cursor | windsurf | antigravity | kiro | trae | void--agents — claude | codex | copilot | cline | amp | gemini | cursor-cli 等 19 个以上--frameworks — react | next | solid | vue | svelte | qwik | remix | angular | astro | nestjs--integrations — husky | lefthook | lint-staged | pre-commit--hooks — 为支持的代理/编辑器启用自动修复钩子--type-aware — 启用类型感知的代码检查(仅限 oxlint)--skip-install — 跳过依赖安装--quiet — 禁止提示(当 CI=true 时会自动检测并启用)初始化会创建扩展 Ultracite 预设的配置:
// biome.jsonc
{ "extends": ["ultracite/biome/core", "ultracite/biome/react"] }
每个检查器可用的框架预设包括:core、react、next、solid、vue、svelte、qwik、remix、angular、astro、nestjs。
在使用 Ultracite 的项目中编写代码时,请遵循以下规范。完整的规则参考,请查看 references/code-standards.md。
主要规则概览:
格式化: 2 空格缩进,使用分号,双引号,80 字符宽度,ES5 尾随逗号,LF 行尾。
风格: 优先使用箭头函数。默认使用 const,绝不使用 var。优先使用 for...of 而非 .forEach()。优先使用模板字面量而非字符串拼接。不使用枚举(使用带有 as const 的对象)。不使用嵌套三元运算符。文件名使用短横线命名法。
正确性: 没有未使用的导入/变量。不使用 any(使用 unknown)。在异步函数中总是 await Promise。生产环境中不使用 console.log/debugger/alert。
React: 仅使用函数组件。钩子放在顶层。依赖项要完整。可迭代元素上使用 key(不要使用数组索引)。不嵌套定义组件。使用语义化 HTML + ARIA。
性能: 不在循环中使用扩展运算符累积。不使用桶文件。不使用命名空间导入。正则表达式放在顶层。
安全: 在 target="_blank" 上使用 rel="noopener"。不使用 dangerouslySetInnerHTML。不使用 eval()。
运行 bunx ultracite doctor 进行诊断。它会检查:
.eslintrc.*、.prettierrc.* 文件)常见修复方法:
.eslintrc.* 和 .prettierrc.* 文件bunx ultracite init 或手动将 ultracite 添加到 devDependencies每周安装量
1.6K
代码仓库
GitHub 星标数
2.8K
首次出现
2026 年 2 月 19 日
安全审计
安装于
cursor1.3K
github-copilot1.3K
claude-code1.1K
opencode1.0K
codex1.0K
gemini-cli892
Zero-config linting and formatting for JS/TS projects. Supports three linter backends: Biome (recommended), ESLint + Prettier, and Oxlint + Oxfmt.
Check if ultracite is in package.json devDependencies. Detect the active linter by looking for:
biome.jsonc → Biomeeslint.config.mjs → ESLint.oxlintrc.json → Oxlint# Check for issues (read-only)
bunx ultracite check
# Auto-fix issues
bunx ultracite fix
# Diagnose setup problems
bunx ultracite doctor
# Initialize in a new project
bunx ultracite init
Replace bunx with npx, pnpx, or yarn dlx depending on the package manager.
check and fix accept optional file paths: bunx ultracite check src/index.ts.
bunx ultracite init runs an interactive setup. For non-interactive (CI) use, pass flags:
bunx ultracite init \
--pm bun \
--linter biome \
--editors vscode cursor \
--agents claude copilot \
--frameworks react next \
--integrations husky lint-staged \
--quiet
Flags:
--pm — npm | yarn | pnpm | bun--linter — biome (recommended) | eslint | oxlint--editors — vscode | zed | | | | | | Init creates config that extends Ultracite presets:
// biome.jsonc
{ "extends": ["ultracite/biome/core", "ultracite/biome/react"] }
Framework presets available per linter: core, react, next, solid, vue, svelte, qwik, remix, angular, astro, nestjs.
When writing code in a project with Ultracite, follow these standards. For the full rules reference, see references/code-standards.md.
Key rules at a glance:
Formatting: 2-space indent, semicolons, double quotes, 80-char width, ES5 trailing commas, LF line endings.
Style: Arrow functions preferred. const by default, never var. for...of over .forEach(). Template literals over concatenation. No enums (use objects with as const). No nested ternaries. Kebab-case filenames.
Correctness: No unused imports/variables. No any (use unknown). Always await promises in async functions. No console.log/debugger/alert in production.
React: Function components only. Hooks at top level. Exhaustive deps. key on iterables (no array index). No nested component definitions. Semantic HTML + ARIA.
Performance: No accumulating spread in loops. No barrel files. No namespace imports. Top-level regex.
Security: rel="noopener" on target="_blank". No dangerouslySetInnerHTML. No eval().
Run bunx ultracite doctor to diagnose. It checks:
.eslintrc.*, .prettierrc.* files)Common fixes:
.eslintrc.* and .prettierrc.* files after migrating to Ultracitebunx ultracite init again or manually add ultracite to devDependenciesWeekly Installs
1.6K
Repository
GitHub Stars
2.8K
First Seen
Feb 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
cursor1.3K
github-copilot1.3K
claude-code1.1K
opencode1.0K
codex1.0K
gemini-cli892
97,600 周安装
cursorwindsurfantigravitykirotraevoid--agents — claude | codex | copilot | cline | amp | gemini | cursor-cli + 19 more--frameworks — react | next | solid | vue | svelte | qwik | remix | angular | astro | nestjs--integrations — husky | lefthook | lint-staged | pre-commit--hooks — Enable auto-fix hooks for supported agents/editors--type-aware — Enable type-aware linting (oxlint only)--skip-install — Skip dependency installation--quiet — Suppress prompts (auto-detected when CI=true)