UNPKG

746 BJavaScriptView Raw
1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6exports.headerFullStop = void 0;
7const message_1 = __importDefault(require("@commitlint/message"));
8const headerFullStop = (parsed, when = 'always', value = '.') => {
9 const { header } = parsed;
10 const negated = when === 'never';
11 const hasStop = header[header.length - 1] === value;
12 return [
13 negated ? !hasStop : hasStop,
14 message_1.default(['header', negated ? 'may not' : 'must', 'end with full stop']),
15 ];
16};
17exports.headerFullStop = headerFullStop;
18//# sourceMappingURL=header-full-stop.js.map
\No newline at end of file