0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Added linting check to a pre-commit hook

refs 648530009d

- Naz has broken the main too many times - it's time to stop the atrocities.
- Having a lint check as a pre-commit hook will make it really hard commiting code with linting errors
This commit is contained in:
Naz 2022-05-05 21:21:48 +08:00
parent a22879824b
commit 81cd5fac7e

View file

@ -1,4 +1,15 @@
#!/bin/bash
yarn lint
lintStatus=$?
if [ $lintStatus -eq 0 ]
then
echo "linting succeeded"
else
echo "linting failed"
exit 1
fi
# Modified from https://github.com/chaitanyagupta/gitutils
green='\033[0;32m'