Socket
Socket
Sign inDemoInstall

@commitlint/format

Package Overview
Dependencies
7
Maintainers
4
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @commitlint/format

Format commitlint reports


Version published
Weekly downloads
2.9M
increased by12.45%
Maintainers
4
Install size
151 kB
Created
Weekly downloads
 

Changelog

Source

10.0.0 (2020-08-16)

Bug Fixes

BREAKING CHANGES

  • remove node 8 from circle-ci checks

also remove node 13 because we do not support experimental versions

  • docs: update node v10 to latest LTS 10 version

Co-authored-by: Cedric van Putten me@bycedric.com

Co-authored-by: Cedric van Putten me@bycedric.com

Readme

Source

Format commitlint reports

@commitlint/format

Getting started

npm install --save @commitlint/format

Example

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

const output = format(
  {
    valid: false,
    errorCount: 1,
    warningCount: 1,
    results: [
      {
        valid: false,
        input: 'some: commit message',
        errors: [
          {
            valid: false,
            level: 2,
            name: 'some-error',
            message: 'This will show up red as it has level 2',
          },
        ],
        warnings: [
          {
            valid: true,
            level: 0,
            name: 'some-hint',
            message: 'This will not show up as it has level 0',
          },
          {
            valid: false,
            level: 1,
            name: 'some-warning',
            message: 'This will show up yellow as it has level 1',
          },
        ],
      },
    ],
  },
  {
    color: false,
  }
);

process.stdout.write(output);

/* => [
  '✖   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

Last updated on 16 Aug 2020

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