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.1M
decreased by-18.83%
Maintainers
4
Install size
2.34 MB
Created
Weekly downloads
 

Changelog

Source

7.5.0 (2019-01-31)

Bug Fixes

  • sentence-case allow upper-case characters in first word (#531) (5a6a4a8), closes #211
  • resolve-extends: override array on extending rules (#470) (#539) (b35000c)
  • all broken website references (#564) (82eeb5a)
  • cleanup message for input with no config (#519) (7d9e760)
  • cli: avoid linebreak in empty input (#523) (3141882)
  • mark optional parameter with undefined (#553) (6720284)
  • replace all repository references with conventional changelog (#561) (6c3afcd)
  • replace all website references with conventional changelog (#563) (6b86fb1)
  • replace old require-uncached with import-fresh (#533) (b636e8c)
  • resolve path to commit message for git submodules (83b1a47)
  • slash in scope #291 (#529) (b2b63e5)
  • store concatenated array to problems variable (#551) (434a70f)

Features

  • add support for git submodules (cc575fa)
  • rule-header-length: show current header length (6d61c4f)

<a name="7.4.0"></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 31 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