UNPKG

696 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.referencesEmpty = void 0;
7const message_1 = __importDefault(require("@commitlint/message"));
8const referencesEmpty = (parsed, when = 'never') => {
9 const negated = when === 'always';
10 const notEmpty = parsed.references.length > 0;
11 return [
12 negated ? !notEmpty : notEmpty,
13 message_1.default(['references', negated ? 'must' : 'may not', 'be empty']),
14 ];
15};
16exports.referencesEmpty = referencesEmpty;
17//# sourceMappingURL=references-empty.js.map
\No newline at end of file