-
Notifications
You must be signed in to change notification settings - Fork 934
fix: can't set headerPattern from YAML configuration files #3487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Yes, I tested with |
That's strange because conventional-commit-parser seems to check for strings. |
It's even worse that I thought, the options are not merged:
|
The non merging happens with JS configuration too, not just YAML 🤷 |
Adding some I don't really understand the full logic of the merging from the loaded config and the |
Expected Behavior
I use YAML configuration and try to set headerPattern like this:
This should avoid
scope
starting with a digit:Current Behavior
This load the
headerPattern
as a string instead of a regular expression:It looks like the
scope
starting with a digit is catch:But it catch everything since
headerPattern
is not a regex:Affected packages
Possible Solution
The pattern options should be converted to regular expression.
Steps to Reproduce
Context
Note that replacing the
.commitlintrc.yaml
with the followingcommitlint.config.js
is working:commitlint --version
@commitlint/[email protected]
git --version
2.38.2
node --version
v19.3.0
The text was updated successfully, but these errors were encountered: