Skip to content

Commit

Permalink
Count all autofixable diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
daniilsapa committed Jan 11, 2025
1 parent 8d3d231 commit a58aa82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/pretty-reporter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export function formatPretty(diagnostics: Array<Diagnostic>, cwd: string) {
.filter(Boolean)
.join(' and ')

const autofixable = collapsedDiagnostics.filter((d) => (d.fixes?.length ?? 0) > 0)
if (autofixable.length === collapsedDiagnostics.length) {
const autofixable = diagnostics.filter((d) => (d.fixes?.length ?? 0) > 0)
if (autofixable.length === initialDiagnosticsCount) {
footer += ` (all can be fixed automatically with ${pc.bold(pc.green('--fix'))})`
} else if (autofixable.length > 0) {
footer += ` (${autofixable.length} can be fixed automatically with ${pc.bold(pc.green('--fix'))})`
Expand Down

0 comments on commit a58aa82

Please sign in to comment.