Skip to content
Projects

About

Catch the AI slop your agents ship.

Web & App Development

How these counts are measured

Measured star growth

in 24h
0
in 7 days
+1
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

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.

Explore related projects

Loading…