conventional-changelog / conventional-changelog/commitlint
"footer-empty" rule does not recognize footer
- Dominant language
- TypeScript
- Stars
- 18.7k
- Forks
- 970
- Avg merge
- 7h 33m
- Merged PRs (30d)
- 49
Description
I'm trying to use the `footer-empty` rule fined in the [documentation](https://commitlint.js.org/#/reference-rules?id=trailer-exists) but it seems to be erroneously flagging my footer as not present.
## Expected Behavior
This is my configuration:
```
const Configuration = {
/*
* Resolve and load @commitlint/config-conventional from node_modules.
* Referenced packages must be installed
*/
extends: ["@commitlint/config-conventional"],
/*
* Any rules defined here will override rules from @commitlint/config-conventional
*/
rules: {
"footer-empty": [2, "never"],
},
};
module.exports = Configuration;
```
As a result, I expected this commit to work:
```
chore: testing footer lint
footer: I expect this to work
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch add_commit_linter
# Changes to be committed:
# modified: commitlint.config.js
#
```
## Current Behavior
Currently, I get this error when I commit the code:
```
commitlint...............................................................Failed
- hook id: commitlint
- duration: 0.39s
- exit code: 1
⧗ input: chore: testing footer lint
footer: I expect this to work
✖ footer may not be empty [footer-empty]
✖ found 1 problems, 0 warnings
(Need help? -> https://github.com/conventional-changelog/commitlint#what-is-commitlint )
```
## My Environment
| Executable | Version |
| ---------------------: | :------ |
| `commitlint --version` | `@commitlint/cli": "^16.2.1"` |
| `git --version` | `git version 2.32.0 (Apple Git-132)` |
| `node --version` | `Node.js v17.5.0` |
Contributor guide
Assessment
This issue has not been assessed yet.