Skip to content

Commit

Permalink
fix: Precommit hook failing on initial commit without NX graph genera…
Browse files Browse the repository at this point in the history
…ted (#456)
  • Loading branch information
mkleszcz committed Feb 6, 2024
1 parent 2cbc5dd commit 9bad656
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .husky/pre-commit
Expand Up @@ -4,6 +4,11 @@

. "$(dirname "$0")/_/husky.sh"

# Fix issue with @nx/enforce-module-boundaries eslint plugin throwing error without nx graph
if [ ! -d "$(dirname "$0")/../.nx" ]; then
pnpm nx show projects 1> /dev/null
fi

echo "🚀 Running pre-commit tasks 🚀"
npx lint-staged --allow-empty
echo "🏁 Finished pre-commit tasks 🏁"

0 comments on commit 9bad656

Please sign in to comment.