body-max-length.js 513 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.bodyMaxLength = void 0;
  4. const ensure_1 = require("@commitlint/ensure");
  5. const bodyMaxLength = (parsed, _when = undefined, value = 0) => {
  6. const input = parsed.body;
  7. if (!input) {
  8. return [true];
  9. }
  10. return [
  11. (0, ensure_1.maxLength)(input, value),
  12. `body must not be longer than ${value} characters`,
  13. ];
  14. };
  15. exports.bodyMaxLength = bodyMaxLength;
  16. //# sourceMappingURL=body-max-length.js.map