You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@commitlint/config-conventional

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/config-conventional

Shareable commitlint config enforcing conventional commits

19.8.0
latest
Version published
Maintainers
0
Created

What is @commitlint/config-conventional?

The @commitlint/config-conventional npm package is used to enforce conventional commit messages. This package provides a set of rules that follow the Conventional Commits specification, which standardizes commit messages to make them more readable and to facilitate automatic generation of changelogs.

What are @commitlint/config-conventional's main functionalities?

Enforcing commit message structure

This code snippet is a configuration file that extends the rules from @commitlint/config-conventional. It is used to enforce a conventional commit message structure in your project.

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

Linting commit messages

This command line example demonstrates how to lint a commit message using commitlint with the conventional configuration. It will check if the message follows the conventional commit format.

echo 'fix: correct minor typos in code' | npx commitlint

Integrating with commit hooks

This code snippet shows how to integrate commitlint with Husky's commit-msg hook to automatically lint each commit message before it is finalized.

husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'

Other packages similar to @commitlint/config-conventional

FAQs

Package last updated on 07 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts