UNPKG

677 BSource Map (JSON)View Raw
1{"version":3,"sources":["../src/footer-max-length.js"],"names":["parsed","when","value","input","footer"],"mappings":";;;;;;AAAA;;kBAEe,UAACA,MAAD,EAASC,IAAT,EAAeC,KAAf,EAAyB;AACvC,KAAMC,QAAQH,OAAOI,MAArB;;AAEA,KAAI,CAACD,KAAL,EAAY;AACX,SAAO,CAAC,IAAD,CAAP;AACA;;AAED,QAAO,CACN,uBAAUA,KAAV,EAAiBD,KAAjB,CADM,EAEL,kCAAiCA,KAAM,aAFlC,CAAP;AAIA,C","file":"footer-max-length.js","sourcesContent":["import {maxLength} from '@commitlint/ensure';\n\nexport default (parsed, when, value) => {\n\tconst input = parsed.footer;\n\n\tif (!input) {\n\t\treturn [true];\n\t}\n\n\treturn [\n\t\tmaxLength(input, value),\n\t\t`footer must not be longer than ${value} characters`\n\t];\n};\n"]}
\No newline at end of file