Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese scopes cause error #399

Closed
2 of 4 tasks
miadwang opened this issue Jul 25, 2018 · 4 comments
Closed
2 of 4 tasks

Chinese scopes cause error #399

miadwang opened this issue Jul 25, 2018 · 4 comments

Comments

@miadwang
Copy link

miadwang commented Jul 25, 2018

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
@marionebl
Copy link
Contributor

Investigating if this is related to #445, #341

@marionebl
Copy link
Contributor

marionebl commented Nov 25, 2018

#496

marionebl added a commit that referenced this issue Nov 30, 2018
marionebl added a commit that referenced this issue Nov 30, 2018
#496)

* fix: fall back to conventional commit-parser settings for missing keys

BREAKING CHANGE
This potentially changes implicit commitlint behaviour users may
have relied on in earlier versions. Instead of falling back to the
builtin commit-parser defaults we now default all keys to
conventional-changelog-angular.

* test: add case for #399

* chore: update yarn.lock

* test: sort result lists
@armano2
Copy link
Contributor

armano2 commented Jan 16, 2021

@escapedcat tested against master, and issue seem to be fixed

@escapedcat
Copy link
Member

@miadwang closing this for now. Please reopen if you have issues with this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants