check-npm-package-scopes.sh 336 B

1234567891011
  1. #!/usr/bin/env bash
  2. # This script checks to ensure that all our NPM packages have an appropriate scope.
  3. #
  4. git ls-files | grep "package.json" | xargs grep -s "\"name\":" | egrep -v '@certusone/|@wormhole-foundation/'
  5. if [ $? -eq 0 ]; then
  6. echo "[!] Unscoped npm packages" >&2
  7. exit 1
  8. else
  9. echo "[+] No unscoped npm packages"
  10. fi