3.0.0 • Published 8 months ago

@d3p1/commitlint-config-conventional v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

CONVENTIONAL COMMITS PARSER

code style: prettier semantic-release: angular Release CodeQL

Introduction

Just a little shareable configuration for commitlint to be able to validate the addition of an issue number to the end of a commit message that follows the Conventional Commits specification.

The commit message structure must be:

<type>(<scope>): <description> [<issue-number>]

Where:

  • <type> is mandatory
  • <scope> is optional
  • <description> is mandatory
  • <issue-number> is mandatory

Usage

Install commitlint and this configuration:

npm install --save-dev @commitlint/cli @d3p1/commitlint-config-conventional

Then, extend this configuration from your commitlint configuration object using the extends option. For example, create in the root of your project a commitlint.config.js file with the following content:

module.exports = {
    extends: ['@d3p1/commitlint-config-conventional']
};

Also, to be able to validate your commit messages in your environment, install and configure husky:

npm install --save-dev husky
npx husky install
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'

And you are ready to go! From now on, all messages from your commits will be validated to ensure they adhere to the format:

<type>(<scope>): <description> [<issue-number>]

Changelog

Detailed changes for each release are documented in CHANGELOG.md.

License

This work is published under MIT License.

Author

Always happy to receive a greeting on:

3.0.0

8 months ago

2.0.0

8 months ago

1.0.1

8 months ago

1.0.0

9 months ago

0.0.1

9 months ago

0.0.0

9 months ago