You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation states that a trailer-exists rule is valid, but commitlint does not recognize it as a valid rule name.
Expected Behavior
Based on the documentation, I expected to be able to add this rule to my commitlint config to verify that the footer of a commit is always prefaced by something; e.g., like this:
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: {
"trailer-exists": [2, "always", "Jira:"],
},
};
Current Behavior
Currently, I get this error when I attempt to commit my code and trigger that rule (stating that trailer-exists is not an accepted rule):
module.exports={/* * 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: {"trailer-exists": [2,"always","Jira:"],},}
I get this
git commit -m 'foo'
yarn run v1.22.17
$ /project/node_modules/.bin/commitlint --edit .git/COMMIT_EDITMSG
⧗ input: foo
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ message must have `Jira:` trailer [trailer-exists]
✖ found 3 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
error Command failed with exit code 1.
Documentation states that a
trailer-exists
rule is valid, but commitlint does not recognize it as a valid rule name.Expected Behavior
Based on the documentation, I expected to be able to add this rule to my commitlint config to verify that the footer of a commit is always prefaced by something; e.g., like this:
Current Behavior
Currently, I get this error when I attempt to commit my code and trigger that rule (stating that
trailer-exists
is not an accepted rule):My Environment
commitlint --version
@commitlint/cli": "^16.2.1"
git --version
git version 2.32.0 (Apple Git-132)
node --version
Node.js v17.5.0
The text was updated successfully, but these errors were encountered: