Dwinzo_dev/app/.husky/pre-commit

26 lines
531 B
Plaintext
Raw Normal View History

2025-03-25 06:17:41 +00:00
#!/usr/bin/env bash
echo "Running pre-commit hook..."
# Compile TypeScript
echo "Compiling TypeScript..."
npx tsc scripts/validate-filenames.ts
# if [ $? -ne 0 ]; then
# echo "TypeScript compilation failed. Aborting commit."
# exit 1
# fi
echo "TypeScript compilation successful."
# Run Node.js script
echo "Running Node.js script..."
node scripts/validate-filenames.js --no-prompt
if [ $? -ne 0 ]; then
echo "Node.js script failed. Aborting commit."
exit 1
fi
echo "Pre-commit hook completed successfully."