From 2b120afd23da7583101668fc82ceb9effbf5a2d5 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Sat, 20 Jul 2024 22:22:18 +0300 Subject: [PATCH 1/2] feat!: show input: from a new line This will be less confusing to read, and also easier to test and copy/paste.. --- @commitlint/format/src/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/@commitlint/format/src/format.ts b/@commitlint/format/src/format.ts index 13baf4bf5e..1250ef6cfa 100644 --- a/@commitlint/format/src/format.ts +++ b/@commitlint/format/src/format.ts @@ -47,7 +47,7 @@ function formatInput( const hasProblems = errors.length > 0 || warnings.length > 0; return options.verbose || hasProblems - ? [`${decoration} input: ${decoratedInput}`] + ? [`${decoration} --- input ---\n${decoratedInput}`] : []; } From 2fb549a290ef3727beccf86095c9407afca52278 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Sat, 20 Jul 2024 22:30:09 +0300 Subject: [PATCH 2/2] fix: format.test.ts --- @commitlint/format/src/format.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/@commitlint/format/src/format.test.ts b/@commitlint/format/src/format.test.ts index 10b70e76aa..f3870a3924 100644 --- a/@commitlint/format/src/format.test.ts +++ b/@commitlint/format/src/format.test.ts @@ -54,7 +54,7 @@ test('returns empty summary with full commit message if verbose', () => { ); expect(actual).toStrictEqual( - '⧗ input: feat(cli): this is a valid header\n\nThis is a valid body\n\nSigned-off-by: tester\n✔ found 0 problems, 0 warnings' + '⧗ --- input ---\nfeat(cli): this is a valid header\n\nThis is a valid body\n\nSigned-off-by: tester\n✔ found 0 problems, 0 warnings' ); });