Commitlint Plugin Tense
A commitlint plugin that checks tense
Getting Started
npm install --save-dev commitlint-plugin-tense
And configure commitlint.config.js
to use the tense plugin.
module.exports = {
plugins: ['commitlint-plugin-tense'],
rules: {
'tense/subject-tense': [1, 'always']
}
}
subject-tense
- condition:
subject
is verbalized in tense present in allowedTenses
'tense/subject-tense': [severity, when, options]
- severity:
0
disable, 1
warning, or 2
error - when:
always
or never
- options
{
allowedTenses: ['present-imperative'],
firstOnly: true,
allowlist: [],
}
Tenses
[
'past-participle',
'past-tense',
'present-imperative',
'present-participle',
'present-third-person'
]
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/actuallydamo/commitlint-plugin-tense