From 57fcedda0f5146fb9feeea8db2a4c6f822c138ce Mon Sep 17 00:00:00 2001 From: Anthony McLin Date: Mon, 22 Feb 2021 14:40:12 -0800 Subject: [PATCH] fix(deps): adopt Husky 5 syntax for automating checks --- .husky/.gitignore | 1 + .husky/commit-msg | 1 + .husky/pre-commit | 1 + .husky/pre-push | 1 + package.json | 8 +------- 5 files changed, 5 insertions(+), 7 deletions(-) create mode 100755 .husky/.gitignore create mode 100755 .husky/commit-msg create mode 100755 .husky/pre-commit create mode 100755 .husky/pre-push diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100755 index 0000000..c9cdc63 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ \ No newline at end of file diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..d468455 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +npx --no-install commitlint --edit $1 \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..18de984 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm test \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..18de984 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1 @@ +npm test \ No newline at end of file diff --git a/package.json b/package.json index f4b1928..fe38a0b 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ }, "scripts": { "preinstall": "mvn -v", + "postinstall": "husky install", "pretest": "npm run lint", "test": "nyc mocha", "lint": "run-p lint:*", @@ -71,13 +72,6 @@ "remark-preset-lint-recommended" ] }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "npm test", - "pre-push": "npm test" - } - }, "commitlint": { "extends": [ "@commitlint/config-angular"