conventional-changelog/commitlint

chinese in type-enums

Open

#2,674 opened on Jul 12, 2021

View on GitHub
 (2 comments) (0 reactions) (0 assignees)TypeScript (896 forks)batch import
bughelp wanted

Repository metrics

Stars
 (15,497 stars)
PR merge metrics
 (Avg merge 12h 56m) (52 merged PRs in 30d)

Description

Expected Behavior

{
    extends: ['@commitlint/config-conventional'],
    rules: {
      'type-case': [0, 'never'],
      'subject-case': [0, 'never'],
      'type-enum': [
        2,
        'always',
        [
          'build', // 构建
          'ci', // ci
          'chore', // 改变构建流程、或者增加依赖库、工具等
          'docs', // 仅仅修改了文档,比如README, CHANGELOG, CONTRIBUTE等等
          'feat', // 新增feature
          'fix', // 修复bug
          'perf', // 优化相关,比如提升性能、体验
          'refactor', // 代码重构,没有加新功能或者修复bug
          'revert', // 回滚到上一个版本
          'style', //  仅仅修改了空格、格式缩进、逗号等等,不改变代码逻辑
          'test', // 测试用例,包括单元测试、集成测试等
          '构建', // 构建
          '集成', // ci
          '架构', // 改变构建流程、或者增加依赖库、工具等
          '文档', // 仅仅修改了文档,比如README, CHANGELOG, CONTRIBUTE等等
          '功能', // 新增feature
          '修复', // 修复bug
          '优化', // 优化相关,比如提升性能、体验
          '重构', // 代码重构,没有加新功能或者修复bug
          '回滚', // 回滚到上一个版本
          '美化', //  仅仅修改了空格、格式缩进、逗号等等,不改变代码逻辑
          '测试' // 测试用例,包括单元测试、集成测试等
        ]
      ]
    }
   }

echo "功能: new feature" | commitlint output: success

Current Behavior

⧗ input: 功能: new feature ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty]

Contributor guide