I'm not able to do a commit when I override the type-enum rule in commitlint.config.js.
When I don't override the type-enum rule a commit is not blocked.
Expected Behavior
The commit should be done.
Current Behavior
When I do a commit with using an approved type, I still get an error message:
echo 'feat(hello): bar' | commitlint
⧗ input: feat(hello): bar
✖ type must be one of [feat,fix,docs,style,refactor,test,revert,content] [type-enum]
✖ found 1 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
Affected packages
Possible Solution
Steps to Reproduce (for bugs)
- Create commitlint.config.js with the config I put above
- Run commitlint and see the magic happen
commitlint.config.js
```js
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
[
'feat',
'fix',
'docs',
'style',
'refactor',
'test',
'revert',
'content', // For articles, tutorials, etc...
],
],
],
},
}
```
Context
I would like to create a custom type for articles and tutorials on my blog.
Your Environment
| Executable |
Version |
commitlint --version |
@commitlint/[email protected] |
git --version |
git version 2.21.1 (Apple Git-122.3) |
node --version |
v15.5.0 |
I'm not able to do a commit when I override the
type-enumrule incommitlint.config.js.When I don't override the
type-enumrule a commit is not blocked.Expected Behavior
The commit should be done.
Current Behavior
When I do a commit with using an approved type, I still get an error message:
Affected packages
Possible Solution
Steps to Reproduce (for bugs)
commitlint.config.js
```js module.exports = { extends: ['@commitlint/config-conventional'], rules: { 'type-enum': [ 2, 'always', [ [ 'feat', 'fix', 'docs', 'style', 'refactor', 'test', 'revert', 'content', // For articles, tutorials, etc... ], ], ], }, } ```Context
I would like to create a custom type for articles and tutorials on my blog.
Your Environment
commitlint --versiongit --versionnode --version