Skip to content

Chinese scopes cause error #399

@miadwang

Description

@miadwang

Expected Behavior

Chinese scopes acceptable

Current Behavior

Chinese scopes cause error

husky > npm run -s commitmsg (node v9.8.0)

⧗ input:
fix(面试评价): 测试

✖ message may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings

husky > commit-msg hook failed (add --no-verify to bypass)

If scope is English, e.g.: fix(english): 测试, lint will pass

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Steps to Reproduce (for bugs)

commitlint.config.js
module.exports = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [2, 'always', [
      'feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert',
    ]],
    'scope-enum': [2, 'always', [
      '面试评价', '需求审批', '简历筛选',
    ]],
    'scope-case': [0],
    'subject-case': [0],
  },
};

Context

Your Environment

Executable Version
commitlint --version 6.2.0
git --version 2.15.2
node --version 9.8.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions