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.6M
increased by6.15%
Maintainers
4
Install size
134 kB
Created
Weekly downloads
 

Changelog

Source

18.0.0 (2023-10-20)

  • chore!: minimum node version v18 (#3644) (5b4aeaf), closes #3644

BREAKING CHANGES

  • drop node v14 and v16 support

  • chore: remove unused types

  • docs: prepare node update and new release

  • chore!: minimum TS version v5

  • drop TS v4 support

  • ci: remove node v14/16 checks

  • chore: adjust node types to minimal supported version

  • chore!: further major versions of other deps

  • upgrade conventional-changelog-conventionalcommits, conventional-commits-parser, conventional-changelog-atom,

  • docs: simplify releases and remove roadmap

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 20 Oct 2023

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