Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commitlint/rules

Package Overview
Dependencies
Maintainers
4
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/rules

Lint your commit messages

  • 19.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3M
decreased by-27.58%
Maintainers
4
Weekly downloads
 
Created

What is @commitlint/rules?

@commitlint/rules is a package that provides a set of rules for linting commit messages. It helps enforce consistent commit message formats, which can be crucial for maintaining a clean and understandable project history. The package is highly configurable and can be integrated into various CI/CD pipelines to ensure commit message standards are met.

What are @commitlint/rules's main functionalities?

Enforcing Commit Message Format

This feature allows you to enforce specific formats for commit messages. The 'type-enum' rule ensures that the commit type is one of the specified values, while the 'subject-case' rule enforces that the subject is not in certain cases.

{"rules":{"type-enum":[2,"always",["feat","fix","docs","style","refactor","test","chore"]],"subject-case":[2,"never",["sentence-case","start-case","pascal-case","upper-case"]]}}

Custom Rules

You can define custom rules to enforce specific constraints on commit messages. For example, 'header-max-length' ensures that the commit header does not exceed 72 characters, and 'body-max-line-length' ensures that each line in the commit body does not exceed 100 characters.

{"rules":{"header-max-length":[2,"always",72],"body-max-line-length":[2,"always",100]}}

Integration with CI/CD

This feature allows you to integrate @commitlint/rules with your CI/CD pipeline. By adding a script to your package.json, you can ensure that commit messages are linted automatically during the commit process.

{"scripts":{"commitmsg":"commitlint -E HUSKY_GIT_PARAMS"}}

Other packages similar to @commitlint/rules

Keywords

FAQs

Package last updated on 19 Nov 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc