Replies: 2 comments
-
Not sure if that's your question, but yes simply add multiple commands:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I do the following: Folder structure:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# Check Prettier standards
npm.cmd run check-format ||
(
echo "[🌸 Prettier]: Your styling looks disgusting 🤢🤮
Run 'pnpm format', add changes and try to commit again.";
false;
)
# Check ESLint Standards
npm.cmd run check-lint ||
(
echo "[🧿 ESLint]: ESLint check failed 😤😤
Make the required changes listed above, add changes and try to commit again."
false;
)
# Check tsconfig standards
npm.cmd run check-types ||
(
echo "[🧪 TypeScript]: Failed type check ❌❌❌
Make the changes required above."
false;
)
# If everything passes... Now we can commit
echo '✅✅ You win this time... I am committing this now. ✅✅' |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Is it possible to run more than one pre-commit hooks and run them one after the other?
I didn't see an example in the documentation and I was wondering if that's possible and how!
Many thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions