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.3M
decreased by-16.8%
Maintainers
4
Created
Weekly downloads
 

Changelog

Source

15.0.0 (2021-11-17)

Bug Fixes

  • prompt: correct import kind in prompt package (#2852) (45bf394)
  • prompt: correct version of internal dependencies in prompt package #2697 (#2851) (b1155ca)
  • types: fix signature of QualifiedRuleConfig for async configurations (#2868) (#2869) (c7f355b)

Features

Tests

  • config-lerna-scopes: reuse npm bootstrap to simplify tests (#2479) (9a7a43a), closes #2447

BREAKING CHANGES

  • config-lerna-scopes: upgrade to lerna v4

Co-authored-by: Renovate Bot bot@renovateapp.com Co-authored-by: escapedcat github@htmlcss.de

  • test(config-lerna-scopes): reuse npm bootstrap to simplify tests

  • test(config-lerna-scopes): reuse npm bootstrap to simplify tests

  • test: fix issue after merge

  • test: one more fix after merge

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot bot@renovateapp.com Co-authored-by: escapedcat github@htmlcss.de

Readme

Source

Format commitlint reports

@commitlint/format

Getting started

npm install --save @commitlint/format

Example

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

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 17 Nov 2021

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc