`subject-references` is a plugin for applying references rules in subject.
npm install commitlint-plugin-subject-referencessubject-references is a plugin for applying references rules in subject.
``bash`
$ npm install --save-dev commitlint-plugin-subject-references
`javascript`
module.exports = {
extends: [
'@commitlint/config-conventional'
],
rules: {
'references-empty': [2, 'never'],
'subject-empty': [2, 'never'],
'subject-trailing-references': [2, 'always']
},
plugins: [
'commitlint-plugin-subject-references'
]
};
Use parentheses
`bashbad
$ git commit -m 'feat: my commit #1'
At the end of the line
`bash
bad
$ git commit -m 'feat: (#1) my commit'good
$ git commit -m 'feat: my commit (#1)'
`Multiple issues
`bash
bad
$ git commit -m 'feat: my commit (#1 #2 #3)'bad
$ git commit -m 'feat: my commit (#1, #2, #3)'good
$ git commit -m 'feat: my commit (#1,#2,#3)'
``