Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commitlint/rules

Package Overview
Dependencies
Maintainers
4
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/rules - npm Package Compare versions

Comparing version 18.6.1 to 19.0.0

17

lib/body-case.js

@@ -1,11 +0,5 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.bodyCase = void 0;
const ensure_1 = require("@commitlint/ensure");
const message_1 = __importDefault(require("@commitlint/message"));
import { case as ensureCase } from '@commitlint/ensure';
import message from '@commitlint/message';
const negated = (when) => when === 'never';
const bodyCase = (parsed, when = 'always', value = []) => {
export const bodyCase = (parsed, when = 'always', value = []) => {
const { body } = parsed;

@@ -25,3 +19,3 @@ if (!body) {

const result = checks.some((check) => {
const r = (0, ensure_1.case)(body, check.case);
const r = ensureCase(body, check.case);
return negated(check.when) ? !r : r;

@@ -32,6 +26,5 @@ });

negated(when) ? !result : result,
(0, message_1.default)([`body must`, negated(when) ? `not` : null, `be ${list}`]),
message([`body must`, negated(when) ? `not` : null, `be ${list}`]),
];
};
exports.bodyCase = bodyCase;
//# sourceMappingURL=body-case.js.map

@@ -1,33 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.bodyEmpty = void 0;
const ensure = __importStar(require("@commitlint/ensure"));
const message_1 = __importDefault(require("@commitlint/message"));
const bodyEmpty = (parsed, when = 'always') => {
import * as ensure from '@commitlint/ensure';
import message from '@commitlint/message';
export const bodyEmpty = (parsed, when = 'always') => {
const negated = when === 'never';

@@ -37,6 +8,5 @@ const notEmpty = ensure.notEmpty(parsed.body || '');

negated ? notEmpty : !notEmpty,
(0, message_1.default)(['body', negated ? 'may not' : 'must', 'be empty']),
message(['body', negated ? 'may not' : 'must', 'be empty']),
];
};
exports.bodyEmpty = bodyEmpty;
//# sourceMappingURL=body-empty.js.map

@@ -1,9 +0,3 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.bodyFullStop = void 0;
const message_1 = __importDefault(require("@commitlint/message"));
const bodyFullStop = (parsed, when = 'always', value = '.') => {
import message from '@commitlint/message';
export const bodyFullStop = (parsed, when = 'always', value = '.') => {
const input = parsed.body;

@@ -17,6 +11,5 @@ if (!input) {

negated ? !hasStop : hasStop,
(0, message_1.default)(['body', negated ? 'may not' : 'must', 'end with full stop']),
message(['body', negated ? 'may not' : 'must', 'end with full stop']),
];
};
exports.bodyFullStop = bodyFullStop;
//# sourceMappingURL=body-full-stop.js.map

@@ -1,10 +0,4 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.bodyLeadingBlank = void 0;
const to_lines_1 = __importDefault(require("@commitlint/to-lines"));
const message_1 = __importDefault(require("@commitlint/message"));
const bodyLeadingBlank = (parsed, when) => {
import toLines from '@commitlint/to-lines';
import message from '@commitlint/message';
export const bodyLeadingBlank = (parsed, when) => {
// Flunk if no body is found

@@ -15,3 +9,3 @@ if (!parsed.body) {

const negated = when === 'never';
const [leading] = (0, to_lines_1.default)(parsed.raw).slice(1);
const [leading] = toLines(parsed.raw).slice(1);
// Check if the first line of body is empty

@@ -21,6 +15,5 @@ const succeeds = leading === '';

negated ? !succeeds : succeeds,
(0, message_1.default)(['body', negated ? 'may not' : 'must', 'have leading blank line']),
message(['body', negated ? 'may not' : 'must', 'have leading blank line']),
];
};
exports.bodyLeadingBlank = bodyLeadingBlank;
//# sourceMappingURL=body-leading-blank.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bodyMaxLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const bodyMaxLength = (parsed, _when = undefined, value = 0) => {
import { maxLength } from '@commitlint/ensure';
export const bodyMaxLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.body;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.maxLength)(input, value),
maxLength(input, value),
`body must not be longer than ${value} characters`,
];
};
exports.bodyMaxLength = bodyMaxLength;
//# sourceMappingURL=body-max-length.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bodyMaxLineLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const bodyMaxLineLength = (parsed, _when = undefined, value = 0) => {
import { maxLineLength } from '@commitlint/ensure';
export const bodyMaxLineLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.body;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.maxLineLength)(input, value),
maxLineLength(input, value),
`body's lines must not be longer than ${value} characters`,
];
};
exports.bodyMaxLineLength = bodyMaxLineLength;
//# sourceMappingURL=body-max-line-length.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bodyMinLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const bodyMinLength = (parsed, _when = undefined, value = 0) => {
import { minLength } from '@commitlint/ensure';
export const bodyMinLength = (parsed, _when = undefined, value = 0) => {
if (!parsed.body) {

@@ -10,7 +7,6 @@ return [true];

return [
(0, ensure_1.minLength)(parsed.body, value),
minLength(parsed.body, value),
`body must not be shorter than ${value} characters`,
];
};
exports.bodyMinLength = bodyMinLength;
//# sourceMappingURL=body-min-length.js.map

@@ -1,33 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.footerEmpty = void 0;
const ensure = __importStar(require("@commitlint/ensure"));
const message_1 = __importDefault(require("@commitlint/message"));
const footerEmpty = (parsed, when = 'always') => {
import * as ensure from '@commitlint/ensure';
import message from '@commitlint/message';
export const footerEmpty = (parsed, when = 'always') => {
const negated = when === 'never';

@@ -37,6 +8,5 @@ const notEmpty = ensure.notEmpty(parsed.footer || '');

negated ? notEmpty : !notEmpty,
(0, message_1.default)(['footer', negated ? 'may not' : 'must', 'be empty']),
message(['footer', negated ? 'may not' : 'must', 'be empty']),
];
};
exports.footerEmpty = footerEmpty;
//# sourceMappingURL=footer-empty.js.map

@@ -1,10 +0,4 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.footerLeadingBlank = void 0;
const to_lines_1 = __importDefault(require("@commitlint/to-lines"));
const message_1 = __importDefault(require("@commitlint/message"));
const footerLeadingBlank = (parsed, when = 'always') => {
import toLines from '@commitlint/to-lines';
import message from '@commitlint/message';
export const footerLeadingBlank = (parsed, when = 'always') => {
// Flunk if no footer is found

@@ -15,4 +9,4 @@ if (!parsed.footer) {

const negated = when === 'never';
const rawLines = (0, to_lines_1.default)(parsed.raw);
const footerLines = (0, to_lines_1.default)(parsed.footer);
const rawLines = toLines(parsed.raw);
const footerLines = toLines(parsed.footer);
const footerOffset = rawLines.indexOf(footerLines[0]);

@@ -24,3 +18,3 @@ const [leading] = rawLines.slice(footerOffset - 1);

negated ? !succeeds : succeeds,
(0, message_1.default)([
message([
'footer',

@@ -32,3 +26,2 @@ negated ? 'may not' : 'must',

};
exports.footerLeadingBlank = footerLeadingBlank;
//# sourceMappingURL=footer-leading-blank.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.footerMaxLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const footerMaxLength = (parsed, _when = undefined, value = 0) => {
import { maxLength } from '@commitlint/ensure';
export const footerMaxLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.footer;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.maxLength)(input, value),
maxLength(input, value),
`footer must not be longer than ${value} characters`,
];
};
exports.footerMaxLength = footerMaxLength;
//# sourceMappingURL=footer-max-length.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.footerMaxLineLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const footerMaxLineLength = (parsed, _when = undefined, value = 0) => {
import { maxLineLength } from '@commitlint/ensure';
export const footerMaxLineLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.footer;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.maxLineLength)(input, value),
maxLineLength(input, value),
`footer's lines must not be longer than ${value} characters`,
];
};
exports.footerMaxLineLength = footerMaxLineLength;
//# sourceMappingURL=footer-max-line-length.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.footerMinLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const footerMinLength = (parsed, _when = undefined, value = 0) => {
import { minLength } from '@commitlint/ensure';
export const footerMinLength = (parsed, _when = undefined, value = 0) => {
if (!parsed.footer) {

@@ -10,7 +7,6 @@ return [true];

return [
(0, ensure_1.minLength)(parsed.footer, value),
minLength(parsed.footer, value),
`footer must not be shorter than ${value} characters`,
];
};
exports.footerMinLength = footerMinLength;
//# sourceMappingURL=footer-min-length.js.map

@@ -1,11 +0,5 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.headerCase = void 0;
const ensure_1 = require("@commitlint/ensure");
const message_1 = __importDefault(require("@commitlint/message"));
import { case as ensureCase } from '@commitlint/ensure';
import message from '@commitlint/message';
const negated = (when) => when === 'never';
const headerCase = (parsed, when = 'always', value = []) => {
export const headerCase = (parsed, when = 'always', value = []) => {
const { header } = parsed;

@@ -25,3 +19,3 @@ if (typeof header !== 'string' || !header.match(/^[a-z]/i)) {

const result = checks.some((check) => {
const r = (0, ensure_1.case)(header, check.case);
const r = ensureCase(header, check.case);
return negated(check.when) ? !r : r;

@@ -32,6 +26,5 @@ });

negated(when) ? !result : result,
(0, message_1.default)([`header must`, negated(when) ? `not` : null, `be ${list}`]),
message([`header must`, negated(when) ? `not` : null, `be ${list}`]),
];
};
exports.headerCase = headerCase;
//# sourceMappingURL=header-case.js.map

@@ -1,18 +0,11 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.headerFullStop = void 0;
const message_1 = __importDefault(require("@commitlint/message"));
const headerFullStop = (parsed, when = 'always', value = '.') => {
import message from '@commitlint/message';
export const headerFullStop = (parsed, when = 'always', value = '.') => {
const { header } = parsed;
const negated = when === 'never';
const hasStop = header[header.length - 1] === value;
const hasStop = (header === null || header === void 0 ? void 0 : header[header.length - 1]) === value;
return [
negated ? !hasStop : hasStop,
(0, message_1.default)(['header', negated ? 'may not' : 'must', 'end with full stop']),
message(['header', negated ? 'may not' : 'must', 'end with full stop']),
];
};
exports.headerFullStop = headerFullStop;
//# sourceMappingURL=header-full-stop.js.map

@@ -1,12 +0,9 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.headerMaxLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const headerMaxLength = (parsed, _when = undefined, value = 0) => {
import { maxLength } from '@commitlint/ensure';
export const headerMaxLength = (parsed, _when = undefined, value = 0) => {
var _a;
return [
(0, ensure_1.maxLength)(parsed.header, value),
`header must not be longer than ${value} characters, current length is ${parsed.header.length}`,
maxLength(parsed.header, value),
`header must not be longer than ${value} characters, current length is ${(_a = parsed.header) === null || _a === void 0 ? void 0 : _a.length}`,
];
};
exports.headerMaxLength = headerMaxLength;
//# sourceMappingURL=header-max-length.js.map

@@ -1,12 +0,9 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.headerMinLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const headerMinLength = (parsed, _when = undefined, value = 0) => {
import { minLength } from '@commitlint/ensure';
export const headerMinLength = (parsed, _when = undefined, value = 0) => {
var _a;
return [
(0, ensure_1.minLength)(parsed.header, value),
`header must not be shorter than ${value} characters, current length is ${parsed.header.length}`,
minLength(parsed.header, value),
`header must not be shorter than ${value} characters, current length is ${(_a = parsed.header) === null || _a === void 0 ? void 0 : _a.length}`,
];
};
exports.headerMinLength = headerMinLength;
//# sourceMappingURL=header-min-length.js.map

@@ -1,10 +0,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.headerTrim = void 0;
const message_1 = __importDefault(require("@commitlint/message"));
const headerTrim = (parsed) => {
import message from '@commitlint/message';
export const headerTrim = (parsed) => {
const { header } = parsed;
if (!header) {
return [true];
}
const startsWithWhiteSpace = header !== header.trimStart();

@@ -16,8 +13,8 @@ const endsWithWhiteSpace = header !== header.trimEnd();

false,
(0, message_1.default)(['header', 'must not be surrounded by whitespace']),
message(['header', 'must not be surrounded by whitespace']),
];
case startsWithWhiteSpace:
return [false, (0, message_1.default)(['header', 'must not start with whitespace'])];
return [false, message(['header', 'must not start with whitespace'])];
case endsWithWhiteSpace:
return [false, (0, message_1.default)(['header', 'must not end with whitespace'])];
return [false, message(['header', 'must not end with whitespace'])];
default:

@@ -27,3 +24,2 @@ return [true];

};
exports.headerTrim = headerTrim;
//# sourceMappingURL=header-trim.js.map

@@ -1,77 +0,75 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const body_case_1 = require("./body-case");
const body_empty_1 = require("./body-empty");
const body_full_stop_1 = require("./body-full-stop");
const body_leading_blank_1 = require("./body-leading-blank");
const body_max_length_1 = require("./body-max-length");
const body_max_line_length_1 = require("./body-max-line-length");
const body_min_length_1 = require("./body-min-length");
const footer_empty_1 = require("./footer-empty");
const footer_leading_blank_1 = require("./footer-leading-blank");
const footer_max_length_1 = require("./footer-max-length");
const footer_max_line_length_1 = require("./footer-max-line-length");
const footer_min_length_1 = require("./footer-min-length");
const header_case_1 = require("./header-case");
const header_full_stop_1 = require("./header-full-stop");
const header_trim_1 = require("./header-trim");
const header_max_length_1 = require("./header-max-length");
const header_min_length_1 = require("./header-min-length");
const references_empty_1 = require("./references-empty");
const scope_case_1 = require("./scope-case");
const scope_empty_1 = require("./scope-empty");
const scope_enum_1 = require("./scope-enum");
const scope_max_length_1 = require("./scope-max-length");
const scope_min_length_1 = require("./scope-min-length");
const signed_off_by_1 = require("./signed-off-by");
const subject_case_1 = require("./subject-case");
const subject_empty_1 = require("./subject-empty");
const subject_full_stop_1 = require("./subject-full-stop");
const subject_max_length_1 = require("./subject-max-length");
const subject_min_length_1 = require("./subject-min-length");
const subject_exclamation_mark_1 = require("./subject-exclamation-mark");
const trailer_exists_1 = require("./trailer-exists");
const type_case_1 = require("./type-case");
const type_empty_1 = require("./type-empty");
const type_enum_1 = require("./type-enum");
const type_max_length_1 = require("./type-max-length");
const type_min_length_1 = require("./type-min-length");
exports.default = {
'body-case': body_case_1.bodyCase,
'body-empty': body_empty_1.bodyEmpty,
'body-full-stop': body_full_stop_1.bodyFullStop,
'body-leading-blank': body_leading_blank_1.bodyLeadingBlank,
'body-max-length': body_max_length_1.bodyMaxLength,
'body-max-line-length': body_max_line_length_1.bodyMaxLineLength,
'body-min-length': body_min_length_1.bodyMinLength,
'footer-empty': footer_empty_1.footerEmpty,
'footer-leading-blank': footer_leading_blank_1.footerLeadingBlank,
'footer-max-length': footer_max_length_1.footerMaxLength,
'footer-max-line-length': footer_max_line_length_1.footerMaxLineLength,
'footer-min-length': footer_min_length_1.footerMinLength,
'header-case': header_case_1.headerCase,
'header-full-stop': header_full_stop_1.headerFullStop,
'header-max-length': header_max_length_1.headerMaxLength,
'header-min-length': header_min_length_1.headerMinLength,
'header-trim': header_trim_1.headerTrim,
'references-empty': references_empty_1.referencesEmpty,
'scope-case': scope_case_1.scopeCase,
'scope-empty': scope_empty_1.scopeEmpty,
'scope-enum': scope_enum_1.scopeEnum,
'scope-max-length': scope_max_length_1.scopeMaxLength,
'scope-min-length': scope_min_length_1.scopeMinLength,
'signed-off-by': signed_off_by_1.signedOffBy,
'subject-case': subject_case_1.subjectCase,
'subject-empty': subject_empty_1.subjectEmpty,
'subject-full-stop': subject_full_stop_1.subjectFullStop,
'subject-max-length': subject_max_length_1.subjectMaxLength,
'subject-min-length': subject_min_length_1.subjectMinLength,
'subject-exclamation-mark': subject_exclamation_mark_1.subjectExclamationMark,
'trailer-exists': trailer_exists_1.trailerExists,
'type-case': type_case_1.typeCase,
'type-empty': type_empty_1.typeEmpty,
'type-enum': type_enum_1.typeEnum,
'type-max-length': type_max_length_1.typeMaxLength,
'type-min-length': type_min_length_1.typeMinLength,
import { bodyCase } from './body-case.js';
import { bodyEmpty } from './body-empty.js';
import { bodyFullStop } from './body-full-stop.js';
import { bodyLeadingBlank } from './body-leading-blank.js';
import { bodyMaxLength } from './body-max-length.js';
import { bodyMaxLineLength } from './body-max-line-length.js';
import { bodyMinLength } from './body-min-length.js';
import { footerEmpty } from './footer-empty.js';
import { footerLeadingBlank } from './footer-leading-blank.js';
import { footerMaxLength } from './footer-max-length.js';
import { footerMaxLineLength } from './footer-max-line-length.js';
import { footerMinLength } from './footer-min-length.js';
import { headerCase } from './header-case.js';
import { headerFullStop } from './header-full-stop.js';
import { headerMaxLength } from './header-max-length.js';
import { headerMinLength } from './header-min-length.js';
import { headerTrim } from './header-trim.js';
import { referencesEmpty } from './references-empty.js';
import { scopeCase } from './scope-case.js';
import { scopeEmpty } from './scope-empty.js';
import { scopeEnum } from './scope-enum.js';
import { scopeMaxLength } from './scope-max-length.js';
import { scopeMinLength } from './scope-min-length.js';
import { signedOffBy } from './signed-off-by.js';
import { subjectCase } from './subject-case.js';
import { subjectEmpty } from './subject-empty.js';
import { subjectFullStop } from './subject-full-stop.js';
import { subjectMaxLength } from './subject-max-length.js';
import { subjectMinLength } from './subject-min-length.js';
import { subjectExclamationMark } from './subject-exclamation-mark.js';
import { trailerExists } from './trailer-exists.js';
import { typeCase } from './type-case.js';
import { typeEmpty } from './type-empty.js';
import { typeEnum } from './type-enum.js';
import { typeMaxLength } from './type-max-length.js';
import { typeMinLength } from './type-min-length.js';
export default {
'body-case': bodyCase,
'body-empty': bodyEmpty,
'body-full-stop': bodyFullStop,
'body-leading-blank': bodyLeadingBlank,
'body-max-length': bodyMaxLength,
'body-max-line-length': bodyMaxLineLength,
'body-min-length': bodyMinLength,
'footer-empty': footerEmpty,
'footer-leading-blank': footerLeadingBlank,
'footer-max-length': footerMaxLength,
'footer-max-line-length': footerMaxLineLength,
'footer-min-length': footerMinLength,
'header-case': headerCase,
'header-full-stop': headerFullStop,
'header-max-length': headerMaxLength,
'header-min-length': headerMinLength,
'header-trim': headerTrim,
'references-empty': referencesEmpty,
'scope-case': scopeCase,
'scope-empty': scopeEmpty,
'scope-enum': scopeEnum,
'scope-max-length': scopeMaxLength,
'scope-min-length': scopeMinLength,
'signed-off-by': signedOffBy,
'subject-case': subjectCase,
'subject-empty': subjectEmpty,
'subject-full-stop': subjectFullStop,
'subject-max-length': subjectMaxLength,
'subject-min-length': subjectMinLength,
'subject-exclamation-mark': subjectExclamationMark,
'trailer-exists': trailerExists,
'type-case': typeCase,
'type-empty': typeEmpty,
'type-enum': typeEnum,
'type-max-length': typeMaxLength,
'type-min-length': typeMinLength,
};
//# sourceMappingURL=index.js.map

@@ -1,9 +0,3 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.referencesEmpty = void 0;
const message_1 = __importDefault(require("@commitlint/message"));
const referencesEmpty = (parsed, when = 'never') => {
import message from '@commitlint/message';
export const referencesEmpty = (parsed, when = 'never') => {
const negated = when === 'always';

@@ -13,6 +7,5 @@ const notEmpty = parsed.references.length > 0;

negated ? !notEmpty : notEmpty,
(0, message_1.default)(['references', negated ? 'must' : 'may not', 'be empty']),
message(['references', negated ? 'must' : 'may not', 'be empty']),
];
};
exports.referencesEmpty = referencesEmpty;
//# sourceMappingURL=references-empty.js.map

@@ -1,11 +0,5 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.scopeCase = void 0;
const ensure_1 = require("@commitlint/ensure");
const message_1 = __importDefault(require("@commitlint/message"));
import { case as ensureCase } from '@commitlint/ensure';
import message from '@commitlint/message';
const negated = (when) => when === 'never';
const scopeCase = (parsed, when = 'always', value = []) => {
export const scopeCase = (parsed, when = 'always', value = []) => {
const { scope } = parsed;

@@ -29,3 +23,3 @@ if (!scope) {

const result = checks.some((check) => {
const r = scopeSegments.every((segment) => delimiters.test(segment) || (0, ensure_1.case)(segment, check.case));
const r = scopeSegments.every((segment) => delimiters.test(segment) || ensureCase(segment, check.case));
return negated(check.when) ? !r : r;

@@ -36,6 +30,5 @@ });

negated(when) ? !result : result,
(0, message_1.default)([`scope must`, negated(when) ? `not` : null, `be ${list}`]),
message([`scope must`, negated(when) ? `not` : null, `be ${list}`]),
];
};
exports.scopeCase = scopeCase;
//# sourceMappingURL=scope-case.js.map

@@ -1,33 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.scopeEmpty = void 0;
const ensure = __importStar(require("@commitlint/ensure"));
const message_1 = __importDefault(require("@commitlint/message"));
const scopeEmpty = (parsed, when = 'never') => {
import * as ensure from '@commitlint/ensure';
import message from '@commitlint/message';
export const scopeEmpty = (parsed, when = 'never') => {
const negated = when === 'always';

@@ -37,6 +8,5 @@ const notEmpty = ensure.notEmpty(parsed.scope || '');

negated ? !notEmpty : notEmpty,
(0, message_1.default)(['scope', negated ? 'must' : 'may not', 'be empty']),
message(['scope', negated ? 'must' : 'may not', 'be empty']),
];
};
exports.scopeEmpty = scopeEmpty;
//# sourceMappingURL=scope-empty.js.map

@@ -1,33 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.scopeEnum = void 0;
const ensure = __importStar(require("@commitlint/ensure"));
const message_1 = __importDefault(require("@commitlint/message"));
const scopeEnum = ({ scope }, when = 'always', value = []) => {
import * as ensure from '@commitlint/ensure';
import message from '@commitlint/message';
export const scopeEnum = ({ scope }, when = 'always', value = []) => {
if (!scope || !value.length) {

@@ -50,5 +21,4 @@ return [true, ''];

}
return [isValid, (0, message_1.default)(errorMessage)];
return [isValid, message(errorMessage)];
};
exports.scopeEnum = scopeEnum;
//# sourceMappingURL=scope-enum.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.scopeMaxLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const scopeMaxLength = (parsed, _when = undefined, value = 0) => {
import { maxLength } from '@commitlint/ensure';
export const scopeMaxLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.scope;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.maxLength)(input, value),
maxLength(input, value),
`scope must not be longer than ${value} characters`,
];
};
exports.scopeMaxLength = scopeMaxLength;
//# sourceMappingURL=scope-max-length.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.scopeMinLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const scopeMinLength = (parsed, _when = undefined, value = 0) => {
import { minLength } from '@commitlint/ensure';
export const scopeMinLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.scope;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.minLength)(input, value),
minLength(input, value),
`scope must not be shorter than ${value} characters`,
];
};
exports.scopeMinLength = scopeMinLength;
//# sourceMappingURL=scope-min-length.js.map

@@ -1,11 +0,5 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.signedOffBy = void 0;
const message_1 = __importDefault(require("@commitlint/message"));
const to_lines_1 = __importDefault(require("@commitlint/to-lines"));
const signedOffBy = (parsed, when = 'always', value = '') => {
const lines = (0, to_lines_1.default)(parsed.raw).filter((ln) =>
import message from '@commitlint/message';
import toLines from '@commitlint/to-lines';
export const signedOffBy = (parsed, when = 'always', value = '') => {
const lines = toLines(parsed.raw).filter((ln) =>
// skip comments

@@ -20,6 +14,5 @@ !ln.startsWith('#') &&

negated ? !hasSignedOffBy : hasSignedOffBy,
(0, message_1.default)(['message', negated ? 'must not' : 'must', 'be signed off']),
message(['message', negated ? 'must not' : 'must', 'be signed off']),
];
};
exports.signedOffBy = signedOffBy;
//# sourceMappingURL=signed-off-by.js.map

@@ -1,9 +0,3 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.subjectCase = void 0;
const ensure_1 = require("@commitlint/ensure");
const message_1 = __importDefault(require("@commitlint/message"));
import { case as ensureCase } from '@commitlint/ensure';
import message from '@commitlint/message';
/**

@@ -26,3 +20,3 @@ * Since the rule requires first symbol of a subject to be a letter, use

const negated = (when) => when === 'never';
const subjectCase = (parsed, when = 'always', value = []) => {
export const subjectCase = (parsed, when = 'always', value = []) => {
const { subject } = parsed;

@@ -42,3 +36,3 @@ if (typeof subject !== 'string' || !subject.match(startsWithLetterRegex)) {

const result = checks.some((check) => {
const r = (0, ensure_1.case)(subject, check.case);
const r = ensureCase(subject, check.case);
return negated(check.when) ? !r : r;

@@ -49,6 +43,5 @@ });

negated(when) ? !result : result,
(0, message_1.default)([`subject must`, negated(when) ? `not` : null, `be ${list}`]),
message([`subject must`, negated(when) ? `not` : null, `be ${list}`]),
];
};
exports.subjectCase = subjectCase;
//# sourceMappingURL=subject-case.js.map

@@ -1,33 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.subjectEmpty = void 0;
const ensure = __importStar(require("@commitlint/ensure"));
const message_1 = __importDefault(require("@commitlint/message"));
const subjectEmpty = (parsed, when = 'always') => {
import * as ensure from '@commitlint/ensure';
import message from '@commitlint/message';
export const subjectEmpty = (parsed, when = 'always') => {
const negated = when === 'never';

@@ -37,6 +8,5 @@ const notEmpty = ensure.notEmpty(parsed.subject || '');

negated ? notEmpty : !notEmpty,
(0, message_1.default)(['subject', negated ? 'may not' : 'must', 'be empty']),
message(['subject', negated ? 'may not' : 'must', 'be empty']),
];
};
exports.subjectEmpty = subjectEmpty;
//# sourceMappingURL=subject-empty.js.map

@@ -1,9 +0,3 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.subjectExclamationMark = void 0;
const message_1 = __importDefault(require("@commitlint/message"));
const subjectExclamationMark = (parsed, when = 'always') => {
import message from '@commitlint/message';
export const subjectExclamationMark = (parsed, when = 'always') => {
const input = parsed.header;

@@ -17,3 +11,3 @@ if (!input) {

negated ? !hasExclamationMark : hasExclamationMark,
(0, message_1.default)([
message([
'subject',

@@ -25,3 +19,2 @@ negated ? 'must not' : 'must',

};
exports.subjectExclamationMark = subjectExclamationMark;
//# sourceMappingURL=subject-exclamation-mark.js.map

@@ -1,10 +0,5 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.subjectFullStop = void 0;
const message_1 = __importDefault(require("@commitlint/message"));
const subjectFullStop = (parsed, when = 'always', value = '.') => {
const colonIndex = parsed.header.indexOf(':');
import message from '@commitlint/message';
export const subjectFullStop = (parsed, when = 'always', value = '.') => {
var _a;
const colonIndex = ((_a = parsed.header) === null || _a === void 0 ? void 0 : _a.indexOf(':')) || 0;
if (colonIndex > 0 && colonIndex === parsed.header.length - 1) {

@@ -15,4 +10,4 @@ return [true];

const negated = when === 'never';
let hasStop = input[input.length - 1] === value;
if (input.slice(-3) === '...') {
let hasStop = (input === null || input === void 0 ? void 0 : input[input.length - 1]) === value;
if ((input === null || input === void 0 ? void 0 : input.slice(-3)) === '...') {
hasStop = false;

@@ -22,6 +17,5 @@ }

negated ? !hasStop : hasStop,
(0, message_1.default)(['subject', negated ? 'may not' : 'must', 'end with full stop']),
message(['subject', negated ? 'may not' : 'must', 'end with full stop']),
];
};
exports.subjectFullStop = subjectFullStop;
//# sourceMappingURL=subject-full-stop.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.subjectMaxLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const subjectMaxLength = (parsed, _when = undefined, value = 0) => {
import { maxLength } from '@commitlint/ensure';
export const subjectMaxLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.subject;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.maxLength)(input, value),
maxLength(input, value),
`subject must not be longer than ${value} characters`,
];
};
exports.subjectMaxLength = subjectMaxLength;
//# sourceMappingURL=subject-max-length.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.subjectMinLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const subjectMinLength = (parsed, _when = undefined, value = 0) => {
import { minLength } from '@commitlint/ensure';
export const subjectMinLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.subject;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.minLength)(input, value),
minLength(input, value),
`subject must not be shorter than ${value} characters`,
];
};
exports.subjectMinLength = subjectMinLength;
//# sourceMappingURL=subject-min-length.js.map

@@ -1,15 +0,9 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.trailerExists = void 0;
const execa_1 = __importDefault(require("execa"));
const message_1 = __importDefault(require("@commitlint/message"));
const to_lines_1 = __importDefault(require("@commitlint/to-lines"));
const trailerExists = (parsed, when = 'always', value = '') => {
const trailers = execa_1.default.sync('git', ['interpret-trailers', '--parse'], {
input: parsed.raw,
import { execaSync } from 'execa';
import message from '@commitlint/message';
import toLines from '@commitlint/to-lines';
export const trailerExists = (parsed, when = 'always', value = '') => {
const trailers = execaSync('git', ['interpret-trailers', '--parse'], {
input: parsed.raw || '',
}).stdout;
const matches = (0, to_lines_1.default)(trailers).filter((ln) => ln.startsWith(value)).length;
const matches = toLines(trailers).filter((ln) => ln.startsWith(value)).length;
const negated = when === 'never';

@@ -19,3 +13,3 @@ const hasTrailer = matches > 0;

negated ? !hasTrailer : hasTrailer,
(0, message_1.default)([
message([
'message',

@@ -27,3 +21,2 @@ negated ? 'must not' : 'must',

};
exports.trailerExists = trailerExists;
//# sourceMappingURL=trailer-exists.js.map

@@ -1,11 +0,5 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.typeCase = void 0;
const ensure_1 = require("@commitlint/ensure");
const message_1 = __importDefault(require("@commitlint/message"));
import { case as ensureCase } from '@commitlint/ensure';
import message from '@commitlint/message';
const negated = (when) => when === 'never';
const typeCase = (parsed, when = 'always', value = []) => {
export const typeCase = (parsed, when = 'always', value = []) => {
const { type } = parsed;

@@ -25,3 +19,3 @@ if (!type) {

const result = checks.some((check) => {
const r = (0, ensure_1.case)(type, check.case);
const r = ensureCase(type, check.case);
return negated(check.when) ? !r : r;

@@ -32,6 +26,5 @@ });

negated(when) ? !result : result,
(0, message_1.default)([`type must`, negated(when) ? `not` : null, `be ${list}`]),
message([`type must`, negated(when) ? `not` : null, `be ${list}`]),
];
};
exports.typeCase = typeCase;
//# sourceMappingURL=type-case.js.map

@@ -1,33 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.typeEmpty = void 0;
const ensure = __importStar(require("@commitlint/ensure"));
const message_1 = __importDefault(require("@commitlint/message"));
const typeEmpty = (parsed, when = 'always') => {
import * as ensure from '@commitlint/ensure';
import message from '@commitlint/message';
export const typeEmpty = (parsed, when = 'always') => {
const negated = when === 'never';

@@ -37,6 +8,5 @@ const notEmpty = ensure.notEmpty(parsed.type || '');

negated ? notEmpty : !notEmpty,
(0, message_1.default)(['type', negated ? 'may not' : 'must', 'be empty']),
message(['type', negated ? 'may not' : 'must', 'be empty']),
];
};
exports.typeEmpty = typeEmpty;
//# sourceMappingURL=type-empty.js.map

@@ -1,33 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.typeEnum = void 0;
const ensure = __importStar(require("@commitlint/ensure"));
const message_1 = __importDefault(require("@commitlint/message"));
const typeEnum = (parsed, when = 'always', value = []) => {
import * as ensure from '@commitlint/ensure';
import message from '@commitlint/message';
export const typeEnum = (parsed, when = 'always', value = []) => {
const { type: input } = parsed;

@@ -41,3 +12,3 @@ if (!input) {

negated ? !result : result,
(0, message_1.default)([
message([
`type must`,

@@ -49,3 +20,2 @@ negated ? `not` : null,

};
exports.typeEnum = typeEnum;
//# sourceMappingURL=type-enum.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.typeMaxLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const typeMaxLength = (parsed, _when = undefined, value = 0) => {
import { maxLength } from '@commitlint/ensure';
export const typeMaxLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.type;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.maxLength)(input, value),
maxLength(input, value),
`type must not be longer than ${value} characters`,
];
};
exports.typeMaxLength = typeMaxLength;
//# sourceMappingURL=type-max-length.js.map

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.typeMinLength = void 0;
const ensure_1 = require("@commitlint/ensure");
const typeMinLength = (parsed, _when = undefined, value = 0) => {
import { minLength } from '@commitlint/ensure';
export const typeMinLength = (parsed, _when = undefined, value = 0) => {
const input = parsed.type;

@@ -11,7 +8,6 @@ if (!input) {

return [
(0, ensure_1.minLength)(input, value),
minLength(input, value),
`type must not be shorter than ${value} characters`,
];
};
exports.typeMinLength = typeMinLength;
//# sourceMappingURL=type-min-length.js.map
{
"name": "@commitlint/rules",
"version": "18.6.1",
"type": "module",
"version": "19.0.0",
"description": "Lint your commit messages",

@@ -38,16 +39,16 @@ "main": "lib/index.js",

"devDependencies": {
"@commitlint/parse": "^18.6.1",
"@commitlint/test": "^18.0.0",
"@commitlint/utils": "^18.6.1",
"conventional-changelog-angular": "7.0.0",
"glob": "^8.0.3"
"@commitlint/parse": "^19.0.0",
"@commitlint/test": "^19.0.0",
"@commitlint/utils": "^19.0.0",
"conventional-changelog-angular": "^7.0.0",
"glob": "^10.3.10"
},
"dependencies": {
"@commitlint/ensure": "^18.6.1",
"@commitlint/message": "^18.6.1",
"@commitlint/to-lines": "^18.6.1",
"@commitlint/types": "^18.6.1",
"execa": "^5.0.0"
"@commitlint/ensure": "^19.0.0",
"@commitlint/message": "^19.0.0",
"@commitlint/to-lines": "^19.0.0",
"@commitlint/types": "^19.0.0",
"execa": "^8.0.1"
},
"gitHead": "89f5bf91d1c11b1f457a6f0d99b8ea34583a9311"
"gitHead": "f1ff12159d627ee63bf8982ab02e6cca8f10b09f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc