Add root CLAUDE.md, docs/architecture.md, LESSONS.md, .env.example, VERSION, .claude/settings.json hooks (syntax/JSON checks since no linter/tests exist yet), and CI/version-bump GitHub workflows. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
19 lines
585 B
Bash
Executable File
19 lines
585 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Stop hook: quickest meaningful check for this repo. No test suite and no
|
|
# linter are configured, so this syntax-checks every tracked JS file and
|
|
# validates every tracked JSON file. Fails (blocking) on the first error.
|
|
set -euo pipefail
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
|
|
status=0
|
|
|
|
while IFS= read -r -d '' f; do
|
|
node --check "$f" || status=1
|
|
done < <(git ls-files -z -- '*.js')
|
|
|
|
while IFS= read -r -d '' f; do
|
|
node -e "JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8'))" "$f" || status=1
|
|
done < <(git ls-files -z -- '*.json')
|
|
|
|
exit $status
|