-
Notifications
You must be signed in to change notification settings - Fork 949
Closed
Labels
Description
Expected Behavior
Allow multiple values in scope-case
Current Behavior
Throw an error when try to commit
husky > npm run -s commitmsg (node v8.11.1)
D:\Projetos\Git\inovafarma\node_modules\@commitlint\cli\lib\cli.js:70
throw err;
^
TypeError: ensure-case: Unknown target case "lower-case,camel-case"
at toCase (D:\Projetos\Git\inovafarma\node_modules\@commitlint\ensure\lib\case.js:73:10)
at Object.ensureCase as case
at exports.default (D:\Projetos\Git\inovafarma\node_modules\@commitlint\rules\lib\scope-case.js:29:26)
at D:\Projetos\Git\inovafarma\node_modules\@commitlint\lint\lib\index.js:136:18
at Array.map (<anonymous>)
at D:\Projetos\Git\inovafarma\node_modules\@commitlint\lint\lib\index.js:117:8
at <anonymous>
husky > commit-msg hook failed (add --no-verify to bypass)Affected packages
- cli
- core
- prompt
- config-angular
Steps to Reproduce (for bugs)
- Write commit
fix(enum): test item
commitlint.config.js
module.exports = {
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 100],
'scope-case': [
2,
'always',
['lower-case', 'camel-case']
],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
]
]
}
};package.json
"scripts": {
"commitmsg": "commitlint -e $GIT_PARAMS"
},
"devDependencies": {
"@commitlint/cli": "^6.1.3",
"@commitlint/config-conventional": "^6.1.3",
"husky": "^0.14.3"
}| Executable | Version |
|---|---|
commitlint --version |
6.1.3 |
git --version |
2.15.1 |
node --version |
8.11.1 |