UNPKG

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