mirror of
https://github.com/Dasemu/chatgpt-imagegen-mcp.git
synced 2026-11-27 07:46:33 +00:00
Add .claude/settings.json hooks (typecheck on edited .ts files, guard on package-lock.json edits, Stop runs typecheck + test), CI workflow (typecheck + test on PRs/pushes to development/main), and a version bump workflow keyed off package.json. Restructure CLAUDE.md to match the standard section order (Overview, Commands, Architecture, Conventions, Workflow quirks, Deployment, Gotchas); docs/, LESSONS.md and .env.example were already present and in sync. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
37 lines
961 B
JSON
37 lines
961 B
JSON
{
|
|
"hooks": {
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "f=$(jq -r '.tool_input.file_path // empty'); case \"$f\" in *package-lock.json) echo 'package-lock.json is managed by npm; run npm install instead of editing it directly' >&2; exit 2 ;; esac"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "f=$(jq -r '.tool_input.file_path // empty'); case \"$f\" in *.ts) cd \"$CLAUDE_PROJECT_DIR\" && npm run typecheck --silent >&2 || exit 2 ;; esac"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "cd \"$CLAUDE_PROJECT_DIR\" && { npm run typecheck --silent && npm test; } >&2 || exit 2"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|