commitlint.config.js 680 Bytes
module.exports = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [
      2,
      'always',
      [
        'build', // 修改项目构建系统
        'chore', // 改变构建流程、或者增加依赖库、工具等
        'ci', // 修改项目继续集成流程
        'docs', // 文档更新
        'feat', // 新增功能
        'fix', // 修复BUG
        'perf', // 性能体验优化
        'refactor', // 重构代码
        'revert', // 回滚某个更早之前的提交
        'style', // 格式方面的优化
        'test', // 新增测试用例或是更新现有测试
        'merge', // 分支合并
      ],
    ],
  },
};