Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ if [ -f "payloads/package.json" ]; then

# Run ESLint
echo "🔍 Running ESLint..."
if ! npm run lint; then
echo "❌ ESLint found issues. Run 'npm run lint:fix' to fix automatically or fix manually."
if ! pnpm run lint; then
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cuz we moved everything to pnpm

echo "❌ ESLint found issues. Run 'pnpm run lint:fix' to fix automatically or fix manually."
exit 1
fi

# Run Prettier check
echo "🎨 Checking code formatting..."
if ! npm run format:check; then
if ! pnpm run format:check; then
echo "❌ Code formatting issues found."
echo "💡 Running Prettier to fix formatting..."
npm run format
pnpm run format
cd ..
echo "❌ Files were formatted by Prettier."
echo "💡 Please re-add the formatted files and commit again:"
Expand All @@ -57,7 +57,7 @@ if [ -f "payloads/package.json" ]; then

# Run TypeScript type checking
echo "🔍 Running TypeScript type check..."
if ! npm run typecheck; then
if ! pnpm run typecheck; then
echo "❌ TypeScript type errors found. Please fix before committing."
exit 1
fi
Expand Down
Loading
Loading