@commitlint/lint
Lint a string against commitlint rules
Last updated 4 years ago by escapedcat .
MIT · Repository · Bugs · Original npm
$ cnpm install @commitlint/lint 
SYNC missed versions from official npm registry.

Lint a string against commitlint rules

@commitlint/lint

Getting started

npm install --save @commitlint/lint

Example

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

lint('foo: bar', {'type-enum': [1, 'always', ['foo']]}).then((report) =>
  console.log(report)
);
// => { valid: true, errors: [], warnings: [] }

lint('foo: bar', {'type-enum': [1, 'always', ['bar']]}).then((report) =>
  console.log(report)
);
/* =>
    { valid: true,
      errors: [],
      warnings:
      [ { level: 1,
          valid: false,
          name: 'type-enum',
          message: 'type must be one of [bar]' } ] }
  */

Consult docs/api for comprehensive documentation.

Current Tags

  • 17.2.0                                ...           latest (3 years ago)

14 Versions

  • 17.2.0                                ...           3 years ago
  • 8.3.6                                ...           4 years ago
  • 17.1.0                                ...           3 years ago
  • 13.2.0                                ...           4 years ago
  • 17.0.3                                ...           3 years ago
  • 14.1.0                                ...           4 years ago
  • 17.0.0                                ...           3 years ago
  • 16.2.4                                ...           3 years ago
  • 13.1.0                                ...           4 years ago
  • 12.1.4                                ...           4 years ago
  • 12.0.1                                ...           5 years ago
  • 12.1.0                                ...           4 years ago
  • 11.0.0                                ...           5 years ago
  • 12.0.0                                ...           5 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org