UNPKG

commitlint-config-karpo

Version:

Commitlint shareable configuration for karpo

33 lines (32 loc) 1.64 kB
module.exports = { parserPreset: 'conventional-changelog-conventionalcommits', rules: { 'body-leading-blank': [1, 'always'],//body上面要有换行 'body-max-line-length': [2, 'always', 100],//body最大长度 'footer-leading-blank': [1, 'always'],//footer上面要有换行 'footer-max-line-length': [2, 'always', 100],//body最大长度 'header-max-length': [2, 'always', 100],// header的最大长度 'scope-case': [2, 'always', 'lower-case'],//scope小写 'subject-case': [0],// 'subject-empty': [2, 'never'],// subject不能为空 'subject-full-stop': [2, 'never', '.'],//subject不能已.结束 'type-case': [2, 'always', 'lower-case'],// type小写 'type-empty': [2, 'never'],// type不能为空 'type-enum': [// type类型 2, 'always', [ 'feat',// 新增一个新特性 'fix',// 默默修了一个 Bug 'docs',// 更新了文档(比如改了 Readme) 'style', // 代码的样式美化,不涉及到功能修改(比如改了缩进) 'test', // 新增或者修改已有的测试代码 'refactor', // 一些代码结构上优化,既不是新特性也不是修 Bug(比如函数改个名字) 'chore', // 跟仓库主要业务无关的构建/工程依赖/工具等功能改动(比如新增一个文档生成工具) 'ci', // ci相关 'revert', // 代码回退 "perf", // 改善性能 ], ], }, };