To clarify, when you say freelancer, do you mean on a part-time basis? Or do you mean having a contract and working on a full-time basis for that client? Also, where are you based? I’m happy to give advice as a UK based contractor, who does a tiny bit of freelance work
After a bit of experimentation, I’ve managed to find a cleaner solution to enforcing the ticket number in the subject:
module.exports = { extends: ['@commitlint/config-conventional'], rules: { // Enforce scope to match JIRA ticket format like PER-123 'jira-ticket-rule': [2, 'always'], 'subject-case': [0], }, plugins: [ { rules: { 'jira-ticket-rule': ({ subject }) => { return [ subject && subject.match(/[A-Z]+-\d+/), 'Your subject should contain a JIRA ticket eg PER-123', ]; }, }, }, ], };