conventional-changelog-lint
Version:
Lint commit messages against a conventional-changelog preset and ruleset
20 lines (14 loc) • 452 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (parsed, when, value) {
var input = parsed.subject;
if (!input) {
return [true];
}
var negated = when === 'never';
var hasStop = input[input.length - 1] === value;
return [negated ? !hasStop : hasStop, ['message', negated ? 'may not' : 'must', 'end with full stop'].filter(Boolean).join(' ')];
};
module.exports = exports['default'];
;