UNPKG

conventional-changelog-lint

Version:

Lint commit messages against a conventional-changelog preset and ruleset

23 lines (15 loc) 571 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _ensureMaxLength = require('../library/ensure-max-length'); var _ensureMaxLength2 = _interopRequireDefault(_ensureMaxLength); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (parsed, when, value) { var input = parsed.body; if (!input) { return [true]; } return [(0, _ensureMaxLength2.default)(input, value), `body must not be longer than ${value} characters`]; }; module.exports = exports['default'];