I am using Husky to set my git hooks, and am trying to change to default format of the header expected by Commitlint:
type(scope?): subject
I am specifically trying to have this formatting:
:gitmoji:? [scope] subject
With :gitmoji: one of Gitmoji's emoji and being optional, with square brackets around the scope (and not optional) instead of the parentheses, and without the : to separate the type + the scope from the subject. Also I'd like the scope to have a formatting kind of like TCKT-666 (to refer a Jira's ticket, for example),
Right now, I've been trying a lot of things using the parserPreset, parserOpts, headerPattern and headerCorrespondence properties from commitlint.config.js, but I encountered several issues:
- the
headerPatternregex seems to be totally ignored, and all the errors I get only come from the rules I set withincommitlint.config.js- so I cannot set a specific formatting for myscope(although commitlint-plugin-function-rules might help with that) - I have absolutely no idea how to remove the need for the
:after the type, or how to replace parentheses by square brackets around the scope