Socket
Socket
Sign inDemoInstall

@commitlint/format

Package Overview
Dependencies
10
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.7M
increased by0.93%
Maintainers
4
Install size
2.34 MB
Created
Weekly downloads
 

Changelog

Source

7.3.0 (2019-01-11)

Bug Fixes

  • format: add new line to result (#518) (f1d443b), closes #504
  • add fallback with husky git params to deprecation handling (#498) (5a34b8c)
  • avoid truncated output on macOS (#503) (3192368)
  • fall back to conventional commit-parser settings for missing keys (#496) (831a141), closes #399
  • respect String.protoype.repeat API contract (f27e7ac)
  • update to security-patched dependency versions (97c033b)
  • use correct label for failing empty subjects (#481) (2e7e34d), closes #476

Features

<a name="7.2.1"></a>

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 11 Jan 2019

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