Socket
Socket
Sign inDemoInstall

@commitlint/format

Package Overview
Dependencies
6
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
123 kB
Created
Weekly downloads
 

Changelog

Source

9.0.0 (2020-05-21)

Bug Fixes

  • cli: add missing regenerator-runtime to dependencies (#919) (ee5eac9)
  • #840 add caret to lodash versions (#843) (ffc0bac)
  • drop support for 'improvement' type (#899) (b27ab08)
  • config-lerna-scopes: correct lerna in peerDependencies (#980) (f88f00d)
  • ignore empty commit messages #615 (#676) (c3eb1a7)
  • incorrect use of when in getForcedCaseFn (#993) (34c11b8)
  • update dependency semver to v7.1.3 (#995) (4ee307a)

Features

  • add async promise based rules methods into lint (#976) (4443062)
  • add possibility to extend from string (#865) (056c6fe)
  • passdown argv to lint command (#891) (c49a57c)
  • config-conventional: footer/body-max-line (#436) (8b394c9)
  • config-conventional: increase header-max-length to 100 (#860) (ff11998), closes #859

BREAKING CHANGES

  • 'improvement' type will now be rejected by this config.

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 21 May 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