Skip to content

Commit 61c33a0

Browse files
committed
style: format
1 parent 4126ef6 commit 61c33a0

4 files changed

Lines changed: 9 additions & 12 deletions

File tree

src/generate/parseExisting.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
* '[ABCD-123]', then use that as a custom prefix.
1616
*/
1717
export function _splitPrefixDesc(value: string) {
18-
let prefix = ''
19-
let description = ''
18+
let prefix = "";
19+
let description = "";
2020

2121
if (value.includes(":")) {
2222
[prefix, description] = value.split(":", 2);
23-
}
24-
else {
23+
} else {
2524
description = value;
2625
}
2726

@@ -32,9 +31,8 @@ export function _splitPrefixDesc(value: string) {
3231
* Split a prefix (before a colon) into a custom prefix and Conventional Commit type prefix.
3332
*/
3433
function _splitPrefixes(value: string) {
35-
const [customPrefix, typePrefix] = value !== '' && value.includes(" ")
36-
? value.split(" ", 2)
37-
: ["", value];
34+
const [customPrefix, typePrefix] =
35+
value !== "" && value.includes(" ") ? value.split(" ", 2) : ["", value];
3836

3937
return { customPrefix, typePrefix };
4038
}

src/prepareCommitMsg.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export function _cleanJoin(first: string, second: string) {
3636
return `${first} ${second}`.trim();
3737
}
3838

39-
4039
/**
4140
* Determine the Conventional Commit type prefix for a file change.
4241
*/

src/test/generate/parseExisting.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ describe("Split an existing message into components", function () {
88
prefix: "",
99
description: "abc def",
1010
});
11-
})
11+
});
1212

1313
it("handles a Jira prefix alone", function () {
1414
assert.deepStrictEqual(_splitPrefixDesc("[ABCD-1234]"), {
1515
prefix: "",
1616
description: "[ABCD-1234]",
1717
});
1818
});
19-
})
19+
});
2020

2121
describe("#splitMsg", function () {
2222
it("handles a description alone", function () {
@@ -25,7 +25,7 @@ describe("Split an existing message into components", function () {
2525
typePrefix: "",
2626
description: "abc def",
2727
});
28-
})
28+
});
2929

3030
it("handles a Jira prefix alone", function () {
3131
assert.deepStrictEqual(splitMsg("[ABCD-1234]"), {

src/test/prepareCommitMsg.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
_msgCount,
1515
_msgFromChanges,
1616
_msgNamed,
17-
_newMsg
17+
_newMsg,
1818
} from "../prepareCommitMsg";
1919

2020
describe("Join strings cleanly", function () {

0 commit comments

Comments
 (0)