{ "hooks": { "PostToolUse": [ { "matcher": "Write|Edit|MultiEdit", "hooks": [ { "type": "command", "command": "python3 -c \"import sys,json; d=json.load(sys.stdin); f=d.get('tool_input',{}).get('file_path',''); print(f)\" | xargs -I{} sh -c 'case \"{}\" in *.ts|*.tsx) npm run lint:path -- \"{}\" 2>&1 ;; esac'" } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "npm run typecheck 2>&1" } ] } ] } }