Is it possible?
Sure. This was part of the functionality up to version 3.
I removed it because nobody ever used it.
What is the use case you have in mind?
I would like to be able to change the headerPattern and other.
Can you describe what you want do in more detail? I'm not quite clear what kind of behaviour you want to achieve.
It would be desirable at a level commitlint.config.js to change parseOps
Sure, I meant more in terms of what commit messages you want to parse.
We already use conventional-changelog on project with follows params (legacy):
headerPattern: /^(\w*)\(([^\)]*)\)\-(\d+\s.*)$/,
headerCorrespondence: [
'type',
'scope',
'subject'
],
fix(scope)-number_task subject
Now we want to add linter of commits and that he fits pattern...
I'd opt for boiling this down to a parser-preset support - that would allow changing the loaded preset from conventional-changelog-angular to e.g.@imrekb/imrekbs-convention by passing it to the cli or specifying it via commitlint.config.js. Can you help out on this?
I am thinking - yes.
How soon will be release?
I'll add some docs this evening and release it then. Stay tuned.
Published with some adaption as 3.2.
Changes
--parser-preset instead of --parserPresetparserPreset takes precedence over presets from extended configurationThank you!
Most helpful comment
Published with some adaption as
3.2.Changes
--parser-presetinstead of--parserPresetparserPresettakes precedence over presets from extended configuration