diff --git a/@commitlint/cli/src/cli.js b/@commitlint/cli/src/cli.js index 49afd482582..36735235cfc 100755 --- a/@commitlint/cli/src/cli.js +++ b/@commitlint/cli/src/cli.js @@ -79,6 +79,12 @@ const flags = { description: 'toggle console output', type: 'boolean' }, + verbose: { + alias: 'vb', + default: false, + description: 'show console output even on success', + type: 'boolean' + }, to: { alias: 't', default: null, @@ -198,7 +204,9 @@ async function main(options) { const output = format(report, {color: flags.color}); if (!flags.quiet) { - console.log(output); + if (!report.valid || report.warningCount > 0 || flags.verbose) { + console.log(output); + } } if (!report.valid) { diff --git a/foo.txt b/foo.txt new file mode 100644 index 00000000000..e69de29bb2d