Package Exports
- commitlint-config-conform
- commitlint-config-conform/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (commitlint-config-conform) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
commitlint-config-conform
conform Git 规范
支持配套的 commitlint 配置,用于对 git commit message 进行校验。
安装
使用时,需要安装 @commitlint/cli:
npm install commitlint-config-conform @commitlint/cli --save-dev使用
在 commitlint.config.js 中集成本包:
module.exports = {
extends: ['conform'],
};设置 git hook
可通过 husky 设置在 git commit 时触发 commitlint。
首先安装 husky:
npm install husky --save-dev然后执行添加commit-msg:
npx husky add .husky/commit-msg 'npx commitlint --edit $1'更多信息可参考 commitlint 文档。