mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Moved linting check to pre-push git hook
refs 81cd5fac7e
- While developing locally it's common to commit small WIP changes which might contain linting errors. Having the check done once on a pre-push phase gives enoght protection from pushing out broken code and reduces frustration when developing locally
This commit is contained in:
parent
81cd5fac7e
commit
002cf5b0eb
2 changed files with 12 additions and 11 deletions
11
.github/hooks/pre-commit
vendored
11
.github/hooks/pre-commit
vendored
|
@ -1,15 +1,4 @@
|
|||
#!/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'
|
||||
|
|
12
.github/hooks/pre-push
vendored
Normal file
12
.github/hooks/pre-push
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
yarn lint
|
||||
lintStatus=$?
|
||||
|
||||
if [ $lintStatus -eq 0 ]
|
||||
then
|
||||
echo "linting succeeded"
|
||||
exit 0
|
||||
else
|
||||
echo "linting failed"
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Reference in a new issue