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:
parent
a22879824b
commit
81cd5fac7e
1 changed files with 11 additions and 0 deletions
11
.github/hooks/pre-commit
vendored
11
.github/hooks/pre-commit
vendored
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue