Skip to content

Commit

Permalink
Remove another message about auto-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
illright committed Jun 9, 2024
1 parent ed35d74 commit 9a6eefe
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions packages/pretty-reporter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ export function formatPretty(diagnostics: Array<AugmentedDiagnostic>) {
return chalk.green(`${figures.tick} No problems found!`)
}

let footer = chalk.red.bold(`Found ${diagnostics.length} problem${diagnostics.length > 1 ? 's' : ''}`)

const autofixable = diagnostics.filter((d) => (d.fixes?.length ?? 0) > 0)
if (autofixable.length === diagnostics.length) {
footer += ' (all can be fixed automatically)'
} else if (autofixable.length > 0) {
footer += ` (${autofixable.length} can be fixed automatically)`
} else {
footer += ' (none can be fixed automatically)'
}
const footer = chalk.red.bold(`Found ${diagnostics.length} problem${diagnostics.length > 1 ? 's' : ''}`)

// TODO: enable when we have auto-fixes
// const autofixable = diagnostics.filter((d) => (d.fixes?.length ?? 0) > 0)
// if (autofixable.length === diagnostics.length) {
// footer += ' (all can be fixed automatically)'
// } else if (autofixable.length > 0) {
// footer += ` (${autofixable.length} can be fixed automatically)`
// } else {
// footer += ' (none can be fixed automatically)'
// }

return (
'\n' +
Expand Down

0 comments on commit 9a6eefe

Please sign in to comment.