1.0.6 • Published 8 months ago
commitlint-plugin-tense v1.0.6
Commitlint Plugin Tense
A commitlint plugin that checks tense
Getting Started
npm install --save-dev commitlint-plugin-tenseAnd configure commitlint.config.js to use the tense plugin.
module.exports = {
plugins: ['commitlint-plugin-tense'],
rules: {
'tense/subject-tense': [1, 'always']
}
}subject-tense
- condition:
subjectis verbalized in tense present inallowedTenses
'tense/subject-tense': [severity, when, options]- severity:
0disable,1warning, or2error - when:
alwaysornever - options
{
// Array of tenses allowed
allowedTenses: ['present-imperative'],
// Check the first verb only or all verbs
// Accuracy is low when checking all verbs, use with warning level only
firstOnly: true,
// A list of additional allowed words
allowlist: [],
}Tenses
[
'past-participle', // done
'past-tense', // did
'present-imperative', // do
'present-participle', // doing
'present-third-person' // does
]Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/actuallydamo/commitlint-plugin-tense