feat: commitlint init script

This commit is contained in:
hophacker 2022-03-13 00:36:57 +08:00
parent f517327441
commit 845ad44b2d

6
zsh/commitlint.zsh Normal file
View File

@ -0,0 +1,6 @@
commitlint_init() {
yarn add husky @commitlint/{config-conventional,cli} -D
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
yarn husky install
yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'
}