Skip to content
项目

关于

Catch the AI slop your agents ship.

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
正在收集历史
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Vite Doctor: catch framework bugs AI agents miss

npm version npm downloads license: MIT docs

Vite Doctor catches the framework bugs a generic linter and an AI agent miss in Nuxt, Vue, Vite, Nitro, and H3 projects. It reads app code, config, installed packages, and server handlers, follows the runtime versions the framework actually loads, and prints a report an agent can act on: a Diagnostic Code, the file and range, why it matters, and the fix.

Docs · CLI · Configuration · CI · Nuxt · Vite · Extending Doctor · npm

Run it

From the project root, with dependencies installed:

pnpm dlx vite-doctor .

Doctor needs no config file. It activates Rule Packs from the project's dependencies. Narrow a run to changed lines, one Rule, or stricter presets:

pnpm dlx vite-doctor . --changed
pnpm dlx vite-doctor . --rules nuxt/fetch/no-raw-fetch-in-setup
pnpm dlx vite-doctor . --strict
pnpm dlx vite-doctor . --fix

When a coding agent runs it, Doctor prints the agent report: Diagnostics grouped by code, with remediation, Diagnostic Reference URLs, and commands to verify or rerun. --format text, json, sarif, or agent picks a fixed format.

Nuxt

pnpm add -D vite-doctor
export default defineNuxtConfig({
  modules: ["vite-doctor/nuxt"],
});
pnpm nuxt doctor

Vite, Vue, and Nitro

The doctor() plugin covers Vite, Vue, and Nitro projects and picks the matching Diagnostics:

import { doctor } from "vite-doctor";

export default {
  plugins: [doctor()],
};

CI

Add a script and run it before the build. Doctor reads source and config, not build output:

{
  "scripts": {
    "check:doctor": "vite-doctor . --max-warnings 0"
  }
}

Don't name the script doctor: pnpm doctor and npm doctor run the package manager's own health check instead.

If your Nuxt project registers vite-doctor/nuxt, run pnpm nuxt prepare before pnpm check:doctor unless your install already runs it. This generates Doctor's Nuxt manifest without a build.

Check a migration

pnpm dlx vite-doctor migrate .
pnpm dlx vite-doctor migrate . --to nuxt@5 --format json

migrate lists the source, dependency, and config changes Nuxt 5, Nitro 3, or H3 v2 needs. It never rewrites the project.

Extensions

Library authors ship their own Rules as Doctor Extensions, with createRule, defineRulePack, and defineDoctorExtension from vite-doctor/extension. A Vite plugin attaches them through api.doctor, and a Nuxt module through the doctor:extendExtensions hook. comark-linter is a published one. See Extending Doctor.

License

MIT. Maintainers: see RELEASING.md.

探索相关项目

加载中…