echo "Running pre-commit checks..." # Run ESLint echo "Running ESLint..." npm run lint || { echo "❌ ESLint check failed. Please fix the errors and try committing again." exit 1 } # Run Prettier echo "Running Prettier..." npm run format || { echo "❌ Prettier check failed. Run 'npm run format:fix' to automatically fix formatting issues." exit 1 } echo "✅ All checks passed!"