Add root CLAUDE.md, docs/, LESSONS.md, .env.example, .claude/settings.json hooks (syntax-check on edit and on stop), and CI workflows (lint via node --check, and a VERSION-based semver bump) for this plain-JS, no-build Chrome extension. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
26 lines
635 B
JSON
26 lines
635 B
JSON
{
|
|
"hooks": {
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "file=$(cat | python3 -c 'import json,sys; print(json.load(sys.stdin).get(\"tool_input\",{}).get(\"file_path\",\"\"))'); case \"$file\" in *.js) node --check \"$file\" ;; esac"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "cd \"$CLAUDE_PROJECT_DIR\" && find . -name '*.js' -not -path './.git/*' -print0 | xargs -0 -n1 node --check"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|