diff --git a/.husky/pre-commit b/.husky/pre-commit index e64a065..eef1262 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 56022a6..7d16277 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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