File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @astrojs/check ' : patch
3+ ---
4+
5+ When no errors or warnings are detected, display "0 errors" or "0 warnings" in a dimmed color on the console instead of red or yellow.
Original file line number Diff line number Diff line change @@ -82,10 +82,14 @@ export async function check(flags: Partial<Flags>): Promise<boolean | void> {
8282[
8383bold ( `Result (${ result . fileChecked } file${ result . fileChecked === 1 ? '' : 's' } ): ` ) ,
8484[ 'error' , 'warning' , 'hint' ] . includes ( minimumSeverity )
85- ? bold ( red ( `${ result . errors } ${ result . errors === 1 ? 'error' : 'errors' } ` ) )
85+ ? result . errors > 0
86+ ? bold ( red ( `${ result . errors } ${ result . errors === 1 ? 'error' : 'errors' } ` ) )
87+ : dim ( '0 errors' )
8688: undefined ,
8789[ 'warning' , 'hint' ] . includes ( minimumSeverity )
88- ? bold ( yellow ( `${ result . warnings } ${ result . warnings === 1 ? 'warning' : 'warnings' } ` ) )
90+ ? result . warnings > 0
91+ ? bold ( yellow ( `${ result . warnings } ${ result . warnings === 1 ? 'warning' : 'warnings' } ` ) )
92+ : dim ( '0 warnings' )
8993: undefined ,
9094[ 'hint' ] . includes ( minimumSeverity )
9195? dim ( `${ result . hints } ${ result . hints === 1 ? 'hint' : 'hints' } \n` )
You can’t perform that action at this time.
0 commit comments