mirror of
https://github.com/harivansh-afk/asap.it.git
synced 2026-04-15 07:04:44 +00:00
first commit
This commit is contained in:
commit
1cdbffff09
200 changed files with 30007 additions and 0 deletions
26
.husky/pre-commit
Normal file
26
.husky/pre-commit
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
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
|
||||
|
||||
echo "Running typecheck..."
|
||||
which pnpm
|
||||
|
||||
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! 🚀"
|
||||
echo "Typecheck exit code: $?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Running lint..."
|
||||
if ! pnpm lint; then
|
||||
echo "❌ Linting failed! 'pnpm lint:fix' will help you fix the easy ones."
|
||||
echo "Once you're done, don't forget to add your beautification to the commit! 🤩"
|
||||
echo "lint exit code: $?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "👍 All good! Committing changes..."
|
||||
Loading…
Add table
Add a link
Reference in a new issue