Socket
Socket
Sign inDemoInstall

@commitlint/format

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/format

Format commitlint reports


Version published
Weekly downloads
2.8M
increased by6.4%
Maintainers
1
Weekly downloads
 
Created

Package description

What is @commitlint/format?

@commitlint/format is a package used to format commit messages according to specified rules. It is part of the commitlint suite, which helps enforce consistent commit message conventions.

What are @commitlint/format's main functionalities?

Format Commit Messages

This feature allows you to format the results of commit message linting. The `format` function takes an object with a `results` array and returns a formatted string that can be logged or displayed.

const { format } = require('@commitlint/format');
const results = [
  { valid: true, errors: [], warnings: [] },
  { valid: false, errors: [{ message: 'type may not be empty' }], warnings: [] }
];
const output = format({ results });
console.log(output);

Other packages similar to @commitlint/format

Changelog

Source

6.1.1 (2018-02-22)

Bug Fixes

  • ensure: ignore word delimiters for case matching #291 (fa69299)

<a name="6.1.0"></a>

Readme

Source

Format commitlint reports

@commitlint/format

Getting started

npm install --save @commitlint/format

Example

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

format({
  warnings: [
    {
      level: 0,
      name: 'some-hint',
      message: 'This will not show up as it has level 0'
    },
    {
      level: 1,
      name: 'some-warning',
      message: 'This will show up yellow as it has level 1'
    }
  ],
  errors: [
    {
      level: 2,
      name: 'some-error',
      message: 'This will show up red as it has level 2'
    }
  ]
}, {
  color: false
});
/* => [
  '✖   This will show up red as it has level 2 [some-error]',
  '    This will not show up as it has level 0 [some-hint]',
  '⚠   This will show up yellow as it has level 1 [some-warning]',
  '✖   found 1 problems, 2 warnings'
] */

Consult docs/api for comprehensive documentation.

Keywords

FAQs

Package last updated on 22 Feb 2018

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc