Files
dasemuandClaude Sonnet 5 d6598d0b31 chore: bootstrap Claude setup
Add root CLAUDE.md, docs/architecture.md, LESSONS.md, .env.example,
.claude/settings.json hooks (PostToolUse JS syntax check, Stop hook
validating manifest.json + node --check on all JS), and GitHub
Actions workflows (ci.yml, version.yml) for this plain-JS Chrome
extension with no existing build/lint/test tooling.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-18 15:02:43 +02:00

18 lines
514 B
Bash
Executable File

#!/usr/bin/env bash
# Stop hook: quickest meaningful check available in this project.
# No test runner or linter is configured yet, so this validates:
# 1. manifest.json is valid JSON.
# 2. every tracked .js file passes `node --check` (syntax only).
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
node -e "JSON.parse(require('fs').readFileSync('manifest.json', 'utf8'))"
status=0
while IFS= read -r -d '' file; do
node --check "$file" || status=1
done < <(git ls-files -z '*.js')
exit "$status"