#!/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"