From 705643ec67d02d262a56fce0e37bf7ab4445bb0f Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Fri, 17 Oct 2025 17:23:29 +0800 Subject: [PATCH 1/6] show notarget diagnostic message in vscode issue tab --- packages/compiler/src/server/diagnostics.ts | 81 +++++++++++++++++---- packages/compiler/src/server/serverlib.ts | 8 +- 2 files changed, 74 insertions(+), 15 deletions(-) diff --git a/packages/compiler/src/server/diagnostics.ts b/packages/compiler/src/server/diagnostics.ts index 712201e3d5b..3ff67b6b991 100644 --- a/packages/compiler/src/server/diagnostics.ts +++ b/packages/compiler/src/server/diagnostics.ts @@ -3,6 +3,7 @@ import type { Range, Diagnostic as VSDiagnostic, } from "vscode-languageserver"; +import { Range as VSRange } from "vscode-languageserver"; import type { TextDocument } from "vscode-languageserver-textdocument"; import { DiagnosticSeverity } from "vscode-languageserver/node.js"; import { @@ -10,34 +11,58 @@ import { getSourceLocation, } from "../core/diagnostics.js"; import { getTypeName } from "../core/helpers/type-name-utils.js"; +import { NodeSystemHost } from "../core/node-system-host.js"; import type { Program } from "../core/program.js"; import type { Node, SourceLocation } from "../core/types.js"; -import { Diagnostic } from "../core/types.js"; +import { Diagnostic, NoTarget } from "../core/types.js"; import { isDefined } from "../utils/misc.js"; +import { getLocationInYamlScript } from "../yaml/diagnostics.js"; +import { parseYaml } from "../yaml/parser.js"; import type { FileService } from "./file-service.js"; import type { ServerSourceFile } from "./types.js"; /** Convert TypeSpec Diagnostic to Lsp diagnostic. Each TypeSpec diagnostic could produce multiple lsp ones when it involve multiple locations. */ -export function convertDiagnosticToLsp( +export async function convertDiagnosticToLsp( fileService: FileService, program: Program, document: TextDocument, diagnostic: Diagnostic, -): [VSDiagnostic, TextDocument][] { - const root = getVSLocation( +): Promise<[VSDiagnostic, TextDocument][]> { + const root = await getVSLocation( fileService, getSourceLocation(diagnostic.target, { locateId: true }), document, + program.compilerOptions.config, + program.compilerOptions.emit?.find((emitName) => diagnostic.message.includes(emitName)), ); + const relatedInformation: DiagnosticRelatedInformation[] = []; + if (root === NoTarget) { + return [ + [ + createLspDiagnostic({ + range: VSRange.create(0, 0, 0, 0), + message: diagnostic.message + ", no target source associated", + severity: convertSeverity(diagnostic.severity), + code: diagnostic.code, + relatedInformation, + }), + document, + ], + ]; + } if (root === undefined || !fileService.upToDate(root.document)) return []; const instantiationNodes = getDiagnosticTemplateInstantitationTrace(diagnostic.target); - const relatedInformation: DiagnosticRelatedInformation[] = []; + const relatedDiagnostics: [VSDiagnostic, TextDocument][] = []; if (instantiationNodes.length > 0) { - const items = instantiationNodes - .map((node) => getVSLocationWithTypeInfo(program, fileService, node, document)) - .filter(isDefined); + const items = ( + await Promise.all( + instantiationNodes.map((node) => + getVSLocationWithTypeInfo(program, fileService, node, document), + ), + ) + ).filter(isDefined); for (const location of items) { relatedInformation.push({ @@ -127,11 +152,39 @@ interface VSLocation { readonly range: Range; } -function getVSLocation( +async function getVSLocation( fileService: FileService, location: SourceLocation | undefined, currentDocument: TextDocument, -): VSLocation | undefined { + configFilePath: string | undefined = undefined, + emitterName: string | undefined = undefined, +): Promise { + if (configFilePath && emitterName && emitterName.length > 0 && location === undefined) { + const [yamlScript] = parseYaml(await NodeSystemHost.readFile(configFilePath)); + const target = getLocationInYamlScript(yamlScript, ["emit", emitterName], "key"); + if (target.pos === 0) { + return NoTarget; + } + + const docTspConfig = fileService.getOpenDocument(configFilePath); + if (!docTspConfig) { + return NoTarget; + } + + const lineAndChar = target.file.getLineAndCharacterOfPosition(target.pos); + const range = VSRange.create( + lineAndChar.line, + lineAndChar.character, + lineAndChar.line, + lineAndChar.character + emitterName.length, + ); + + return { + range, + document: docTspConfig, + }; + } + if (location === undefined) return undefined; const document = getDocumentForLocation(fileService, location, currentDocument); if (!document) { @@ -148,18 +201,18 @@ interface VSLocationWithTypeInfo extends VSLocation { readonly typeName: string; readonly node: Node; } -function getVSLocationWithTypeInfo( +async function getVSLocationWithTypeInfo( program: Program, fileService: FileService, node: Node, document: TextDocument, -): VSLocationWithTypeInfo | undefined { - const location = getVSLocation( +): Promise { + const location = await getVSLocation( fileService, getSourceLocation(node, { locateId: true }), document, ); - if (location === undefined) return undefined; + if (location === undefined || location === NoTarget) return undefined; return { ...location, node, diff --git a/packages/compiler/src/server/serverlib.ts b/packages/compiler/src/server/serverlib.ts index 3ea0574c523..6d51e743809 100644 --- a/packages/compiler/src/server/serverlib.ts +++ b/packages/compiler/src/server/serverlib.ts @@ -728,8 +728,14 @@ export function createServer( } } + // Add a diagnostic slot to tspconfig.yaml + const configDocument = fileService.getOpenDocument(program.compilerOptions.config ?? ""); + if (configDocument && !diagnosticMap.has(configDocument)) { + diagnosticMap.set(configDocument, []); + } + for (const each of program.diagnostics) { - const results = convertDiagnosticToLsp(fileService, program, document, each); + const results = await convertDiagnosticToLsp(fileService, program, document, each); for (const result of results) { const [diagnostic, diagDocument] = result; if (each.url) { From f4d1265766b3808b2c6a0608d407d98fafae38c3 Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Fri, 31 Oct 2025 14:56:19 +0800 Subject: [PATCH 2/6] updated --- packages/compiler/src/server/diagnostics.ts | 12 ++++++++++-- packages/compiler/src/server/serverlib.ts | 8 +++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/packages/compiler/src/server/diagnostics.ts b/packages/compiler/src/server/diagnostics.ts index 3ff67b6b991..b592f3ccc56 100644 --- a/packages/compiler/src/server/diagnostics.ts +++ b/packages/compiler/src/server/diagnostics.ts @@ -27,21 +27,29 @@ export async function convertDiagnosticToLsp( program: Program, document: TextDocument, diagnostic: Diagnostic, + emitters?: string[] | undefined, ): Promise<[VSDiagnostic, TextDocument][]> { + const emitterName = program.compilerOptions.emit?.find((emitName) => + diagnostic.message.includes(emitName), + ); const root = await getVSLocation( fileService, getSourceLocation(diagnostic.target, { locateId: true }), document, program.compilerOptions.config, - program.compilerOptions.emit?.find((emitName) => diagnostic.message.includes(emitName)), + emitterName, ); const relatedInformation: DiagnosticRelatedInformation[] = []; if (root === NoTarget) { + let customMsg = ""; + if (emitters && emitters.includes(emitterName || "")) { + customMsg = ". It's configured in vscode settings."; + } return [ [ createLspDiagnostic({ range: VSRange.create(0, 0, 0, 0), - message: diagnostic.message + ", no target source associated", + message: diagnostic.message + customMsg, severity: convertSeverity(diagnostic.severity), code: diagnostic.code, relatedInformation, diff --git a/packages/compiler/src/server/serverlib.ts b/packages/compiler/src/server/serverlib.ts index c5b9da2ebba..937a1972988 100644 --- a/packages/compiler/src/server/serverlib.ts +++ b/packages/compiler/src/server/serverlib.ts @@ -735,7 +735,13 @@ export function createServer( } for (const each of program.diagnostics) { - const results = await convertDiagnosticToLsp(fileService, program, document, each); + const results = await convertDiagnosticToLsp( + fileService, + program, + document, + each, + clientConfigsProvider?.config?.lsp?.emit, + ); for (const result of results) { const [diagnostic, diagDocument] = result; if (each.url) { From 86040f0207d612f05058afd81690fbcdd0150808 Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Fri, 31 Oct 2025 15:05:17 +0800 Subject: [PATCH 3/6] Create show-notarget-dialog-in-vscode-2025-9-31-6-57-48.md --- .../show-notarget-dialog-in-vscode-2025-9-31-6-57-48.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .chronus/changes/show-notarget-dialog-in-vscode-2025-9-31-6-57-48.md diff --git a/.chronus/changes/show-notarget-dialog-in-vscode-2025-9-31-6-57-48.md b/.chronus/changes/show-notarget-dialog-in-vscode-2025-9-31-6-57-48.md new file mode 100644 index 00000000000..abf6118f391 --- /dev/null +++ b/.chronus/changes/show-notarget-dialog-in-vscode-2025-9-31-6-57-48.md @@ -0,0 +1,8 @@ +--- +# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking +changeKind: fix +packages: + - "@typespec/compiler" +--- + +Show NoTarget diagnostic message in vscode From 50c464203dcff45b7abb2592ed310b0e9d8e8865 Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Mon, 3 Nov 2025 14:21:58 +0800 Subject: [PATCH 4/6] updated --- .../src/server/client-config-provider.ts | 2 +- .../compiler/src/server/compile-service.ts | 26 ++- packages/compiler/src/server/diagnostics.ts | 173 +++++++++++------- packages/compiler/src/server/serverlib.ts | 3 +- 4 files changed, 119 insertions(+), 85 deletions(-) diff --git a/packages/compiler/src/server/client-config-provider.ts b/packages/compiler/src/server/client-config-provider.ts index 469cee74883..4f0fad08b46 100644 --- a/packages/compiler/src/server/client-config-provider.ts +++ b/packages/compiler/src/server/client-config-provider.ts @@ -6,7 +6,7 @@ interface LSPConfig { emit?: string[]; } -interface Config { +export interface Config { lsp?: LSPConfig; entrypoint?: string[]; } diff --git a/packages/compiler/src/server/compile-service.ts b/packages/compiler/src/server/compile-service.ts index d3837655d32..c7cbed523dc 100644 --- a/packages/compiler/src/server/compile-service.ts +++ b/packages/compiler/src/server/compile-service.ts @@ -16,10 +16,9 @@ import { parse } from "../core/parser.js"; import { getBaseFileName, getDirectoryPath } from "../core/path-utils.js"; import type { CompilerHost, TypeSpecScriptNode } from "../core/types.js"; import { distinctArray } from "../utils/misc.js"; -import { getLocationInYamlScript } from "../yaml/diagnostics.js"; -import { parseYaml } from "../yaml/parser.js"; import { ClientConfigProvider } from "./client-config-provider.js"; import { serverOptions } from "./constants.js"; +import { getDiagnosticRangeInTspConfig } from "./diagnostics.js"; import { resolveEntrypointFile } from "./entrypoint-resolver.js"; import { FileService } from "./file-service.js"; import { FileSystemCache } from "./file-system-cache.js"; @@ -238,25 +237,22 @@ export function createCompileService({ } let uri = document.uri; - let range = Range.create(0, 0, 0, 0); + let range: Range | undefined; if (err.name === "ExternalError" && err.info.kind === "emitter" && configFilePath) { const emitterName = err.info.metadata.name; - const [yamlScript] = parseYaml(await serverHost.compilerHost.readFile(configFilePath)); - const target = getLocationInYamlScript(yamlScript, ["emit", emitterName], "key"); - if (target.pos === 0) { + range = await getDiagnosticRangeInTspConfig( + configFilePath, + serverHost.compilerHost.readFile, + emitterName, + ); + + uri = fileService.getURL(configFilePath); + if (range === undefined) { log({ level: "debug", message: `Unexpected situation, can't find emitter '${emitterName}' in config file '${configFilePath}'`, }); } - uri = fileService.getURL(configFilePath); - const lineAndChar = target.file.getLineAndCharacterOfPosition(target.pos); - range = Range.create( - lineAndChar.line, - lineAndChar.character, - lineAndChar.line, - lineAndChar.character + emitterName.length, - ); } serverHost.sendDiagnostics({ @@ -264,7 +260,7 @@ export function createCompileService({ diagnostics: [ { severity: DiagnosticSeverity.Error, - range, + range: range ?? Range.create(0, 0, 0, 0), message: (err.name === "ExternalError" ? "External compiler error!\n" diff --git a/packages/compiler/src/server/diagnostics.ts b/packages/compiler/src/server/diagnostics.ts index b592f3ccc56..e0447ec04d9 100644 --- a/packages/compiler/src/server/diagnostics.ts +++ b/packages/compiler/src/server/diagnostics.ts @@ -11,13 +11,13 @@ import { getSourceLocation, } from "../core/diagnostics.js"; import { getTypeName } from "../core/helpers/type-name-utils.js"; -import { NodeSystemHost } from "../core/node-system-host.js"; import type { Program } from "../core/program.js"; -import type { Node, SourceLocation } from "../core/types.js"; +import type { Node, SourceFile, SourceLocation } from "../core/types.js"; import { Diagnostic, NoTarget } from "../core/types.js"; import { isDefined } from "../utils/misc.js"; import { getLocationInYamlScript } from "../yaml/diagnostics.js"; import { parseYaml } from "../yaml/parser.js"; +import { Config } from "./client-config-provider.js"; import type { FileService } from "./file-service.js"; import type { ServerSourceFile } from "./types.js"; @@ -27,50 +27,43 @@ export async function convertDiagnosticToLsp( program: Program, document: TextDocument, diagnostic: Diagnostic, - emitters?: string[] | undefined, + clientConfig?: Config | undefined, + readFile: ((path: string) => Promise) | undefined = undefined, ): Promise<[VSDiagnostic, TextDocument][]> { - const emitterName = program.compilerOptions.emit?.find((emitName) => - diagnostic.message.includes(emitName), - ); - const root = await getVSLocation( + let root = getVSLocation( fileService, getSourceLocation(diagnostic.target, { locateId: true }), document, - program.compilerOptions.config, - emitterName, ); - const relatedInformation: DiagnosticRelatedInformation[] = []; - if (root === NoTarget) { - let customMsg = ""; - if (emitters && emitters.includes(emitterName || "")) { - customMsg = ". It's configured in vscode settings."; + + if (root === undefined) { + const emitterName = program.compilerOptions.emit?.find((emitName) => + diagnostic.message.includes(emitName), + ); + const result = await getDiagnosticInTspConfig( + fileService, + program.compilerOptions.config, + readFile, + emitterName, + ); + if (result === NoTarget) { + return getDiagnosticInVsCodeSettings(diagnostic, document, clientConfig, emitterName); + } else if (result !== undefined) { + root = result; + } else { + return []; } - return [ - [ - createLspDiagnostic({ - range: VSRange.create(0, 0, 0, 0), - message: diagnostic.message + customMsg, - severity: convertSeverity(diagnostic.severity), - code: diagnostic.code, - relatedInformation, - }), - document, - ], - ]; } + if (root === undefined || !fileService.upToDate(root.document)) return []; const instantiationNodes = getDiagnosticTemplateInstantitationTrace(diagnostic.target); - + const relatedInformation: DiagnosticRelatedInformation[] = []; const relatedDiagnostics: [VSDiagnostic, TextDocument][] = []; if (instantiationNodes.length > 0) { - const items = ( - await Promise.all( - instantiationNodes.map((node) => - getVSLocationWithTypeInfo(program, fileService, node, document), - ), - ) - ).filter(isDefined); + const items = instantiationNodes + .map((node) => getVSLocationWithTypeInfo(program, fileService, node, document)) + .filter(isDefined); for (const location of items) { relatedInformation.push({ @@ -160,39 +153,11 @@ interface VSLocation { readonly range: Range; } -async function getVSLocation( +function getVSLocation( fileService: FileService, location: SourceLocation | undefined, currentDocument: TextDocument, - configFilePath: string | undefined = undefined, - emitterName: string | undefined = undefined, -): Promise { - if (configFilePath && emitterName && emitterName.length > 0 && location === undefined) { - const [yamlScript] = parseYaml(await NodeSystemHost.readFile(configFilePath)); - const target = getLocationInYamlScript(yamlScript, ["emit", emitterName], "key"); - if (target.pos === 0) { - return NoTarget; - } - - const docTspConfig = fileService.getOpenDocument(configFilePath); - if (!docTspConfig) { - return NoTarget; - } - - const lineAndChar = target.file.getLineAndCharacterOfPosition(target.pos); - const range = VSRange.create( - lineAndChar.line, - lineAndChar.character, - lineAndChar.line, - lineAndChar.character + emitterName.length, - ); - - return { - range, - document: docTspConfig, - }; - } - +): VSLocation | undefined { if (location === undefined) return undefined; const document = getDocumentForLocation(fileService, location, currentDocument); if (!document) { @@ -209,18 +174,18 @@ interface VSLocationWithTypeInfo extends VSLocation { readonly typeName: string; readonly node: Node; } -async function getVSLocationWithTypeInfo( +function getVSLocationWithTypeInfo( program: Program, fileService: FileService, node: Node, document: TextDocument, -): Promise { - const location = await getVSLocation( +): VSLocationWithTypeInfo | undefined { + const location = getVSLocation( fileService, getSourceLocation(node, { locateId: true }), document, ); - if (location === undefined || location === NoTarget) return undefined; + if (location === undefined) return undefined; return { ...location, node, @@ -236,3 +201,75 @@ function convertSeverity(severity: "warning" | "error"): DiagnosticSeverity { return DiagnosticSeverity.Error; } } + +async function getDiagnosticInTspConfig( + fileService: FileService, + configFilePath: string | undefined, + readFile: ((path: string) => Promise) | undefined, + emitterName: string | undefined, +): Promise { + if (configFilePath && readFile && emitterName && emitterName.length > 0) { + const docTspConfig = fileService.getOpenDocument(configFilePath); + if (!docTspConfig) { + return NoTarget; + } + + const range = await getDiagnosticRangeInTspConfig(configFilePath, readFile, emitterName); + if (range === undefined) { + return NoTarget; + } + return { + range, + document: docTspConfig, + }; + } + return undefined; +} + +export async function getDiagnosticRangeInTspConfig( + configFilePath: string, + readFile: (path: string) => Promise, + emitterName: string, +): Promise { + const [yamlScript] = parseYaml(await readFile(configFilePath)); + const target = getLocationInYamlScript(yamlScript, ["emit", emitterName], "key"); + if (target.pos === 0) { + return undefined; + } + + const lineAndChar = target.file.getLineAndCharacterOfPosition(target.pos); + return VSRange.create( + lineAndChar.line, + lineAndChar.character, + lineAndChar.line, + lineAndChar.character + emitterName.length, + ); +} + +function getDiagnosticInVsCodeSettings( + diagnostic: Diagnostic, + document: TextDocument, + clientConfig?: Config | undefined, + emitterName?: string | undefined, +): [VSDiagnostic, TextDocument][] { + let customMsg = ""; + if (clientConfig?.lsp?.emit && clientConfig.lsp.emit.includes(emitterName || "")) { + customMsg = " [It's configured in vscode settings]"; + } else { + customMsg = " [No target source location reported for this Error/Warning]"; + } + + const relatedInformation: DiagnosticRelatedInformation[] = []; + return [ + [ + createLspDiagnostic({ + range: VSRange.create(0, 0, 0, 0), + message: diagnostic.message + customMsg, + severity: convertSeverity(diagnostic.severity), + code: diagnostic.code, + relatedInformation, + }), + document, + ], + ]; +} diff --git a/packages/compiler/src/server/serverlib.ts b/packages/compiler/src/server/serverlib.ts index 937a1972988..6295ce4e354 100644 --- a/packages/compiler/src/server/serverlib.ts +++ b/packages/compiler/src/server/serverlib.ts @@ -740,7 +740,8 @@ export function createServer( program, document, each, - clientConfigsProvider?.config?.lsp?.emit, + clientConfigsProvider?.config, + compilerHost.readFile, ); for (const result of results) { const [diagnostic, diagDocument] = result; From 61ebd56c9434182bd82fa6a3f948d7f0ac1c321f Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Fri, 14 Nov 2025 14:38:07 +0800 Subject: [PATCH 5/6] updated --- .../compiler/src/server/compile-service.ts | 2 -- packages/compiler/src/server/diagnostics.ts | 28 +++++++++---------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/compiler/src/server/compile-service.ts b/packages/compiler/src/server/compile-service.ts index b5ca753fa84..e3ffd7420c1 100644 --- a/packages/compiler/src/server/compile-service.ts +++ b/packages/compiler/src/server/compile-service.ts @@ -16,8 +16,6 @@ import { parse } from "../core/parser.js"; import { getBaseFileName, getDirectoryPath } from "../core/path-utils.js"; import type { CompilerHost, TypeSpecScriptNode } from "../core/types.js"; import { deepClone, distinctArray } from "../utils/misc.js"; -import { getLocationInYamlScript } from "../yaml/diagnostics.js"; -import { parseYaml } from "../yaml/parser.js"; import { ClientConfigProvider } from "./client-config-provider.js"; import { serverOptions } from "./constants.js"; import { getDiagnosticRangeInTspConfig } from "./diagnostics.js"; diff --git a/packages/compiler/src/server/diagnostics.ts b/packages/compiler/src/server/diagnostics.ts index e0447ec04d9..902a846d7b1 100644 --- a/packages/compiler/src/server/diagnostics.ts +++ b/packages/compiler/src/server/diagnostics.ts @@ -40,6 +40,10 @@ export async function convertDiagnosticToLsp( const emitterName = program.compilerOptions.emit?.find((emitName) => diagnostic.message.includes(emitName), ); + if (emitterName === undefined) { + return []; + } + const result = await getDiagnosticInTspConfig( fileService, program.compilerOptions.config, @@ -47,11 +51,9 @@ export async function convertDiagnosticToLsp( emitterName, ); if (result === NoTarget) { - return getDiagnosticInVsCodeSettings(diagnostic, document, clientConfig, emitterName); - } else if (result !== undefined) { - root = result; + return getDiagnosticInSettings(diagnostic, document, emitterName, clientConfig); } else { - return []; + root = result; } } @@ -206,9 +208,9 @@ async function getDiagnosticInTspConfig( fileService: FileService, configFilePath: string | undefined, readFile: ((path: string) => Promise) | undefined, - emitterName: string | undefined, -): Promise { - if (configFilePath && readFile && emitterName && emitterName.length > 0) { + emitterName: string , +): Promise { + if (configFilePath && readFile && emitterName.length > 0) { const docTspConfig = fileService.getOpenDocument(configFilePath); if (!docTspConfig) { return NoTarget; @@ -223,7 +225,7 @@ async function getDiagnosticInTspConfig( document: docTspConfig, }; } - return undefined; + return NoTarget; } export async function getDiagnosticRangeInTspConfig( @@ -246,17 +248,15 @@ export async function getDiagnosticRangeInTspConfig( ); } -function getDiagnosticInVsCodeSettings( +function getDiagnosticInSettings( diagnostic: Diagnostic, document: TextDocument, + emitterName: string, clientConfig?: Config | undefined, - emitterName?: string | undefined, ): [VSDiagnostic, TextDocument][] { let customMsg = ""; - if (clientConfig?.lsp?.emit && clientConfig.lsp.emit.includes(emitterName || "")) { - customMsg = " [It's configured in vscode settings]"; - } else { - customMsg = " [No target source location reported for this Error/Warning]"; + if (clientConfig?.lsp?.emit && clientConfig.lsp.emit.includes(emitterName)) { + customMsg = " [In IDE settings]"; } const relatedInformation: DiagnosticRelatedInformation[] = []; From bd8fd53b0950dbfe5f5389c622077c906da909ab Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Fri, 14 Nov 2025 14:42:20 +0800 Subject: [PATCH 6/6] format file --- packages/compiler/src/server/diagnostics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler/src/server/diagnostics.ts b/packages/compiler/src/server/diagnostics.ts index 902a846d7b1..2c91ed47e50 100644 --- a/packages/compiler/src/server/diagnostics.ts +++ b/packages/compiler/src/server/diagnostics.ts @@ -208,7 +208,7 @@ async function getDiagnosticInTspConfig( fileService: FileService, configFilePath: string | undefined, readFile: ((path: string) => Promise) | undefined, - emitterName: string , + emitterName: string, ): Promise { if (configFilePath && readFile && emitterName.length > 0) { const docTspConfig = fileService.getOpenDocument(configFilePath);