Closed
Description
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
- cli
- core
- prompt
- config-angular
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/cli@11.0.0 |
git --version |
git version 2.21.1 (Apple Git-122.3) |
node --version |
v15.5.0 |
Metadata
Metadata
Assignees
Labels
No labels