From fec7579e00476c381ea4e0e548b222884c91d2b1 Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Tue, 3 Dec 2024 18:51:29 +0530 Subject: [PATCH] added nvm support for husky --- .husky/pre-commit | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 12d3b19..05fe9ee 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,6 +2,9 @@ echo "🔍 Running pre-commit hook to check the code looks good... 🔍" +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # Load nvm if you're using i + if ! pnpm typecheck; then echo "❌ Type checking failed! Please review TypeScript types." echo "Once you're done, don't forget to add your changes to the commit! 🚀"