From c5d11441bcea97711d8ac27be43f1e011c404a3a Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 13 Jan 2024 22:13:15 +0800 Subject: [PATCH] build(deps-dev): install `husky` and `commitlint` locally Signed-off-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com> --- .husky/commit-msg | 2 +- package.json | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 4037788..7f23494 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx --no -- commitlint -x $(npm root -g)/@commitlint/config-conventional --edit +npx --no -- commitlint --edit ${1} diff --git a/package.json b/package.json index b461b64..334a506 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,11 @@ "@babel/core": "^7.23.7", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/preset-env": "^7.23.7", + "@commitlint/cli": "^18.4.4", + "@commitlint/config-conventional": "^18.4.4", "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-terser": "^0.4.4", + "husky": "^8.0.3", "rimraf": "^5.0.5", "rollup": "^4.9.2", "rollup-plugin-license": "^3.2.0", @@ -41,6 +44,9 @@ "not dead" ], "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ], "rules": { "body-max-line-length": [ 0,