mirror of
https://github.com/Dasemu/Phenocheck.git
synced 2026-11-27 15:56:41 +00:00
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>
18 lines
514 B
Bash
Executable File
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"
|