@gsc-basic/commitlint-config
v1.0.4
Published
Commitlint config for GSC Basic Team
Downloads
72
Readme
@gsc-basic/commitlint-config
Commitlint Config for GSC Basic Team
DO NOT use it in your own project if you don't know what it's for
说明
Git commit内容检查工具,建议配合 husky 、 simple-git-hooks 等Git hooks tool
使用。
使用
pnpm i @gsc-basic/commitlint-config husky -D
// commitlint.config.mjs
export { default } from '@gsc-basic/commitlint-config';
// package.json
{
"scripts": {
"prepare": "husky"
}
}
将依赖项提升到根模块目录
# .npmrc
public-hoist-pattern[]=@commitlint/*
添加Hook
husky使用文档参考:https://typicode.github.io/husky/
pnpm exec husky init
# .husky\commit-msg
echo Start running commit-msg hook...
pnpm exec commitlint --edit $1
echo Run commit-msg hook done.