Vue

Vue rulesCLI
Install Doctor in a Vue project and run Vue diagnostics through the Vite plugin or CLI surface.

Use the Vite plugin when the Vue app already builds through Vite. Use the CLI when you want an explicit local or CI command.

Install

Add Vite Doctor to the project:

pnpm add -D vite-doctor

Register the Vite plugin in vite.config.ts:

vite.config.ts
import vue from "@vitejs/plugin-vue";
import { doctor } from "vite-doctor";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [vue(), doctor({ framework: "vue" })],
});

Run Doctor directly when you want a focused scan:

pnpm vite-doctor . --rules vue

Configure

Plugin options are the Vue project surface. Put rule policy close to the Vite config that owns the build:

vite.config.ts
import vue from "@vitejs/plugin-vue";
import { doctor } from "vite-doctor";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [
    vue(),
    doctor({
      framework: "vue",
      extends: ["vue/recommended"],
      config: {
        rules: {
          "vue/reactivity/no-ref-as-operand": "error",
        },
      },
    }),
  ],
});

Pick the right reference

Vue rules focus on reactivity, template, watcher, lifecycle, SSR, and security mistakes in Vue code. Start in Vue rules when a diagnostic begins with vue/.

If the same project also has Vite runtime or build diagnostics, use Vite rules for vite/... diagnostics.

Fix a diagnostic

Open the rule page from the reported rule ID, compare the before/after example to your component, and re-run the same rule:

pnpm vite-doctor . --framework vue --rules vue/reactivity/no-ref-as-operand

Use --max-warnings 0 in CI when warnings should block a pull request.

Copyright © 2026