commitlint-plugin-tense
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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
{
  // 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

Package Sidebar

Install

npm i commitlint-plugin-tense

Weekly Downloads

806

Version

1.0.3

License

MIT

Unpacked Size

14.7 kB

Total Files

12

Last publish

Collaborators

  • actuallydamo