@forsakringskassan/commitlint-config 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ *{{#if scope}} **{{scope}}:**
2
+ {{~/if}} {{#if subject}}
3
+ {{~subject}}
4
+ {{~else}}
5
+ {{~header}}
6
+ {{~/if}}
7
+
8
+ {{~!-- commit link --}} {{#if @root.linkReferences~}}
9
+ ([{{shortHash}}](
10
+ {{~#if @root.repository}}
11
+ {{~#if @root.host}}
12
+ {{~@root.host}}/
13
+ {{~/if}}
14
+ {{~#if @root.owner}}
15
+ {{~@root.owner}}/
16
+ {{~/if}}
17
+ {{~@root.repository}}
18
+ {{~else}}
19
+ {{~@root.repoUrl}}
20
+ {{~/if}}/
21
+ {{~@root.commit}}/{{hash}}))
22
+ {{~else}}
23
+ {{~shortHash}}
24
+ {{~/if}}
25
+
26
+ {{~!-- commit references --}}
27
+ {{~#if references~}}
28
+ , closes
29
+ {{~#each references}} {{#if @root.linkReferences~}}
30
+ [
31
+ {{~#if this.owner}}
32
+ {{~this.owner}}/
33
+ {{~/if}}
34
+ {{~this.repository}}#{{this.issue}}](
35
+ {{~#if @root.repository}}
36
+ {{~#if @root.host}}
37
+ {{~@root.host}}/
38
+ {{~/if}}
39
+ {{~#if this.repository}}
40
+ {{~#if this.owner}}
41
+ {{~this.owner}}/
42
+ {{~/if}}
43
+ {{~this.repository}}
44
+ {{~else}}
45
+ {{~#if @root.owner}}
46
+ {{~@root.owner}}/
47
+ {{~/if}}
48
+ {{~@root.repository}}
49
+ {{~/if}}
50
+ {{~else}}
51
+ {{~@root.repoUrl}}
52
+ {{~/if}}/
53
+ {{~@root.issue}}/{{this.issue}})
54
+ {{~else}}
55
+ {{~#if this.owner}}
56
+ {{~this.owner}}/
57
+ {{~/if}}
58
+ {{~this.repository}}#{{this.issue}}
59
+ {{~/if}}{{/each}}
60
+ {{~/if}}
61
+
@@ -0,0 +1,11 @@
1
+ {{#if noteGroups}}
2
+ {{#each noteGroups}}
3
+
4
+ ### {{title}}
5
+
6
+ {{#each notes}}
7
+ * {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
8
+ {{/each}}
9
+ {{/each}}
10
+
11
+ {{/if}}
@@ -0,0 +1,25 @@
1
+ {{#if isPatch~}}
2
+ ##
3
+ {{~else~}}
4
+ #
5
+ {{~/if}} {{#if @root.linkCompare~}}
6
+ [{{version}}](
7
+ {{~#if @root.repository~}}
8
+ {{~#if @root.host}}
9
+ {{~@root.host}}/
10
+ {{~/if}}
11
+ {{~#if @root.owner}}
12
+ {{~@root.owner}}/
13
+ {{~/if}}
14
+ {{~@root.repository}}
15
+ {{~else}}
16
+ {{~@root.repoUrl}}
17
+ {{~/if~}}
18
+ /compare/{{previousTag}}...{{currentTag}})
19
+ {{~else}}
20
+ {{~version}}
21
+ {{~/if}}
22
+ {{~#if title}} "{{title}}"
23
+ {{~/if}}
24
+ {{~#if date}} ({{date}})
25
+ {{/if}}
@@ -0,0 +1,16 @@
1
+ {{> header}}
2
+
3
+ {{#each commitGroups}}
4
+
5
+ {{#if title}}
6
+ ### {{title}}
7
+
8
+ {{/if}}
9
+ {{#each commits}}
10
+ {{> commit root=@root}}
11
+ {{/each}}
12
+
13
+ {{/each}}
14
+ {{> footer}}
15
+
16
+
@@ -0,0 +1,179 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __commonJS = (cb, mod) => function __require() {
3
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
+ };
5
+
6
+ // node_modules/@commitlint/config-conventional/index.js
7
+ var require_config_conventional = __commonJS({
8
+ "node_modules/@commitlint/config-conventional/index.js"(exports2, module2) {
9
+ module2.exports = {
10
+ parserPreset: "conventional-changelog-conventionalcommits",
11
+ rules: {
12
+ "body-leading-blank": [1, "always"],
13
+ "body-max-line-length": [2, "always", 100],
14
+ "footer-leading-blank": [1, "always"],
15
+ "footer-max-line-length": [2, "always", 100],
16
+ "header-max-length": [2, "always", 100],
17
+ "subject-case": [
18
+ 2,
19
+ "never",
20
+ ["sentence-case", "start-case", "pascal-case", "upper-case"]
21
+ ],
22
+ "subject-empty": [2, "never"],
23
+ "subject-full-stop": [2, "never", "."],
24
+ "type-case": [2, "always", "lower-case"],
25
+ "type-empty": [2, "never"],
26
+ "type-enum": [
27
+ 2,
28
+ "always",
29
+ [
30
+ "build",
31
+ "chore",
32
+ "ci",
33
+ "docs",
34
+ "feat",
35
+ "fix",
36
+ "perf",
37
+ "refactor",
38
+ "revert",
39
+ "style",
40
+ "test"
41
+ ]
42
+ ]
43
+ },
44
+ prompt: {
45
+ questions: {
46
+ type: {
47
+ description: "Select the type of change that you're committing",
48
+ enum: {
49
+ feat: {
50
+ description: "A new feature",
51
+ title: "Features",
52
+ emoji: "\u2728"
53
+ },
54
+ fix: {
55
+ description: "A bug fix",
56
+ title: "Bug Fixes",
57
+ emoji: "\u{1F41B}"
58
+ },
59
+ docs: {
60
+ description: "Documentation only changes",
61
+ title: "Documentation",
62
+ emoji: "\u{1F4DA}"
63
+ },
64
+ style: {
65
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
66
+ title: "Styles",
67
+ emoji: "\u{1F48E}"
68
+ },
69
+ refactor: {
70
+ description: "A code change that neither fixes a bug nor adds a feature",
71
+ title: "Code Refactoring",
72
+ emoji: "\u{1F4E6}"
73
+ },
74
+ perf: {
75
+ description: "A code change that improves performance",
76
+ title: "Performance Improvements",
77
+ emoji: "\u{1F680}"
78
+ },
79
+ test: {
80
+ description: "Adding missing tests or correcting existing tests",
81
+ title: "Tests",
82
+ emoji: "\u{1F6A8}"
83
+ },
84
+ build: {
85
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
86
+ title: "Builds",
87
+ emoji: "\u{1F6E0}"
88
+ },
89
+ ci: {
90
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
91
+ title: "Continuous Integrations",
92
+ emoji: "\u2699\uFE0F"
93
+ },
94
+ chore: {
95
+ description: "Other changes that don't modify src or test files",
96
+ title: "Chores",
97
+ emoji: "\u267B\uFE0F"
98
+ },
99
+ revert: {
100
+ description: "Reverts a previous commit",
101
+ title: "Reverts",
102
+ emoji: "\u{1F5D1}"
103
+ }
104
+ }
105
+ },
106
+ scope: {
107
+ description: "What is the scope of this change (e.g. component or file name)"
108
+ },
109
+ subject: {
110
+ description: "Write a short, imperative tense description of the change"
111
+ },
112
+ body: {
113
+ description: "Provide a longer description of the change"
114
+ },
115
+ isBreaking: {
116
+ description: "Are there any breaking changes?"
117
+ },
118
+ breakingBody: {
119
+ description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself"
120
+ },
121
+ breaking: {
122
+ description: "Describe the breaking changes"
123
+ },
124
+ isIssueAffected: {
125
+ description: "Does this change affect any open issues?"
126
+ },
127
+ issuesBody: {
128
+ description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself"
129
+ },
130
+ issues: {
131
+ description: 'Add issue references (e.g. "fix #123", "re #123".)'
132
+ }
133
+ }
134
+ }
135
+ };
136
+ }
137
+ });
138
+
139
+ // src/messages.js
140
+ var require_messages = __commonJS({
141
+ "src/messages.js"(exports2, module2) {
142
+ module2.exports = {
143
+ MISSING_JIRA_REFERENCE: `subject should contain JIRA reference in the form of "(fixes XY-123)" or "(refs XY-123)"`
144
+ };
145
+ }
146
+ });
147
+
148
+ // src/config/default.js
149
+ var path = require("path");
150
+ var preset = require_config_conventional();
151
+ var messages = require_messages();
152
+ var distDir = path.join(__dirname, "..");
153
+ module.exports = {
154
+ parserPreset: path.join(distDir, "parser.js"),
155
+ formatter: path.join(distDir, "format.js"),
156
+ prompt: preset.prompt,
157
+ rules: {
158
+ ...preset.rules,
159
+ /* the changelog is included with the commits by semantic-release and
160
+ * contains quite long lines and we don't really consider the body format to
161
+ * be important so we disable max length (header still applies) */
162
+ "body-max-line-length": [0],
163
+ "jira-reference": [2, "always"]
164
+ },
165
+ plugins: [
166
+ {
167
+ rules: {
168
+ /* require a jira reference at the end of the commit message */
169
+ "jira-reference": ({ subject }) => {
170
+ const jira = /\((refs|fixes) [A-Z]+-[0-9]+\)$/;
171
+ return [
172
+ subject && subject.match(jira),
173
+ messages.MISSING_JIRA_REFERENCE
174
+ ];
175
+ }
176
+ }
177
+ }
178
+ ]
179
+ };
@@ -0,0 +1,154 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __commonJS = (cb, mod) => function __require() {
3
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
+ };
5
+
6
+ // node_modules/@commitlint/config-conventional/index.js
7
+ var require_config_conventional = __commonJS({
8
+ "node_modules/@commitlint/config-conventional/index.js"(exports2, module2) {
9
+ module2.exports = {
10
+ parserPreset: "conventional-changelog-conventionalcommits",
11
+ rules: {
12
+ "body-leading-blank": [1, "always"],
13
+ "body-max-line-length": [2, "always", 100],
14
+ "footer-leading-blank": [1, "always"],
15
+ "footer-max-line-length": [2, "always", 100],
16
+ "header-max-length": [2, "always", 100],
17
+ "subject-case": [
18
+ 2,
19
+ "never",
20
+ ["sentence-case", "start-case", "pascal-case", "upper-case"]
21
+ ],
22
+ "subject-empty": [2, "never"],
23
+ "subject-full-stop": [2, "never", "."],
24
+ "type-case": [2, "always", "lower-case"],
25
+ "type-empty": [2, "never"],
26
+ "type-enum": [
27
+ 2,
28
+ "always",
29
+ [
30
+ "build",
31
+ "chore",
32
+ "ci",
33
+ "docs",
34
+ "feat",
35
+ "fix",
36
+ "perf",
37
+ "refactor",
38
+ "revert",
39
+ "style",
40
+ "test"
41
+ ]
42
+ ]
43
+ },
44
+ prompt: {
45
+ questions: {
46
+ type: {
47
+ description: "Select the type of change that you're committing",
48
+ enum: {
49
+ feat: {
50
+ description: "A new feature",
51
+ title: "Features",
52
+ emoji: "\u2728"
53
+ },
54
+ fix: {
55
+ description: "A bug fix",
56
+ title: "Bug Fixes",
57
+ emoji: "\u{1F41B}"
58
+ },
59
+ docs: {
60
+ description: "Documentation only changes",
61
+ title: "Documentation",
62
+ emoji: "\u{1F4DA}"
63
+ },
64
+ style: {
65
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
66
+ title: "Styles",
67
+ emoji: "\u{1F48E}"
68
+ },
69
+ refactor: {
70
+ description: "A code change that neither fixes a bug nor adds a feature",
71
+ title: "Code Refactoring",
72
+ emoji: "\u{1F4E6}"
73
+ },
74
+ perf: {
75
+ description: "A code change that improves performance",
76
+ title: "Performance Improvements",
77
+ emoji: "\u{1F680}"
78
+ },
79
+ test: {
80
+ description: "Adding missing tests or correcting existing tests",
81
+ title: "Tests",
82
+ emoji: "\u{1F6A8}"
83
+ },
84
+ build: {
85
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
86
+ title: "Builds",
87
+ emoji: "\u{1F6E0}"
88
+ },
89
+ ci: {
90
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
91
+ title: "Continuous Integrations",
92
+ emoji: "\u2699\uFE0F"
93
+ },
94
+ chore: {
95
+ description: "Other changes that don't modify src or test files",
96
+ title: "Chores",
97
+ emoji: "\u267B\uFE0F"
98
+ },
99
+ revert: {
100
+ description: "Reverts a previous commit",
101
+ title: "Reverts",
102
+ emoji: "\u{1F5D1}"
103
+ }
104
+ }
105
+ },
106
+ scope: {
107
+ description: "What is the scope of this change (e.g. component or file name)"
108
+ },
109
+ subject: {
110
+ description: "Write a short, imperative tense description of the change"
111
+ },
112
+ body: {
113
+ description: "Provide a longer description of the change"
114
+ },
115
+ isBreaking: {
116
+ description: "Are there any breaking changes?"
117
+ },
118
+ breakingBody: {
119
+ description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself"
120
+ },
121
+ breaking: {
122
+ description: "Describe the breaking changes"
123
+ },
124
+ isIssueAffected: {
125
+ description: "Does this change affect any open issues?"
126
+ },
127
+ issuesBody: {
128
+ description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself"
129
+ },
130
+ issues: {
131
+ description: 'Add issue references (e.g. "fix #123", "re #123".)'
132
+ }
133
+ }
134
+ }
135
+ };
136
+ }
137
+ });
138
+
139
+ // src/config/no-jira.js
140
+ var path = require("path");
141
+ var preset = require_config_conventional();
142
+ var distDir = path.join(__dirname, "..");
143
+ module.exports = {
144
+ parserPreset: path.join(distDir, "parser.js"),
145
+ formatter: path.join(distDir, "format.js"),
146
+ prompt: preset.prompt,
147
+ rules: {
148
+ ...preset.rules,
149
+ /* the changelog is included with the commits by semantic-release and
150
+ * contains quite long lines and we don't really consider the body format to
151
+ * be important so we disable max length (header still applies) */
152
+ "body-max-line-length": [0]
153
+ }
154
+ };
@@ -0,0 +1,30 @@
1
+ *{{#if scope}} **{{scope}}:**
2
+ {{~/if}} {{#if subject}}
3
+ {{~subject}}
4
+ {{~else}}
5
+ {{~header}}
6
+ {{~/if}}
7
+
8
+ {{~!-- commit link --}}{{~#if hash}} {{#if @root.linkReferences~}}
9
+ ([{{shortHash}}]({{commitUrlFormat}}))
10
+ {{~else}}
11
+ {{~shortHash}}
12
+ {{~/if}}{{~/if}}
13
+
14
+ {{~!-- commit references --}}
15
+ {{~#if references~}}
16
+ , closes
17
+ {{~#each references}} {{#if @root.linkReferences~}}
18
+ [
19
+ {{~#if this.owner}}
20
+ {{~this.owner}}/
21
+ {{~/if}}
22
+ {{~this.repository}}{{this.prefix}}{{this.issue}}]({{issueUrlFormat}})
23
+ {{~else}}
24
+ {{~#if this.owner}}
25
+ {{~this.owner}}/
26
+ {{~/if}}
27
+ {{~this.repository}}{{this.prefix}}{{this.issue}}
28
+ {{~/if}}{{/each}}
29
+ {{~/if}}
30
+
File without changes
@@ -0,0 +1,9 @@
1
+ ## {{#if @root.linkCompare~}}
2
+ [{{version}}]({{compareUrlFormat}})
3
+ {{~else}}
4
+ {{~version}}
5
+ {{~/if}}
6
+ {{~#if title}} "{{title}}"
7
+ {{~/if}}
8
+ {{~#if date}} ({{date}})
9
+ {{/if}}
@@ -0,0 +1,23 @@
1
+ {{> header}}
2
+
3
+ {{#if noteGroups}}
4
+ {{#each noteGroups}}
5
+
6
+ ### ⚠ {{title}}
7
+
8
+ {{#each notes}}
9
+ * {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
10
+ {{/each}}
11
+ {{/each}}
12
+ {{/if}}
13
+ {{#each commitGroups}}
14
+
15
+ {{#if title}}
16
+ ### {{title}}
17
+
18
+ {{/if}}
19
+ {{#each commits}}
20
+ {{> commit root=@root}}
21
+ {{/each}}
22
+
23
+ {{/each}}