Socket
Socket
Sign inDemoInstall

@commitlint/lint

Package Overview
Dependencies
46
Maintainers
4
Versions
79
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @commitlint/lint

Lint a string against commitlint rules


Version published
Weekly downloads
2.7M
increased by0.14%
Maintainers
4
Install size
3.66 MB
Created
Weekly downloads
 

Package description

What is @commitlint/lint?

The @commitlint/lint package is a part of the commitlint toolset that is used to lint commit messages according to a specified set of rules. It helps maintain a consistent commit history and enforces a commit message convention, which is beneficial for automated processing of commit logs, generating changelogs, and aiding in code reviews.

What are @commitlint/lint's main functionalities?

Linting Commit Messages

This feature allows you to lint commit messages using a set of predefined rules. The code sample demonstrates how to use the lint function to check if a commit message follows the specified rules for the commit type and subject case.

const { lint } = require('@commitlint/lint');
const message = 'feat: add new feature';
const rules = {
  'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore']],
  'subject-case': [2, 'never', ['start-case', 'pascal-case', 'upper-case']]
};

lint(message, rules).then(report => {
  console.log(report);
});

Other packages similar to @commitlint/lint

Changelog

Source

19.1.0 (2024-03-12)

Bug Fixes

  • add main and types keys in package.json (#3953) (7ddaad4)
  • add missing conditions param for moduleResolve (#3962) (67baff9)
  • add missing cjs entry in package (#3967) (9cea6fd)
  • update dependency @pnpm/read-project-manifest to v5.0.11 (#3932) (2525d14)
  • update dependency tmp to v0.2.3 (#3945) (25bab59)

Features

Readme

Source

@commitlint/lint

Lint a string against commitlint rules

Getting started

npm install --save @commitlint/lint

Documentation

Consult API docs for comprehensive documentation.

Documentation generated from docs folder.

Keywords

FAQs

Last updated on 12 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc