We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f5b92a commit aa3d413Copy full SHA for aa3d413
packages/vite-plugin-checker/src/checkers/typescript/main.ts
@@ -2,6 +2,7 @@ import os from 'node:os'
2
import path from 'node:path'
3
import { fileURLToPath } from 'node:url'
4
import { parentPort } from 'node:worker_threads'
5
+import chalk from 'chalk'
6
import invariant from 'tiny-invariant'
7
import ts from 'typescript'
8
@@ -107,13 +108,16 @@ const createDiagnostic: CreateDiagnostic<'typescript'> = (pluginConfig) => {
107
108
}
109
110
if (terminal) {
111
+ const color = errorCount && errorCount > 0 ? 'red' : 'green'
112
consoleLog(
- logChunk +
113
+ chalk[color](
114
+ logChunk +
115
os.EOL +
116
wrapCheckerSummary(
117
'TypeScript',
118
diagnostic.messageText.toString(),
- ),
119
+ )
120
+ ),
121
)
122
123
})
0 commit comments