diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000000..e8511eaeaf --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit $1 diff --git a/package.json b/package.json index 4289452218..f419ad4f83 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "scripts": { "clean": "lerna run clean", "postinstall": "npm run bootstrap", + "prepare": "husky install", "precompile": "tsc --version && lerna run version", "version:update": "lerna run version:update", "compile": "lerna run compile", @@ -54,16 +55,11 @@ "eslint-plugin-header": "3.1.1", "eslint-plugin-import": "2.23.4", "gts": "3.1.0", - "husky": "7.0.1", + "husky": "7.0.4", "lerna": "3.22.1", "lerna-changelog": "1.0.1", "typescript": "4.3.5" }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" - } - }, "changelog": { "labels": { "breaking": ":boom: Breaking Change",