2022-03-13 00:36:57 +08:00
|
|
|
commitlint_init() {
|
2022-11-22 16:53:26 +08:00
|
|
|
yarn add husky @commitlint/{config-conventional,cli} -D -W
|
2022-03-13 00:36:57 +08:00
|
|
|
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
|
|
|
|
yarn husky install
|
|
|
|
yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'
|
|
|
|
}
|