test: add husky hook for commitlint

This commit is contained in:
Christopher Willis-Ford 2022-05-20 16:24:00 -07:00
parent ccc599d078
commit 5d50d80ecf
4 changed files with 29 additions and 0 deletions

1
.husky/.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
* text eol=lf

4
.husky/commit-msg Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx --no-install commitlint --edit $1

22
package-lock.json generated
View file

@ -21,6 +21,7 @@
"@commitlint/config-conventional": "^17.0.0",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "^3.0.2",
"husky": "^8.0.1",
"semantic-release": "^15.13.31"
},
"peerDependencies": {
@ -2511,6 +2512,21 @@
"node": ">=8.12.0"
}
},
"node_modules/husky": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz",
"integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==",
"dev": true,
"bin": {
"husky": "lib/bin.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@ -11083,6 +11099,12 @@
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw=="
},
"husky": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz",
"integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==",
"dev": true
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",

View file

@ -8,6 +8,7 @@
],
"scripts": {
"commit": "git-cz",
"prepare": "husky install",
"test": ""
},
"publishConfig": {
@ -53,6 +54,7 @@
"@commitlint/config-conventional": "^17.0.0",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "^3.0.2",
"husky": "^8.0.1",
"semantic-release": "^15.13.31"
}
}