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"