npm i --save-dev husky @commitlint/cli @commitlint/config-conventionalnpm
npx husky installjson
會出現 .husky 文件markdown
.husky 會出現 commit-msg 文件 spa
module.exports = {
extends: ['@commitlint/config-conventional']
}
複製代碼
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn commitlint --edit $1
複製代碼