Skip to content

Commit

Permalink
feat: add summary
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzilong committed Feb 28, 2020
1 parent d00c4f6 commit 06841e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ module.exports = function ( results ) {
} )

if ( totalErrorCount + totalWarningCount > 0 ) {
return '\n' + lines.join( '\n' )
const totalErrorMessage = chalk.red( `${ totalErrorCount } ${ plur( 'error', totalErrorCount ) }` )
const totalWarningMessage = chalk.yellow( `${ totalWarningCount } ${ plur( 'warning', totalWarningCount ) }` )
return `\n${ lines.join( '\n' ) }\n` +
`${ totalErrorMessage }\n${ totalWarningMessage }\n`
}

return ''
Expand Down

0 comments on commit 06841e6

Please sign in to comment.