@mindblowing/commitlint-config-jira
Version:
A recomended config who contain preconfigured rules for jira commits messages style
1 lines • 3.85 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("commitlintConfigJira",[],e):"object"==typeof exports?exports.commitlintConfigJira=e():t.commitlintConfigJira=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"JIRA_RULES",(function(){return o})),n.d(r,"COMMIT_TASK_STATUS_PATTERN",(function(){return i})),n.d(r,"TASK_ID_SEPARATOR",(function(){return a})),n.d(r,"UPPERCASE",(function(){return u})),n.d(r,"LOWERCASE",(function(){return s})),n.d(r,"COMMIT_DESCRIPTION_SEPARATOR",(function(){return c})),n.d(r,"COMMIT_TASK_ID_PATTERN",(function(){return f}));const o={commitStatusCase:"jira-commit-status-case",taskIdCase:"jira-task-id-case",taskIdEmpty:"jira-task-id-empty",taskIdMaxLength:"jira-task-id-max-length",taskIdMinLength:"jira-task-id-min-length",taskIdProjectKey:"jira-task-id-project-key"},i=/\[.*\]/gi,a="-",u="uppercase",s="lowercase",c="\n",f=/([A-Z]{2,}-\d+)/g;var l=t=>{const e=t.split(c).filter(Boolean)[0],n=e.match(i),r=n?n[0].replace(/\[|\]/g,""):"";return{commitTaskIds:(e.match(f)||[]).map(t=>t.trim()).filter(t=>t),commitStatus:r}};n.d(e,"commitlintJiraConstants",(function(){return r})),n.d(e,"parseCommitMessage",(function(){return l}));const d={commitlintJiraConstants:r,parseCommitMessage:l};e.default=d}]).default},function(t,e,n){"use strict";n.r(e),n.d(e,"commitlintConfigJira",(function(){return o}));var r=n(0);const o={rules:{[r.commitlintJiraConstants.JIRA_RULES.taskIdEmpty]:[2,"always"],[r.commitlintJiraConstants.JIRA_RULES.taskIdCase]:[2,"always",r.commitlintJiraConstants.UPPERCASE],[r.commitlintJiraConstants.JIRA_RULES.taskIdProjectKey]:[2,"always",!1],[r.commitlintJiraConstants.JIRA_RULES.taskIdMinLength]:[2,"always",3],[r.commitlintJiraConstants.JIRA_RULES.taskIdMaxLength]:[2,"always",9],[r.commitlintJiraConstants.JIRA_RULES.commitStatusCase]:[2,"always",r.commitlintJiraConstants.UPPERCASE]}};e.default=o}]).default}));