UNPKG

786 BSource Map (JSON)View Raw
1{"version":3,"sources":["../src/type-empty.js"],"names":["ensure","parsed","when","negated","notEmpty","type"],"mappings":";;;;;;AAAA;;IAAYA,M;;AACZ;;;;;;;;kBAEe,UAACC,MAAD,EAASC,IAAT,EAAkB;AAChC,KAAMC,UAAUD,SAAS,OAAzB;AACA,KAAME,WAAWJ,OAAOI,QAAP,CAAgBH,OAAOI,IAAvB,CAAjB;AACA,QAAO,CACNF,UAAUC,QAAV,GAAqB,CAACA,QADhB,EAEN,uBAAQ,CAAC,MAAD,EAASD,UAAU,SAAV,GAAsB,MAA/B,EAAuC,UAAvC,CAAR,CAFM,CAAP;AAIA,C","file":"type-empty.js","sourcesContent":["import * as ensure from '@commitlint/ensure';\nimport message from '@commitlint/message';\n\nexport default (parsed, when) => {\n\tconst negated = when === 'never';\n\tconst notEmpty = ensure.notEmpty(parsed.type);\n\treturn [\n\t\tnegated ? notEmpty : !notEmpty,\n\t\tmessage(['type', negated ? 'may not' : 'must', 'be empty'])\n\t];\n};\n"]}
\No newline at end of file