@remylagerweij/vue-doctor 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +279 -93
- package/dist/cli.js +9 -9
- package/dist/{diagnose-Cnvb3Zvz.js → diagnose-C4vCT7pO.js} +1 -1
- package/dist/diagnose-DzDOUndE.js +2 -0
- package/dist/{discover-project-Ds4M6KFG.js → discover-project-D_BLbCCW.js} +1 -1
- package/dist/{discover-project-CYTD5J_J.js → discover-project-JCgCRT9u.js} +1 -1
- package/dist/{rules-unwpVVGY.js → rules-_h5qMfCs.js} +2 -2
- package/dist/{server-DuTRvF89.js → server-CPJOEUHq.js} +3 -3
- package/package.json +36 -6
- package/dist/diagnose-D5Dq4AQJ.js +0 -2
package/README.md
CHANGED
|
@@ -1,158 +1,344 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# 🩺 Vue Doctor
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Production-grade diagnostics, performance optimization, security auditing, and dead-code detection for Vue.js and Nuxt applications.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@remylagerweij/vue-doctor)
|
|
8
|
+
[](https://www.npmjs.com/package/@remylagerweij/vue-doctor)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[](https://remylagerweij.github.io/vue-doctor/)
|
|
11
|
+
[](https://github.com/remylagerweij/vue-doctor/actions/workflows/ci.yml)
|
|
12
|
+
[](https://github.com/remylagerweij/vue-doctor/actions/workflows/self-test.yml)
|
|
13
|
+
[](https://opensource.org/licenses/MIT)
|
|
14
|
+
|
|
15
|
+
[Quick Start](#-quick-start) • [Features](#-key-features) • [Rule Categories](#-what-it-checks) • [AI Agents & MCP](#-ai-coding-agents--mcp) • [GitHub Actions CI](#-github-actions-ci) • [Documentation](https://remylagerweij.github.io/vue-doctor/)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
Vue Doctor computes an actionable **0–100 health score** for your Vue and Nuxt codebases. It combines **sub-second AST analysis** via custom Oxlint rules, deep template validation via `eslint-plugin-vue`, dead code and unused export detection via Knip, and dependency vulnerability audits via OSV.dev.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## ⚡ Quick Start
|
|
26
|
+
|
|
27
|
+
### Zero-Install (Run Instantly)
|
|
28
|
+
|
|
29
|
+
Scan your project in seconds without installing anything:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx @remylagerweij/vue-doctor@latest .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Install as a Dev Dependency
|
|
6
36
|
|
|
7
37
|
```bash
|
|
8
|
-
|
|
38
|
+
# npm
|
|
39
|
+
npm i -D @remylagerweij/vue-doctor
|
|
40
|
+
|
|
41
|
+
# pnpm
|
|
42
|
+
pnpm add -D @remylagerweij/vue-doctor
|
|
43
|
+
|
|
44
|
+
# yarn
|
|
45
|
+
yarn add -D @remylagerweij/vue-doctor
|
|
46
|
+
|
|
47
|
+
# bun
|
|
48
|
+
bun add -d @remylagerweij/vue-doctor
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Then add a script to your `package.json`:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"scripts": {
|
|
56
|
+
"doctor": "vue-doctor",
|
|
57
|
+
"doctor:fix": "vue-doctor --fix",
|
|
58
|
+
"doctor:diff": "vue-doctor --diff"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
9
61
|
```
|
|
10
62
|
|
|
11
|
-
|
|
63
|
+
---
|
|
12
64
|
|
|
13
|
-
|
|
65
|
+
## 🚀 Key Features
|
|
14
66
|
|
|
15
|
-
|
|
16
|
-
|
|
67
|
+
- ⚡ **Sub-Second Performance:** Blazing-fast scans powered by Oxlint and native caching (`node_modules/.cache/vue-doctor`).
|
|
68
|
+
- 🛡️ **Comprehensive Quality Gates:** 85 custom rules (85 on by default) + 19 eslint-plugin-vue rules = 104 registered rules.
|
|
69
|
+
- 🔒 **Deep Security Guardrails:** Detects hardcoded secrets, unsafe HTML sinks (`v-html`), SSRF, command & SQL injection, prototype pollution, and LLM prompt injection risks.
|
|
70
|
+
- 🧹 **Dead Code & Unused Exports:** Finds unused components, unreferenced exports, orphan types, and dead dependencies using Knip.
|
|
71
|
+
- 🔧 **Automated Codemods:** Deterministic `--fix` automatically repairs lodash imports, in-place array mutation, missing `v-for` keys, and `rel="noopener noreferrer"`.
|
|
72
|
+
- 🤖 **First-Class AI Agent Support:** Built-in stdio Model Context Protocol (MCP) server (`vue-doctor mcp`) and one-command agent playbook installer (`vue-doctor agents install`) for Cursor, Claude Code, Copilot, and Windsurf.
|
|
73
|
+
- 🚦 **GitHub Actions CI & PR Feedback:** Full pull request feedback with sticky summary comments, line-level reviews with AI remediation prompts, check annotations, and score delta tracking.
|
|
74
|
+
- 📈 **Baseline for Existing Codebases:** Adopt Vue Doctor on legacy applications instantly; record existing issues and only fail on new violations.
|
|
75
|
+
- 📊 **Multiple Output Formats:** Terminal text with color banner, JSON, JSONL, SARIF (GitHub Code Scanning), Markdown, HTML, and GitHub Step Summary.
|
|
17
76
|
|
|
18
|
-
|
|
19
|
-
|----------|-------|---------|
|
|
20
|
-
| **Reactivity** | 9 | `no-fetch-in-watch`, `no-watch-for-computed`, `prefer-computed` |
|
|
21
|
-
| **Ecosystem** | 4 | `pinia-no-destructure`, `router-no-string-push` |
|
|
22
|
-
| **Architecture** | 2 | `no-giant-component`, `no-nested-component-definition` |
|
|
23
|
-
| **Performance** | 18 | `no-transition-all`, `no-layout-property-animation`, `async-parallel` |
|
|
24
|
-
| **Security** | 3 | `no-secrets-in-client-code`, `no-unsafe-html-sink` |
|
|
25
|
-
| **Bundle Size** | 5 | `no-full-lodash-import`, `no-moment`, `prefer-dynamic-import` |
|
|
26
|
-
| **Correctness** | 8 | `no-array-index-as-key`, `no-prevent-default`, `no-direct-dom-manipulation` |
|
|
27
|
-
| **Nuxt** | 9 | `nuxt-no-img-element`, `nuxt-no-a-element`, `nuxt-async-client-component` |
|
|
28
|
-
| **Server** | 1 | `server-no-console-in-handler` |
|
|
29
|
-
| **Supply Chain** | 3 | `lockfile-integrity`, `no-remote-dependency-spec`, `no-dependency-install-scripts` (project checks) |
|
|
77
|
+
---
|
|
30
78
|
|
|
31
|
-
|
|
32
|
-
|
|
79
|
+
## 🔍 What It Checks
|
|
80
|
+
|
|
81
|
+
Vue Doctor executes **four parallel analysis passes**:
|
|
82
|
+
|
|
83
|
+
### 1. Oxlint AST Plugin (85 rules)
|
|
84
|
+
Custom, sub-second JavaScript/TypeScript and `.vue` script AST analysis:
|
|
85
|
+
|
|
86
|
+
| Category | Focus | Example Anti-Patterns Detected |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| **Reactivity** | Vue 3 reactivity traps | `no-fetch-in-watch`, `no-watch-for-computed`, `prefer-computed`, ref unwrapping |
|
|
89
|
+
| **Performance** | Runtime & rendering speed | `no-transition-all`, `no-layout-property-animation`, `async-parallel`, large lists |
|
|
90
|
+
| **Security** | XSS, injection & secrets | `no-unsafe-html-sink`, `no-secrets-in-client-code`, `no-eval`, SSRF, prompt injection |
|
|
91
|
+
| **Bundle Size** | Bloat & tree-shaking | `no-full-lodash-import`, `no-moment`, `prefer-dynamic-import`, duplicate packages |
|
|
92
|
+
| **Nuxt** | SSR & hydration pitfalls | `nuxt-no-img-element`, `nuxt-no-a-element`, `nuxt-async-client-component` |
|
|
93
|
+
| **Ecosystem** | Pinia & Vue Router | `pinia-no-destructure`, `router-no-string-push` |
|
|
94
|
+
| **Architecture** | Maintainability & design | `no-giant-component`, `no-nested-component-definition` |
|
|
95
|
+
| **Correctness** | Logic bugs & runtime errors | `no-array-index-as-key`, `no-prevent-default`, `no-direct-dom-manipulation` |
|
|
96
|
+
| **Server** | Nitro / server handlers | `server-no-console-in-handler` |
|
|
97
|
+
| **Supply Chain** | Dependencies & lockfiles | `lockfile-integrity`, `no-remote-dependency-spec`, `no-dependency-install-scripts` |
|
|
98
|
+
|
|
99
|
+
### 2. ESLint Template Validation (19 rules)
|
|
100
|
+
Deep `.vue` template structure checks via bundled flat-config ESLint:
|
|
33
101
|
- `vue/require-v-for-key`, `vue/no-use-v-if-with-v-for`
|
|
34
102
|
- `vue/no-mutating-props`, `vue/no-ref-as-operand`
|
|
35
103
|
- `vue/no-side-effects-in-computed-properties`
|
|
104
|
+
- `vue/no-template-target-blank`
|
|
36
105
|
- `vue/component-name-in-template-casing`
|
|
37
|
-
- And more...
|
|
38
106
|
|
|
39
|
-
### 3. Dead Code Detection
|
|
40
|
-
|
|
41
|
-
- Unused
|
|
107
|
+
### 3. Dead Code Detection (Knip)
|
|
108
|
+
- Unused `.vue`, `.ts`, and `.js` files
|
|
109
|
+
- Unused component exports, composables, and TypeScript types
|
|
110
|
+
- Unreferenced production dependencies and devDependencies
|
|
111
|
+
|
|
112
|
+
### 4. Dependency Vulnerability Audits (OSV.dev)
|
|
113
|
+
- Real-time advisory lookups against the Open Source Vulnerability (OSV) database using `--audit`.
|
|
114
|
+
|
|
115
|
+
---
|
|
42
116
|
|
|
43
|
-
##
|
|
117
|
+
## 💻 Common Commands
|
|
44
118
|
|
|
45
119
|
```bash
|
|
46
120
|
# Scan current directory
|
|
47
121
|
vue-doctor
|
|
48
122
|
|
|
49
|
-
# Scan a specific project
|
|
50
|
-
vue-doctor
|
|
123
|
+
# Scan a specific directory or workspace project
|
|
124
|
+
vue-doctor ./apps/web
|
|
51
125
|
|
|
52
|
-
#
|
|
53
|
-
vue-doctor --
|
|
126
|
+
# Automatically apply deterministic codemods
|
|
127
|
+
vue-doctor --fix
|
|
54
128
|
|
|
55
|
-
#
|
|
56
|
-
vue-doctor --
|
|
129
|
+
# Preview codemods without changing files (unified diff)
|
|
130
|
+
vue-doctor --fix --dry-run
|
|
57
131
|
|
|
58
|
-
#
|
|
59
|
-
vue-doctor --
|
|
132
|
+
# Scan only files changed in your git branch (fast pre-commit / PR mode)
|
|
133
|
+
vue-doctor --diff main
|
|
60
134
|
|
|
61
|
-
#
|
|
62
|
-
vue-doctor --
|
|
135
|
+
# Output numeric score only (0–100, useful for quick shell scripts)
|
|
136
|
+
vue-doctor --score
|
|
63
137
|
|
|
64
|
-
#
|
|
65
|
-
vue-doctor --
|
|
138
|
+
# Fail CI gate if health score is below 80 or if any error occurs
|
|
139
|
+
vue-doctor --min-score 80 --fail-on error
|
|
140
|
+
|
|
141
|
+
# Output formats: text (default), json, sarif, markdown, html
|
|
142
|
+
vue-doctor --format json --output report.json
|
|
143
|
+
vue-doctor --format sarif --output results.sarif
|
|
66
144
|
```
|
|
67
145
|
|
|
68
|
-
|
|
146
|
+
---
|
|
69
147
|
|
|
70
|
-
|
|
148
|
+
## 🤖 AI Coding Agents & MCP
|
|
71
149
|
|
|
72
|
-
|
|
73
|
-
// vue-doctor.config.ts
|
|
74
|
-
import { defineConfig } from "@remylagerweij/vue-doctor";
|
|
150
|
+
Vue Doctor is built from the ground up for AI-assisted development:
|
|
75
151
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
ignore: { files: ["src/legacy/**"], rules: ["no-prevent-default"] },
|
|
83
|
-
gate: { failOn: "error", scope: "new", minScore: 70 },
|
|
84
|
-
deadCode: true,
|
|
85
|
-
});
|
|
152
|
+
### 1. Model Context Protocol (MCP) Server
|
|
153
|
+
Launch the built-in MCP server for Claude Code, Cursor, Windsurf, or Antigravity:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npx @remylagerweij/vue-doctor@latest mcp
|
|
86
157
|
```
|
|
87
158
|
|
|
159
|
+
Add it to your Claude Desktop or Cursor MCP settings:
|
|
160
|
+
|
|
88
161
|
```json
|
|
89
162
|
{
|
|
90
|
-
"
|
|
91
|
-
|
|
163
|
+
"mcpServers": {
|
|
164
|
+
"vue-doctor": {
|
|
165
|
+
"command": "npx",
|
|
166
|
+
"args": ["-y", "@remylagerweij/vue-doctor@latest", "mcp"]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
92
169
|
}
|
|
93
170
|
```
|
|
94
171
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
172
|
+
### 2. Install AI Agent Instructions
|
|
173
|
+
Install tailored playbooks for all detected coding assistants (`CLAUDE.md`, `.cursorrules`, Copilot, `AGENTS.md`):
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
npx @remylagerweij/vue-doctor@latest agents install
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 3. Explain Any Rule with AI Remediation Steps
|
|
180
|
+
```bash
|
|
181
|
+
npx @remylagerweij/vue-doctor@latest explain vue-doctor/security/no-unsafe-html-sink
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 🛠️ GitHub Actions CI
|
|
187
|
+
|
|
188
|
+
Set up automated pull request quality gates and sticky review comments in one command:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
npx @remylagerweij/vue-doctor@latest ci install
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Or add `.github/workflows/vue-doctor.yml`:
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
name: Vue Doctor
|
|
198
|
+
|
|
199
|
+
on:
|
|
200
|
+
pull_request:
|
|
201
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
202
|
+
push:
|
|
203
|
+
branches: [main]
|
|
204
|
+
|
|
205
|
+
permissions:
|
|
206
|
+
contents: read
|
|
207
|
+
pull-requests: write
|
|
208
|
+
checks: write
|
|
209
|
+
statuses: write
|
|
210
|
+
|
|
211
|
+
jobs:
|
|
212
|
+
diagnose:
|
|
213
|
+
name: Vue Doctor Health Check
|
|
214
|
+
runs-on: ubuntu-latest
|
|
215
|
+
steps:
|
|
216
|
+
- uses: actions/checkout@v4
|
|
217
|
+
with:
|
|
218
|
+
fetch-depth: 0
|
|
219
|
+
|
|
220
|
+
- uses: remylagerweij/vue-doctor@v2
|
|
221
|
+
with:
|
|
222
|
+
fail-on: error
|
|
223
|
+
gate: new
|
|
224
|
+
feedback: summary,findings
|
|
225
|
+
grouping: rule-per-file
|
|
226
|
+
agent-prompt: true
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
99
230
|
|
|
100
|
-
## Baseline
|
|
231
|
+
## 📈 Baseline (Adopting on Existing Projects)
|
|
101
232
|
|
|
102
|
-
|
|
233
|
+
Adopt Vue Doctor on large or legacy codebases without failing existing code:
|
|
103
234
|
|
|
104
235
|
```bash
|
|
105
|
-
|
|
106
|
-
npx @remylagerweij/vue-doctor
|
|
236
|
+
# 1. Record current findings into a baseline file
|
|
237
|
+
npx @remylagerweij/vue-doctor@latest baseline
|
|
238
|
+
|
|
239
|
+
# 2. Commit the baseline file
|
|
240
|
+
git add .vue-doctor-baseline.json && git commit -m "chore: add vue-doctor baseline"
|
|
241
|
+
|
|
242
|
+
# 3. Only fail CI when NEW issues are introduced
|
|
243
|
+
npx @remylagerweij/vue-doctor@latest --baseline .vue-doctor-baseline.json --gate new --fail-on error
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## ⚙️ Configuration
|
|
249
|
+
|
|
250
|
+
Configure Vue Doctor via `vue-doctor.config.ts` (or `.js`, `.mjs`, `.json`, or a `"vueDoctor"` property in `package.json`):
|
|
251
|
+
|
|
252
|
+
```typescript
|
|
253
|
+
import { defineConfig } from "@remylagerweij/vue-doctor";
|
|
254
|
+
|
|
255
|
+
export default defineConfig({
|
|
256
|
+
gate: {
|
|
257
|
+
failOn: "error", // "none" | "error" | "warning"
|
|
258
|
+
scope: "new", // "new" (only new issues fail) | "all"
|
|
259
|
+
minScore: 80, // Minimum 0-100 score required to pass gate
|
|
260
|
+
},
|
|
261
|
+
lint: true,
|
|
262
|
+
deadCode: true,
|
|
263
|
+
rules: {
|
|
264
|
+
"vue-doctor/security/no-unsafe-html-sink": "error",
|
|
265
|
+
"vue-doctor/bundle-size/no-moment": "warn",
|
|
266
|
+
"vue-doctor/architecture/no-giant-component": "off",
|
|
267
|
+
},
|
|
268
|
+
ignore: {
|
|
269
|
+
paths: ["legacy/**", "dist/**", "coverage/**"],
|
|
270
|
+
rules: ["vue-doctor/bundle-size/no-full-lodash-import"],
|
|
271
|
+
},
|
|
272
|
+
baseline: ".vue-doctor-baseline.json",
|
|
273
|
+
});
|
|
107
274
|
```
|
|
108
275
|
|
|
109
|
-
|
|
276
|
+
---
|
|
110
277
|
|
|
111
|
-
## Suppressing Findings
|
|
278
|
+
## 🔕 Suppressing Findings
|
|
112
279
|
|
|
113
|
-
Vue Doctor
|
|
280
|
+
Vue Doctor features non-destructive, dedicated suppression comments. `eslint-disable` comments never hide Vue Doctor findings:
|
|
114
281
|
|
|
115
|
-
```
|
|
116
|
-
//
|
|
282
|
+
```typescript
|
|
283
|
+
// Line suppression
|
|
284
|
+
// vue-doctor-disable-next-line vue-doctor/bundle-size/no-moment -- legacy compatibility
|
|
117
285
|
import moment from "moment";
|
|
286
|
+
|
|
287
|
+
// Inline suppression
|
|
118
288
|
const html = render(); // vue-doctor-disable-line
|
|
119
|
-
|
|
120
|
-
//
|
|
289
|
+
|
|
290
|
+
// File suppression
|
|
291
|
+
// vue-doctor-disable-file vue-doctor/architecture/no-giant-component
|
|
121
292
|
```
|
|
122
293
|
|
|
123
|
-
In `.vue` templates use HTML comments:
|
|
294
|
+
In `.vue` templates, use standard HTML comments:
|
|
295
|
+
```html
|
|
296
|
+
<!-- vue-doctor-disable-next-line vue-doctor/security/no-unsafe-html-sink -->
|
|
297
|
+
<div v-html="trustedContent" />
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## 🔌 Programmatic API
|
|
124
303
|
|
|
125
|
-
|
|
304
|
+
Use Vue Doctor directly from Node.js scripts or custom build tooling:
|
|
126
305
|
|
|
127
|
-
```
|
|
128
|
-
import { diagnose } from "vue-doctor/api";
|
|
306
|
+
```typescript
|
|
307
|
+
import { diagnose } from "@remylagerweij/vue-doctor/api";
|
|
129
308
|
|
|
130
|
-
const result = await diagnose({
|
|
131
|
-
directory: "./my-vue-app",
|
|
309
|
+
const result = await diagnose("./my-vue-app", {
|
|
132
310
|
lint: true,
|
|
133
311
|
deadCode: true,
|
|
134
|
-
verbose: false,
|
|
135
312
|
});
|
|
136
313
|
|
|
137
|
-
console.log(result.
|
|
138
|
-
console.log(result.diagnostics.length);
|
|
314
|
+
console.log(`Health Score: ${result.score}/100`);
|
|
315
|
+
console.log(`Total Findings: ${result.diagnostics.length}`);
|
|
139
316
|
```
|
|
140
317
|
|
|
141
|
-
|
|
318
|
+
---
|
|
142
319
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
320
|
+
## 🌐 Framework & Tooling Support
|
|
321
|
+
|
|
322
|
+
- **Vue.js:** Vue 3 (Composition API, `<script setup>`, Options API)
|
|
323
|
+
- **Nuxt:** Nuxt 3 (auto-detected, with specialized server, routing, and hydration checks)
|
|
324
|
+
- **Bundlers:** Vite, Rollup, Webpack, Nuxt CLI, Quasar, Vue CLI
|
|
325
|
+
- **Monorepos:** npm, pnpm, yarn, bun workspaces, Turborepo, Nx
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## 📚 Documentation & Resources
|
|
148
330
|
|
|
149
|
-
|
|
331
|
+
- **[Official Documentation](https://remylagerweij.github.io/vue-doctor/)**
|
|
332
|
+
- **[Full Rules Catalog](https://remylagerweij.github.io/vue-doctor/rules/)**
|
|
333
|
+
- **[CI & GitHub PR Guide](https://remylagerweij.github.io/vue-doctor/guide/ci)**
|
|
334
|
+
- **[AI Agents Playbook](https://remylagerweij.github.io/vue-doctor/guide/agents)**
|
|
335
|
+
- **[Model Context Protocol (MCP) Guide](https://remylagerweij.github.io/vue-doctor/guide/mcp)**
|
|
336
|
+
- **[CLI Reference](https://remylagerweij.github.io/vue-doctor/reference/cli)**
|
|
337
|
+
- **[Configuration Reference](https://remylagerweij.github.io/vue-doctor/reference/config)**
|
|
338
|
+
- **[LLM Full-Text Reference (`llms.txt`)](https://remylagerweij.github.io/vue-doctor/llms.txt)**
|
|
150
339
|
|
|
151
|
-
|
|
152
|
-
- **Nuxt 3** (auto-detected, enables Nuxt-specific rules)
|
|
153
|
-
- **Vite** / **Quasar** / **Vue CLI**
|
|
154
|
-
- **Monorepo** workspaces (npm, pnpm, yarn)
|
|
340
|
+
---
|
|
155
341
|
|
|
156
|
-
## License
|
|
342
|
+
## 📄 License
|
|
157
343
|
|
|
158
|
-
MIT
|
|
344
|
+
[MIT](https://github.com/remylagerweij/vue-doctor/blob/main/LICENSE) © [Remy Martin Lagerweij](https://github.com/remylagerweij)
|
package/dist/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as logger, c as getToolVersions, d as loadConfig, i as configureLogger, l as mapWithConcurrency, n as diagnose, o as output, r as createKnipSession, s as highlighter, t as NoVueDependencyError, u as createPrivateTempDirectory } from "./diagnose-
|
|
2
|
+
import { a as logger, c as getToolVersions, d as loadConfig, i as configureLogger, l as mapWithConcurrency, n as diagnose, o as output, r as createKnipSession, s as highlighter, t as NoVueDependencyError, u as createPrivateTempDirectory } from "./diagnose-C4vCT7pO.js";
|
|
3
3
|
import { _ as getCanonicalRuleId, d as PLUGIN_NAME, f as RULE_REGISTRY, i as createBaseline, l as ruleIdOf, n as DEFAULT_BASELINE_FILENAME, o as writeBaseline, y as getRuleMeta } from "./baseline-B4hYcahD.js";
|
|
4
4
|
import { n as isMonorepoRoot } from "./find-monorepo-root-VE6uVqvK.js";
|
|
5
|
-
import { c as listWorkspacePackages, f as MILLISECONDS_PER_SECOND, g as VERSION$1, i as getRootPackage, n as discoverVueSubprojects, r as formatFrameworkName, t as discoverProject } from "./discover-project-
|
|
6
|
-
import { a as filterSourceFiles, c as EXIT_CODES, d as evaluateGate, l as FAIL_ON_VALUES, n as registerExplainCommand, o as getDiffInfo, r as registerRulesCommand, s as docsUrl, u as GATE_SCOPE_VALUES } from "./rules-
|
|
5
|
+
import { c as listWorkspacePackages, f as MILLISECONDS_PER_SECOND, g as VERSION$1, i as getRootPackage, n as discoverVueSubprojects, r as formatFrameworkName, t as discoverProject } from "./discover-project-JCgCRT9u.js";
|
|
6
|
+
import { a as filterSourceFiles, c as EXIT_CODES, d as evaluateGate, l as FAIL_ON_VALUES, n as registerExplainCommand, o as getDiffInfo, r as registerRulesCommand, s as docsUrl, u as GATE_SCOPE_VALUES } from "./rules-_h5qMfCs.js";
|
|
7
7
|
import { n as REPORT_SCHEMA_URL, t as REPORT_FORMAT } from "./constants-Cav5tPU4.js";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
@@ -1814,8 +1814,8 @@ const createBatchProgressReporter = async (options) => {
|
|
|
1814
1814
|
// src/scan.ts
|
|
1815
1815
|
const printProjectDetection = (projectInfo, isDiffMode, includePaths) => {
|
|
1816
1816
|
const lines = [];
|
|
1817
|
-
const title = `${pc.bold(pc.green("Vue Doctor"))} ${pc.dim("v2.0.
|
|
1818
|
-
lines.push(createFramedLine(`Vue Doctor v2.0.
|
|
1817
|
+
const title = `${pc.bold(pc.green("Vue Doctor"))} ${pc.dim("v2.0.4")}`;
|
|
1818
|
+
lines.push(createFramedLine(`Vue Doctor v2.0.4`, title));
|
|
1819
1819
|
const vueVersionDisplay = projectInfo.vueVersion ? `Vue ${projectInfo.vueVersion}` : "Vue";
|
|
1820
1820
|
const frameworkDisplay = formatFrameworkName(projectInfo.framework);
|
|
1821
1821
|
const projectLine = `${projectInfo.projectName} · ${frameworkDisplay} · ${vueVersionDisplay}`;
|
|
@@ -2956,7 +2956,7 @@ const registerInitCommand = (program) => {
|
|
|
2956
2956
|
const projectDir = path.resolve(directoryArg);
|
|
2957
2957
|
const isInteractive = Boolean(process.stdin.isTTY) && !options.yes;
|
|
2958
2958
|
const clack = isInteractive ? await import("@clack/prompts") : null;
|
|
2959
|
-
const { discoverProject, formatFrameworkName } = await import("./discover-project-
|
|
2959
|
+
const { discoverProject, formatFrameworkName } = await import("./discover-project-D_BLbCCW.js");
|
|
2960
2960
|
const { isMonorepoRoot } = await import("./find-monorepo-root-Cqb6bdkf.js");
|
|
2961
2961
|
const projectInfo = discoverProject(projectDir);
|
|
2962
2962
|
if (isInteractive && clack) {
|
|
@@ -3143,7 +3143,7 @@ const registerInitCommand = (program) => {
|
|
|
3143
3143
|
if (spinner) spinner.start("Scanning project to record baseline snapshot...");
|
|
3144
3144
|
else logger.log("Scanning project to record baseline snapshot...");
|
|
3145
3145
|
try {
|
|
3146
|
-
const { diagnose } = await import("./diagnose-
|
|
3146
|
+
const { diagnose } = await import("./diagnose-DzDOUndE.js");
|
|
3147
3147
|
const { createBaseline, writeBaseline } = await import("./baseline-t03hOZec.js");
|
|
3148
3148
|
const baselineData = createBaseline((await diagnose(projectDir, { baseline: null })).diagnostics);
|
|
3149
3149
|
writeBaseline(path.join(projectDir, baselineFileName), baselineData);
|
|
@@ -3162,12 +3162,12 @@ const registerInitCommand = (program) => {
|
|
|
3162
3162
|
// src/commands/mcp.ts
|
|
3163
3163
|
const registerMcpCommand = (program) => {
|
|
3164
3164
|
program.command("mcp").description("Start Model Context Protocol (MCP) server over stdio for AI agents").action(async () => {
|
|
3165
|
-
const { McpServer } = await import("./server-
|
|
3165
|
+
const { McpServer } = await import("./server-CPJOEUHq.js");
|
|
3166
3166
|
new McpServer().startStdio();
|
|
3167
3167
|
});
|
|
3168
3168
|
};
|
|
3169
3169
|
// src/program.ts
|
|
3170
|
-
const VERSION = "2.0.
|
|
3170
|
+
const VERSION = "2.0.4";
|
|
3171
3171
|
const parseScore = (value) => {
|
|
3172
3172
|
const score = Number(value);
|
|
3173
3173
|
if (!Number.isInteger(score) || score < 0 || score > 100) throw new InvalidArgumentError("Expected an integer between 0 and 100.");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { S as CUSTOM_TEMPLATE_RULES, a as readBaseline, b as toDiagnosticRule, c as resolveRuleKey, d as PLUGIN_NAME, g as createTemplateRuleConfig, h as createOxlintConfig, l as ruleIdOf, m as createCustomTemplateRuleConfig, r as applyBaseline, s as createRuleIdReporter, u as AUDIT_RULES, v as getEnabledFsRules, x as CUSTOM_TEMPLATE_PLUGIN_NAME, y as getRuleMeta } from "./baseline-B4hYcahD.js";
|
|
3
3
|
import { i as normalizeRelativePath, n as isInsideAnyDirectory, r as listProjectSourceFiles, t as LINTABLE_FILE_PATTERN } from "./list-source-files-Uf11_Lde.js";
|
|
4
4
|
import { n as isMonorepoRoot, r as readPackageJson, t as findMonorepoRoot } from "./find-monorepo-root-VE6uVqvK.js";
|
|
5
|
-
import { _ as VUE_FILE_PATTERN, c as listWorkspacePackages, d as ERROR_RULE_PENALTY, o as listNestedWorkspaceDirectories, p as OXLINT_NODE_REQUIREMENT, s as listWorkspaceDirectories, t as discoverProject, v as WARNING_RULE_PENALTY } from "./discover-project-
|
|
5
|
+
import { _ as VUE_FILE_PATTERN, c as listWorkspacePackages, d as ERROR_RULE_PENALTY, o as listNestedWorkspaceDirectories, p as OXLINT_NODE_REQUIREMENT, s as listWorkspaceDirectories, t as discoverProject, v as WARNING_RULE_PENALTY } from "./discover-project-JCgCRT9u.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { t as discoverProject, r as formatFrameworkName } from "./discover-project-
|
|
2
|
+
export { t as discoverProject, r as formatFrameworkName } from "./discover-project-JCgCRT9u.js";
|
|
@@ -13,7 +13,7 @@ const SPAWN_ARGS_MAX_LENGTH_CHARS = 24e3;
|
|
|
13
13
|
const DEFAULT_BRANCH_CANDIDATES = ["main", "master"];
|
|
14
14
|
const ERROR_RULE_PENALTY = 1.5;
|
|
15
15
|
const WARNING_RULE_PENALTY = .75;
|
|
16
|
-
const VERSION = "2.0.
|
|
16
|
+
const VERSION = "2.0.4";
|
|
17
17
|
const OXLINT_NODE_REQUIREMENT = "^22.12.0 || >=24.0.0";
|
|
18
18
|
// src/utils/discover-project.ts
|
|
19
19
|
const NUXT_CONFIG_FILENAMES = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as logger } from "./diagnose-
|
|
2
|
+
import { a as logger } from "./diagnose-C4vCT7pO.js";
|
|
3
3
|
import { _ as getCanonicalRuleId, f as RULE_REGISTRY, p as categorySlug } from "./baseline-B4hYcahD.js";
|
|
4
|
-
import { l as DEFAULT_BRANCH_CANDIDATES, m as SOURCE_FILE_PATTERN, u as DOCS_BASE_URL } from "./discover-project-
|
|
4
|
+
import { l as DEFAULT_BRANCH_CANDIDATES, m as SOURCE_FILE_PATTERN, u as DOCS_BASE_URL } from "./discover-project-JCgCRT9u.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as diagnose } from "./diagnose-
|
|
2
|
+
import { n as diagnose } from "./diagnose-C4vCT7pO.js";
|
|
3
3
|
import { _ as getCanonicalRuleId, f as RULE_REGISTRY } from "./baseline-B4hYcahD.js";
|
|
4
|
-
import { g as VERSION } from "./discover-project-
|
|
5
|
-
import { a as filterSourceFiles, i as toRuleInfo, o as getDiffInfo, t as findRuleMeta } from "./rules-
|
|
4
|
+
import { g as VERSION } from "./discover-project-JCgCRT9u.js";
|
|
5
|
+
import { a as filterSourceFiles, i as toRuleInfo, o as getDiffInfo, t as findRuleMeta } from "./rules-_h5qMfCs.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import readline from "node:readline";
|
|
8
8
|
// src/mcp/server.ts
|
package/package.json
CHANGED
|
@@ -1,18 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remylagerweij/vue-doctor",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"description": "Production-grade diagnostics, performance optimization, security auditing, and dead-code detection for Vue.js and Nuxt applications. Features automated codemods, CI quality gates, and AI agent integration (MCP).",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"vue",
|
|
7
|
+
"vue3",
|
|
8
|
+
"vuejs",
|
|
8
9
|
"nuxt",
|
|
10
|
+
"nuxt3",
|
|
11
|
+
"vue-doctor",
|
|
12
|
+
"linter",
|
|
13
|
+
"diagnostics",
|
|
9
14
|
"performance",
|
|
10
|
-
"
|
|
15
|
+
"security",
|
|
16
|
+
"security-audit",
|
|
17
|
+
"dead-code",
|
|
18
|
+
"unused-exports",
|
|
19
|
+
"knip",
|
|
20
|
+
"oxlint",
|
|
21
|
+
"eslint-plugin-vue",
|
|
22
|
+
"bundle-size",
|
|
23
|
+
"health-score",
|
|
24
|
+
"static-analysis",
|
|
25
|
+
"code-quality",
|
|
26
|
+
"codemod",
|
|
27
|
+
"autofix",
|
|
28
|
+
"mcp",
|
|
29
|
+
"mcp-server",
|
|
30
|
+
"ai-agents",
|
|
31
|
+
"ci-cd",
|
|
32
|
+
"github-action",
|
|
33
|
+
"reactivity",
|
|
34
|
+
"pinia",
|
|
35
|
+
"vue-router",
|
|
36
|
+
"ast"
|
|
11
37
|
],
|
|
12
|
-
"homepage": "https://github.
|
|
38
|
+
"homepage": "https://remylagerweij.github.io/vue-doctor/",
|
|
13
39
|
"bugs": {
|
|
14
40
|
"url": "https://github.com/remylagerweij/vue-doctor/issues"
|
|
15
41
|
},
|
|
42
|
+
"author": {
|
|
43
|
+
"name": "Remy Martin Lagerweij",
|
|
44
|
+
"url": "https://github.com/remylagerweij"
|
|
45
|
+
},
|
|
16
46
|
"license": "MIT",
|
|
17
47
|
"repository": {
|
|
18
48
|
"type": "git",
|