Hook

Post-Edit Lint Hook

Auto-run lint/typecheck after every file write.

安裝

manual
add to ~/.claude/settings.json hooks.PostToolUse

把這段加入 Claude Code MCP 設定,或直接透過 CLI 執行。

介紹

PostToolUse hook on Edit/Write. Auto-detects file type (TS / Vue / Dart / PHP / Java) and runs the matching linter. Returns blocking diagnostics if errors > 0.

常見使用情境

  • Catch type errors before commit
  • Stop forgotten unused imports
  • Enforce per-stack lint rules

標籤

lintqualityautomation