Add pre-commit check for private registry URLs in package-lock.json (#133)

Same check as in CI to catch issues before push.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Olivier Chafik 2025-12-16 13:41:50 +00:00 • committed by GitHub
commit 7a5bf9c7f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,10 @@
# Verify no private registry URLs in package-lock.json
if grep -E '"resolved": "https?://' package-lock.json | grep -v registry.npmjs.org > /dev/null; then
echo "ERROR: package-lock.json contains non-npmjs.org URLs"
echo "Run: docker run --rm -i -v \$PWD:/src -w /src node:latest npm i --registry=https://registry.npmjs.org/"
exit 1
fi
npm run build:all
npm run prettier:fix