mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
Don't upgrade ts unused diagnostics
These diagnostics should only ever be downgraded from errors to warnings, not ever upgraded from a lower level to warnings
This commit is contained in:
@@ -255,7 +255,10 @@ export default class TypeScriptServiceClientHost {
|
||||
}
|
||||
|
||||
private getDiagnosticSeverity(diagnostic: Proto.Diagnostic): DiagnosticSeverity {
|
||||
if (this.reportStyleCheckAsWarnings && this.isStyleCheckDiagnostic(diagnostic.code)) {
|
||||
if (this.reportStyleCheckAsWarnings
|
||||
&& this.isStyleCheckDiagnostic(diagnostic.code)
|
||||
&& diagnostic.category === PConst.DiagnosticCategory.error
|
||||
) {
|
||||
return DiagnosticSeverity.Warning;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user