learning_ai_common_plat/.husky/pre-commit

17 lines
457 B
Bash
Executable File

#!/usr/bin/env sh
# Check if Husky is disabled via environment variable
if [ "$HUSKY_ENABLED" = "false" ]; then
echo "⚠️ Husky disabled via HUSKY_ENABLED=false"
echo "💡 To re-enable: unset HUSKY_ENABLED or export HUSKY_ENABLED=true"
exit 0
fi
echo "🔐 Scanning staged changes for secrets..."
bash scripts/secret-scan-staged.sh
echo "🐶 Running pre-commit hooks for common platform..."
# Run lint-staged on staged files
npx lint-staged