commitlint-config-jira
Advanced tools
Comparing version 1.3.0 to 1.4.0
export interface CommitlintConfigJira { | ||
rules: { | ||
[key: string]: number | (number | string)[] | ||
[key: string]: number | (number | string | boolean)[] | ||
} | ||
@@ -5,0 +5,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!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 i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));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 i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));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 i})),n.d(r,"COMMIT_MESSAGE_SEPARATOR",(function(){return o})),n.d(r,"COMMIT_TASK_IDS_SEPARATOR",(function(){return a})),n.d(r,"COMMIT_TASK_STATUS_PATTERN",(function(){return s})),n.d(r,"TASK_ID_SEPARATOR",(function(){return u})),n.d(r,"COMMIT_STATUS_SEPARATORS",(function(){return c})),n.d(r,"UPPERCASE",(function(){return l})),n.d(r,"LOWERCASE",(function(){return f})),n.d(r,"COMMIT_DESCRIPTION_SEPARATOR",(function(){return m}));const i={commitStatusCase:"jira-commit-status-case",taskIdCase:"jira-task-id-case",taskIdSeparator:"jira-task-id-separator",taskIdEmpty:"jira-task-id-empty",taskIdMaxLength:"jira-task-id-max-length",taskIdMinLength:"jira-task-id-min-length",commitMessageSeparator:"jira-commit-message-separator"},o=":",a=",",s=/\[.*\]/gi,u="-",c={start:"[",end:"]"},l="uppercase",f="lowercase",m="\n";var d=t=>{const e=t.split(m).filter(t=>t)[0].split(o),n=e.length>=2?e[0]:"",r=n.replace(s,"").trim(),i=e.length>2?e.filter((t,e)=>e>0).join(o).trim():e[e.length-1].trim(),u=n.split(c.end),l=u.length?u[0].replace(c.start,"").trim():"";return{commitTaskIds:r.split(a).map(t=>t.trim()).filter(t=>t),commitFooter:i,commitHeader:r,commitStatus:l}};n.d(e,"commitlintJiraConstants",(function(){return r})),n.d(e,"parseCommitMessage",(function(){return d}));const p={commitlintJiraConstants:r,parseCommitMessage:d};e.default=p}]).default},function(t,e,n){"use strict";n.r(e),n.d(e,"commitlintConfigJira",(function(){return i}));var r=n(0);const i={rules:{[r.commitlintJiraConstants.JIRA_RULES.taskIdEmpty]:[2,"always"],[r.commitlintJiraConstants.JIRA_RULES.taskIdMinLength]:[2,"always",3],[r.commitlintJiraConstants.JIRA_RULES.taskIdMaxLength]:[2,"always",9],[r.commitlintJiraConstants.JIRA_RULES.taskIdSeparator]:[2,"always",r.commitlintJiraConstants.TASK_ID_SEPARATOR],[r.commitlintJiraConstants.JIRA_RULES.taskIdCase]:[2,"always",r.commitlintJiraConstants.UPPERCASE],[r.commitlintJiraConstants.JIRA_RULES.commitStatusCase]:[2,"always",r.commitlintJiraConstants.UPPERCASE],[r.commitlintJiraConstants.JIRA_RULES.commitMessageSeparator]:[2,"always",r.commitlintJiraConstants.COMMIT_MESSAGE_SEPARATOR]}};e.default=i}]).default})); | ||
!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 i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));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 i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));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 i})),n.d(r,"COMMIT_MESSAGE_SEPARATOR",(function(){return o})),n.d(r,"COMMIT_TASK_IDS_SEPARATOR",(function(){return a})),n.d(r,"COMMIT_TASK_STATUS_PATTERN",(function(){return s})),n.d(r,"TASK_ID_SEPARATOR",(function(){return u})),n.d(r,"COMMIT_STATUS_SEPARATORS",(function(){return c})),n.d(r,"UPPERCASE",(function(){return l})),n.d(r,"LOWERCASE",(function(){return m})),n.d(r,"COMMIT_DESCRIPTION_SEPARATOR",(function(){return f}));const i={commitStatusCase:"jira-commit-status-case",taskIdCase:"jira-task-id-case",taskIdSeparator:"jira-task-id-separator",taskIdEmpty:"jira-task-id-empty",taskIdMaxLength:"jira-task-id-max-length",taskIdMinLength:"jira-task-id-min-length",commitMessageSeparator:"jira-commit-message-separator",taskIdProjectKey:"jira-task-id-project-key"},o=":",a=",",s=/\[.*\]/gi,u="-",c={start:"[",end:"]"},l="uppercase",m="lowercase",f="\n";var d=t=>{const e=t.split(f).filter(t=>t)[0].split(o),n=e.length>=2?e[0]:"",r=n.replace(s,"").trim(),i=e.length>2?e.filter((t,e)=>e>0).join(o).trim():e[e.length-1].trim(),u=n.split(c.end),l=u.length?u[0].replace(c.start,"").trim():"";return{commitTaskIds:r.split(a).map(t=>t.trim()).filter(t=>t),commitFooter:i,commitHeader:r,commitStatus:l}};n.d(e,"commitlintJiraConstants",(function(){return r})),n.d(e,"parseCommitMessage",(function(){return d}));const p={commitlintJiraConstants:r,parseCommitMessage:d};e.default=p}]).default},function(t,e,n){"use strict";n.r(e),n.d(e,"commitlintConfigJira",(function(){return i}));var r=n(0);const i={rules:{[r.commitlintJiraConstants.JIRA_RULES.commitMessageSeparator]:[2,"always",r.commitlintJiraConstants.COMMIT_MESSAGE_SEPARATOR],[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.taskIdSeparator]:[2,"always",r.commitlintJiraConstants.TASK_ID_SEPARATOR],[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=i}]).default})); |
{ | ||
"name": "commitlint-config-jira", | ||
"description": "A recomended config who contain preconfigured rules for jira commits messages style", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"license": "MIT", | ||
@@ -30,3 +30,4 @@ "author": { | ||
"build": "rimraf ./build && cross-env NODE_ENV=production webpack", | ||
"watch": "cross-env NODE_ENV=development webpack -w" | ||
"watch": "cross-env NODE_ENV=development webpack -w", | ||
"_postinstall": "opencollective-postinstall || exit 0" | ||
}, | ||
@@ -42,5 +43,14 @@ "devDependencies": { | ||
"dependencies": { | ||
"commitlint-jira-utils": "^1.3.0" | ||
"commitlint-jira-utils": "^1.4.0", | ||
"opencollective-postinstall": "^2.0.2" | ||
}, | ||
"gitHead": "9d0fdc536a2ecac2a03e73103da090ec70035ed4" | ||
"collective": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/gherciu-gheorghe" | ||
}, | ||
"funding": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/gherciu-gheorghe" | ||
}, | ||
"gitHead": "586ee7f8d72fe650f30ac5a55f8451c21d4f9b4c" | ||
} |
@@ -47,2 +47,4 @@ <div align="center"> | ||
## Rules | ||
`jira-task-id-empty` - this rule check if commit message task id is not empty. | ||
@@ -63,3 +65,3 @@ | ||
```bash | ||
// Preconfigured and recomended value in commitlint-config-jira is 9 chars | ||
// Preconfigured and recommended value in commitlint-config-jira is 9 chars | ||
// ❌ Bad commit messages | ||
@@ -75,3 +77,3 @@ git commit -m"IB-2121212121212121: My commit message body" | ||
```bash | ||
// Preconfigured and recomended value in commitlint-config-jira is 3 chars | ||
// Preconfigured and recommended value in commitlint-config-jira is 3 chars | ||
// ❌ Bad commit messages | ||
@@ -87,3 +89,3 @@ git commit -m"I1: My commit message body" | ||
```bash | ||
// Preconfigured and recomended value in commitlint-config-jira is "uppercase" | ||
// Preconfigured and recommended value in commitlint-config-jira is "uppercase" | ||
// ❌ Bad commit messages | ||
@@ -99,3 +101,3 @@ git commit -m"ib-21: My commit message body" | ||
```bash | ||
// Preconfigured and recomended value in commitlint-config-jira is "-" | ||
// Preconfigured and recommended value in commitlint-config-jira is "-" | ||
// ❌ Bad commit messages | ||
@@ -109,2 +111,14 @@ git commit -m"IB/21: My commit message body" | ||
`jira-task-id-project-key` - this rule check if commit message task id starts with specific project key. | ||
```bash | ||
// Accept a string or an array of strings, by default is disabled | ||
// For exmample ["PRJ1", "PRJ2"] | ||
// ❌ Bad commit messages | ||
git commit -m"IB-21: My commit message body" | ||
// ✅ Good commit messages | ||
git commit -m"PRJ1-21, PRJ1-22: My commit message body" | ||
git commit -m"PRJ2-21: My commit message body" | ||
``` | ||
`jira-commit-status-case` - this rule check if commit status is in provided case. | ||
@@ -111,0 +125,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13311
174
2
+ Addedopencollective-postinstall@2.0.3(transitive)
Updatedcommitlint-jira-utils@^1.4.0