Skip to content

Commit

Permalink
feat(cli): add verbose option #606
Browse files Browse the repository at this point in the history
  • Loading branch information
escapedcat committed Apr 4, 2019
1 parent 5b9ce68 commit 2f1028f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion @commitlint/cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down
Empty file added foo.txt
Empty file.

0 comments on commit 2f1028f

Please sign in to comment.