JSPM

commitlint-plugin-cleanfeet

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 139
  • Score
    100M100P100Q86926F
  • License ISC

Adds additional rules to commitlint inspired by conventional commits' specification.

Package Exports

  • commitlint-plugin-cleanfeet

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (commitlint-plugin-cleanfeet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CleanFeet

Introduction

CleanFeet is a plugin extension for commitlint, which is a tool for linting commit messages.

If you want to learn more about structured and convention-driven commit messages, see conventional commits

Rules

This plugin adds 2 rules:

  • footer-format:
    • This rule determines the format a single footer line has to adhere to by allowing you to specify a set of regular expressions.
    • The rule passes in case there is no footer.
  • footer-max-occurrence-breaking-change:
    • This rule allows you to specify how many occurrences the footer can contain of BREAKING CHANGE: <description>. You're allowed to pass in your own regex [2, 'always', { max: 1, regex: /^BREAKING CHANGE: .*$/ }]
    • The rule passes in case there is no footer.
    • Specifying never has no effect.

Sample configuration

module.exports = {
    extends: ['@commitlint/config-conventional'],
    plugins: ['cleanfeet'],
    rules: {
        'footer-format': [
            2, 
            'always', 
            [
                '^BREAKING CHANGE: .*',
                '^[a-zA-Z0-9-]+: .*',
                '^[a-zA-Z0-9-]+ #.*'
            ]
        ],
        'footer-max-occurrence-breaking-change': [2, 'always', { max: 1, regex: /^BREAKING CHANGE: .*$/ }]
    }
};

Todo

  • Show which regular expression has been matched in case of specifying never for footer-format