@commitlint/lint
Lint a string against commitlint rules
Last updated 3 months ago by escapedcat .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ 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');

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

  • 11.0.0                                ...           latest (3 months ago)

31 Versions

  • 11.0.0                                ...           3 months ago
  • 10.0.0                                ...           4 months ago
  • 9.1.2                                ...           5 months ago
  • 9.1.1                                ...           5 months ago
  • 9.1.0                                ...           5 months ago
  • 9.0.1                                ...           6 months ago
  • 9.0.0                                ...           6 months ago
  • 8.3.5                                ...           a year ago
  • 8.3.4                                ...           a year ago
  • 8.3.2                                ...           a year ago
  • 8.3.0                                ...           a year ago
  • 8.2.0                                ...           a year ago
  • 8.1.0                                ...           a year ago
  • 8.0.0                                ...           2 years ago
  • 7.6.0                                ...           2 years ago
  • 7.5.2                                ...           2 years ago
  • 7.5.1                                ...           2 years ago
  • 7.5.0                                ...           2 years ago
  • 7.4.0                                ...           2 years ago
  • 7.3.2                                ...           2 years ago
  • 7.3.1                                ...           2 years ago
  • 7.2.1                                ...           2 years ago
  • 7.2.0                                ...           2 years ago
  • 7.1.2                                ...           2 years ago
  • 7.1.1                                ...           2 years ago
  • 7.1.0                                ...           2 years ago
  • 7.0.0                                ...           2 years ago
  • 6.2.0                                ...           3 years ago
  • 6.1.3                                ...           3 years ago
  • 6.1.2                                ...           3 years ago
  • 6.1.1                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |