aboutsummaryrefslogtreecommitdiff
path: root/scripts/verifyCommit.ts
diff options
context:
space:
mode:
authorPiotr Kuczynski <[email protected]>2022-04-19 22:38:17 +0200
committerGitHub <[email protected]>2022-04-19 22:38:17 +0200
commit00b9d4be4bff3b3f64edf163768af71c99bceed1 (patch)
tree0fa0e76b036c11c38eea251a8c4d371875810eed /scripts/verifyCommit.ts
parentcb746cb466743a219c0e3845edb29527a06b0a35 (diff)
downloadfaker-00b9d4be4bff3b3f64edf163768af71c99bceed1.tar.xz
faker-00b9d4be4bff3b3f64edf163768af71c99bceed1.zip
chore: prefer string templates over string concatenation (#732)
Diffstat (limited to 'scripts/verifyCommit.ts')
-rw-r--r--scripts/verifyCommit.ts20
1 files changed, 13 insertions, 7 deletions
diff --git a/scripts/verifyCommit.ts b/scripts/verifyCommit.ts
index e2c4ae70..11f22ab4 100644
--- a/scripts/verifyCommit.ts
+++ b/scripts/verifyCommit.ts
@@ -18,16 +18,22 @@ const isMergeCommit = msg.startsWith('Merge remote-tracking-branch');
if (!isMergeCommit && !releaseRE.test(msg) && !commitRE.test(msg)) {
console.log();
+
console.error(
` ${colors.bgRed(colors.white(' ERROR '))} ${colors.red(
`invalid commit message format.`
- )}\n\n` +
- colors.red(
- ` Proper commit message format is required for automated changelog generation. Examples:\n\n`
- ) +
- ` ${colors.green(`feat: add 'comments' option`)}\n` +
- ` ${colors.green(`fix: handle events on blur (close #28)`)}\n\n` +
- colors.red(` See .github/commit-convention.md for more details.\n`)
+ )}
+
+ ${colors.red(
+ `Proper commit message format is required for automated changelog generation. Examples:`
+ )}
+
+ ${colors.green(`feat: add 'comments' option`)}
+ ${colors.green(`fix: handle events on blur (close #28)`)}
+
+ ${colors.red(`See .github/commit-convention.md for more details.`)}
+`
);
+
process.exit(1);
}