@geoql/vue-doctor

中文文档
1.9.0发布于 2026/11/04MITTypeScriptES Module构建来源已验证近 30 天下载 2923

Vue 3应用程序的CLI审计员. 通过@vue/compiller-sfc + oxlint 侦测出反标、AI-slop 和最佳实践违规行为。 运行 npx -y @geoql/vue-doctor。 。 。 .

中文使用文档
文档目录9 节
  1. 安装
  2. 使用量
  3. 选项
  4. 子命令
  5. 退出代码
  6. 规则
  7. 范围
  8. 建筑
  9. 许可证

@geoql/vue-doctor

你的经纪人写坏Vue。 这个接住它.

Vue 3应用程序的CLI审计员. 它运行混合扫描:模板-AST通过 @vue/compiler-sfc 加一个脚本通过 oxlint (原产地) vue 插件和医生JS规则),然后将结果合并为定分0-100分. 用于捕捉反间谍,AI-slop,以及最佳做法的违反者,尤其是编码人员留下的人.

安装

# one-off, no install
npx -y @geoql/vue-doctor

# or add it
npm i @geoql/vue-doctor

发表于 无 财务报告和审定财务报表 日 尔 与出处.

使用量

vue-doctor [path] [options]

path 默认为当前目录。 默认输出格式为 agent (compact,为LLM消耗而建),不是动词人类报告.

# Audit ./src and print the agent report
vue-doctor ./src

# Human-readable output, fail the build on warnings
vue-doctor --format pretty --fail-on warn

# Machine-readable, only files changed vs HEAD, write to a file
vue-doctor --json --diff --output report.json

# Just the score, for piping into a gate
vue-doctor --score

选项

旗帜说明
--format <kind>输出格式 : agent (违约), pretty, (中文(简体) ), json, (中文(简体) ), json-compact, (中文(简体) ), sarif, (中文(简体) ), html。 。 。 .
--json简指 --format json。 。 。 .
--json-compact单行JSON.
--config <path>路径 doctor.config.ts。 。 。 .
--preset <name>基础预设 : minimal, (中文(简体) ), recommended, (中文(简体) ), strict, (中文(简体) ), all。 。 。 .
--fail-on <level>在此严重或更严重时退出非零: error (违约), warn, (中文(简体) ), none。 。 。 .
--quiet只显示总结.
--verbose将时间和诊断结果 逐一释放出来.
--no-color禁用彩色输出 .
--rule <id:level>超越一条规则,可重复. 级别 : error, (中文(简体) ), warn, (中文(简体) ), info, (中文(简体) ), off例如. --rule vue-doctor/no-em-dash-in-string:off。 。 。 .
--include <glob>要包含的文件的覆盖, 可重复 .
--exclude <glob>模糊文件以排除,可重复.
--no-dead-code跳过死码(knip)分析通关.
--no-lint跳过通关( template / SFC / oxlint).
--no-respect-inline-disables甚至在内部的表面发现 doctor-disable 评论.
--threshold <n>最小通过分数,整数 0– 说吧 –100。 。 。 .
--score只打印出数字分数,用于管道.
--push审核后,POST私隐向SaaS披露了调查结果. 要求数 --api-key可忽略 --no-push。 。 。 .
--no-push跳过 SaaS 推( 默认) .
--push-url <url>终止点 --push (默认 : https://app.the-doctor.report/api/v1/findings) (中文(简体) ).
--api-key <key>API 用于 SaaS 的密钥,作为 x-api-key 头曰.
--annotations释放 GitHub 动作 ::error:: 编号 : ::warning:: 线条.
--ci自动允许的CI行为(GitHub Actions上的注释).
--no-ci禁用 CI 自动检测, 即使设置了 CI 内存 .
--diff仅报告文件中的发现已更改 .
--staged只报告已存档的发现 .
--full强制进行完整的扫描, 覆盖 --diff 编号 : --staged。 。 。 .
--output <file>将报告写入文件而不是 stdout .

严重性是 error | warn | info 到处都是. --diff编号 :--staged, (中文(简体) ), --verbose编号 :--quiet,以及 --score编号 :--json 两者相互排斥.

子命令

命令说明
list-rules列出所有注册规则,并列出编号、严重程度、类别、来源和预设成员。 过滤器 : --preset <recommended|all>, (中文(简体) ), --category <name>, (中文(简体) ), --source <doctor|oxlint-builtin|eslint-plugin-vue>, (中文(简体) ), --severity <error|warn|info>, (中文(简体) ), --json, (中文(简体) ), --json-compact。 。 。 .
explain <ruleId>打印规则的严厉性,类别,推荐,帮助 URL. --json 用于结构化输出.
inspect [dir]打印检测到的项目能力 医生用于门规则. --json 编号 : --json-compact。 。 。 .
vue-doctor list-rules --category ai-slop
vue-doctor explain vue-doctor/no-em-dash-in-string
vue-doctor inspect --json

退出代码

代码含义
0干净, 或得分在/ 以上 --threshold 和无结果 --fail-on。 。 。 .
1调查结果 --fail-on 级别( 默认 ): error),或以下的分数 --threshold。 。 。 .
2配置错误或扫描失败 .

规则

vue-doctor 船舶 ~24 Vue规则加克林特的本地人 vue 内置,按类别分类: ai-slop, (中文(简体) ), reactivity, (中文(简体) ), composition, (中文(简体) ), performance, (中文(简体) ), template, (中文(简体) ), template-perf, (中文(简体) ), build-quality, (中文(简体) ), deps, (中文(简体) ), sfc,以及 dead-code运行 vue-doctor list-rules 为现场名单。 大部分都在电视上 recommended 预设.

范围

仅存Vue 3. Nuxt 4 项目, 使用 @geoql/nuxt-doctor,哪个层 Nuxt 规则在本集之上.

建筑

见 docs/SPEC.md 第10条.

许可证

麻省理工学院

版本与发布记录

@geoql/vue-doctor 共发布 28 个版本,首次发布于 2026/05/29;过去 12 个月发布了 28 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.9.0latest2026/11/0411 天前
1.8.02026/11/0412 天前
1.7.42026/11/0412 天前
1.7.32026/10/2818 天前
1.7.22026/09/122 个月前
1.7.12026/07/283 个月前

其他发布通道:alpha → 0.2.0-alpha.0。

关于 @geoql/vue-doctor 的常见问题

@geoql/vue-doctor 是什么?

Vue 3应用程序的CLI审计员. 通过@vue/compiller-sfc + oxlint 侦测出反标、AI-slop 和最佳实践违规行为。 运行 npx -y @geoql/vue-doctor。 。 。 .

如何安装 @geoql/vue-doctor?

在项目目录运行 npm install @geoql/vue-doctor,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 vue-doctor,可以用 npx vue-doctor 直接运行。

@geoql/vue-doctor 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@geoql/vue-doctor 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@geoql/vue-doctor 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@geoql/vue-doctor 可以商用吗?

@geoql/vue-doctor 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@geoql/vue-doctor 的下载量有多少?

根据 npm 官方下载统计,@geoql/vue-doctor 在 2026/10/16 – 2026/11/14 这 30 天内被下载 2,923 次,日均约 97 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@geoql/vue-doctor 还在维护吗?

最新版本 1.9.0 发布于 2026/11/04(11 天前);至今共发布 28 个版本,其中过去 12 个月发布了 28 个;首次发布于 2026/05/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。