Files
gh-jwplatta-prompt-library-…/hooks/type-check-on-edit.json
2025-11-30 08:30:02 +08:00

7 lines
301 B
JSON

{
"event": "PostToolUse",
"tool": "Edit",
"pattern": "**/*.{ts,tsx}",
"command": "bash -c 'cd \"$(dirname \"$FILE_PATH\")\" && while [ ! -f tsconfig.json ] && [ \"$(pwd)\" != \"/\" ]; do cd ..; done; if [ -f tsconfig.json ]; then npx tsc --noEmit 2>&1 || echo \"Type errors detected\"; fi'"
}