From 424b95bfcf87649acec805be42d81bc7846516d3 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 9 Apr 2018 15:07:59 -0700 Subject: [PATCH] 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 --- .../src/typeScriptServiceClientHost.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts b/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts index 7e3b170d968..8c8ba8aea01 100644 --- a/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts +++ b/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts @@ -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; }