Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

semantic-release-commitlint

XC-1.6kMIT1.2.2

Plugin for validating commit message formats

semantic-release, semantic-release plugin, commitlint, conventional commits, conventional changelog, conventional-changelog, automation, commit, commits, semver

readme

semantic-release-commitlint

semantic-release GitHub license

This plugin is a thin layer on top of conventional-changelog/commitlint packages allowing it to be used together with semantic-release tool to enforce conventional commits style guide. The reasoning to this is, that it is more beneficial to automate the enforcing than having it as a manual part of code review process. This takes some load away from developers and allows them to prevent merges to release branches when commits do not follow the convention.

Installation

npm install --save-dev semantic-release-commitlint

Add semantic-release-commitlint to semantic-release configuration after @semantic-release/commit-analyzer. The plugin is run in analyzeCommits -lifecycle and will throw an error with linting results if linting fails.

Configuration

Currently the plugin has only one configuration setting:

  • failOnWarning
    • Type: Boolean
    • Default: undefined (falsy)
    • Description: Normally commitlint warnings are considered as valid, but by setting this to true the plugin will throw an error if any warnings have been found.
  • rules
  • warnOnly
    • Type: Boolean
    • Default: undefined (falsy)
    • Description: Instead of throwing errors, set maximum level to be warning.

*THREE, three configuration settings... oh blast it!*

changelog

1.2.2 (2021-06-01)

Bug Fixes

  • move @semantic-release/error to dependencies (13cabc5)

1.2.1 (2021-05-31)

Bug Fixes

  • analyzecommits: use @semantic-release/error for errors (a190eaa)

1.2.0 (2021-04-18)

Features

  • add option to show errors as warnings (069e1e8)

1.1.0 (2021-04-14)

Features

  • add support for custom rules supported by commitlint (35695fb)

1.0.0 (2021-04-10)

Features

  • initial version of commitlint plugin for semantic-release (1adf9d3)