Run pre-commit via husky hook
This commit is contained in:
parent
a06ed05011
commit
18985caab8
@ -4,5 +4,25 @@
|
||||
npm run format
|
||||
npm run lint
|
||||
|
||||
# THIS PART is generated by pre-commit: https://pre-commit.com
|
||||
|
||||
# start templated
|
||||
INSTALL_PYTHON=/usr/bin/python
|
||||
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-commit)
|
||||
# end templated
|
||||
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
ARGS+=(--hook-dir "$HERE" -- "$@")
|
||||
|
||||
if [ -x "$INSTALL_PYTHON" ]; then
|
||||
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
|
||||
elif command -v pre-commit > /dev/null; then
|
||||
exec pre-commit "${ARGS[@]}"
|
||||
else
|
||||
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2
|
||||
exit 1
|
||||
fi
|
||||
### End of pre-commit py part
|
||||
|
||||
npm test
|
||||
npm run compile
|
||||
|
||||
@ -11,7 +11,6 @@ repos:
|
||||
- id: check-json
|
||||
- id: check-merge-conflict
|
||||
- id: check-symlinks
|
||||
- id: check-xml
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: fix-byte-order-marker
|
||||
|
||||
Loading…
Reference in New Issue
Block a user