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..."
npx lint-staged --verbose || {
     echo "❌ Prettier failed. Please fix the errors and try committing again."
     exit 1
 }

echo "✅ All checks passed!"
