Vercel Doctor

CLIリファレンス

Vercel Doctorの全コマンドラインオプションとフラグ。

使用方法

npx -y vercel-doctor@latest [directory] [options]

directory 引数はデフォルトで .(カレントディレクトリ)です。

オプション

FlagDescription
-v, --versionDisplay the current version
--no-lintSkip billing lint rules
--no-dead-codeSkip dead code detection (Knip)
--verboseShow file paths and line numbers per rule
--scoreOutput only the numeric score (useful for CI)
-y, --yesSkip interactive prompts, scan all workspace projects
--project <name>Select specific workspace project(s), comma-separated
--diff [base]Scan only files changed vs the base branch
--offlineSkip anonymous telemetry used for score calculation

カレントディレクトリをスキャンする

npx -y vercel-doctor@latest .

詳細出力でスキャンする

npx -y vercel-doctor@latest . --verbose

各診断の影響ファイルと行番号を表示します。

変更されたファイルのみをスキャンする

npx -y vercel-doctor@latest . --diff

ベースブランチを自動検出します。ベースを固定する場合:

npx -y vercel-doctor@latest . --diff main

特定のワークスペースプロジェクトをスキャンする

npx -y vercel-doctor@latest . --project web

複数プロジェクトの場合:

npx -y vercel-doctor@latest . --project web,api

Dead code検出をスキップする

npx -y vercel-doctor@latest . --no-dead-code

CIでの使用

npx -y vercel-doctor@latest . --yes --score

--yes フラグでインタラクティブプロンプトをスキップします。--score と組み合わせると、スクリプトやパイプライン用に数値スコアのみを出力します。

プログラムAPI

Vercel Doctorは programmatic API もエクスポートしています:

import { run } from "vercel-doctor/api";

Oxlint Plugin

billing lint ルールはスタンドアロンの Oxlint プラグインとして利用できます:

import plugin from "vercel-doctor/oxlint-plugin";
Edit on GitHub

Last updated on

On this page