zov-tech/.claude/settings.json
wasrusgen 2479ac05cf chore: add Claude Code PostToolUse syntax-check hook
.claude/settings.json — hook fires after every Edit/Write:
- .js files  → node --check
- .py files  → py_compile.compile (doraise=True)
- exit 2 on failure → Claude sees the error immediately and fixes it

Scripts:
- .claude/hooks/syntax_check.ps1  (Windows, primary)
- .claude/hooks/syntax_check.sh   (bash fallback)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 11:01:34 +03:00

16 lines
276 B
JSON

{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "powershell -NonInteractive -File \".claude\\hooks\\syntax_check.ps1\""
}
]
}
]
}
}