@commitlint/config-conventional
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
conventional-changelog-conventionalcommits | 6.1.0 | 5.25 kB | ISC | prod |
The Node Package Manager (NPM) package "@commitlint/config-conventional" is an invaluable tool that ensures your commits are properly aligned with the conventional commit guidelines. Conventional commits are a conventional style for commit messages that ensures your version management and release versions are made in a standardized way, increasing readability and understanding of your code changes.
You can easily start using "@commitlint/config-conventional" by following the below steps:
npm install --save-dev @commitlint/config-conventional @commitlint/cli
module.exports = {extends: ['@commitlint/config-conventional']};
This indicates that commitlint should use the conventional config in validating commit messages. Therefore, whenever you try to commit to git, commitlint will check whether your commit message follows the conventional commits format.
Sample Usage:
echo "fix(scope): some message" # passes
echo "fix: some message that is way too long and breaks the line max-length by several characters" # fails
Remember to replace 'fix(scope): some message' with your own commit message. The result 'passes' means that the commit message follows the conventional commits guideline. Inversely, 'fails' means the commit message does not adhere to the guideline.
The "@commitlint/config-conventional" documentation is freely accessible at this url. Here, you'll find a complete list of available rules as well as specific information about their usage, conditions, and the associated error levels.