Socket
Socket
Sign inDemoInstall

@commitlint/parse

Package Overview
Dependencies
18
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/parse

Lint your commit messages


Version published
Maintainers
4
Weekly downloads
2,705,547
decreased by-1.72%
Install size
4.97 MB

Weekly downloads

Package description

What is @commitlint/parse?

The @commitlint/parse package is used to parse commit messages according to the conventions used by commitlint. It takes a raw commit message string and returns a promise that resolves to an object representing the parsed commit, which includes information such as the header, type, scope, subject, body, footer, and references. This package is typically used in the context of commit message linting to ensure that commit messages follow a certain format.

What are @commitlint/parse's main functionalities?

Parsing commit messages

This feature allows you to parse a commit message and obtain an object with structured information about the commit. The code sample demonstrates how to use the parse function to parse a commit message and log the result.

const parse = require('@commitlint/parse');
const message = 'feat(scope): add new feature';
parse(message).then(commit => {
  console.log(commit);
});

Other packages similar to @commitlint/parse

Readme

Source

Parse commit messages to structured data

@commitlint/parse

Install

npm install --save @commitlint/parse

Use

const parse = require('@commitlint/parse');

API

parse(message: string, parser: Function, parserOpts: Object)

  • message: Commit message to parser
  • parser: Sync parser function to use. Defaults to sync of conventional-commits-parser
  • parserOpts: Options to pass to parser
    {
      commentChar: null, // character indicating comment lines
      issuePrefixes: ['#'] // prefix characters for issue references
    }
    

Keywords

FAQs

Last updated on 28 Feb 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