From 5c1f9499537d22caa812ac538d75e4c984128294 Mon Sep 17 00:00:00 2001 From: matthewp Date: Thu, 20 May 2021 19:15:34 +0000 Subject: [PATCH] [ci] yarn format --- .../src/plugins/astro/AstroPlugin.ts | 10 ++++------ .../src/plugins/typescript/TypeScriptPlugin.ts | 2 +- .../src/plugins/typescript/utils.ts | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/astro-languageserver/src/plugins/astro/AstroPlugin.ts b/tools/astro-languageserver/src/plugins/astro/AstroPlugin.ts index 3d5d10430..535375eeb 100644 --- a/tools/astro-languageserver/src/plugins/astro/AstroPlugin.ts +++ b/tools/astro-languageserver/src/plugins/astro/AstroPlugin.ts @@ -98,22 +98,20 @@ export class AstroPlugin implements CompletionsProvider, FoldingRangeProvider { } const specifier = this.getImportSpecifierForIdentifier(sourceFile, componentName); - if(!specifier) { + if (!specifier) { return []; } const defs = lang.getDefinitionAtPosition(tsFilePath, specifier.getStart()); - if(!defs) { + if (!defs) { return []; } const tsFragment = await tsDoc.getFragment(); const startRange: Range = Range.create(Position.create(0, 0), Position.create(0, 0)); - const links = defs.map(def => { + const links = defs.map((def) => { const defFilePath = ensureRealFilePath(def.fileName); - return LocationLink.create( - pathToUrl(defFilePath), startRange, startRange - ); + return LocationLink.create(pathToUrl(defFilePath), startRange, startRange); }); return links; diff --git a/tools/astro-languageserver/src/plugins/typescript/TypeScriptPlugin.ts b/tools/astro-languageserver/src/plugins/typescript/TypeScriptPlugin.ts index a3521a302..10b94cb83 100644 --- a/tools/astro-languageserver/src/plugins/typescript/TypeScriptPlugin.ts +++ b/tools/astro-languageserver/src/plugins/typescript/TypeScriptPlugin.ts @@ -36,7 +36,7 @@ export class TypeScriptPlugin implements CompletionsProvider { } async getDefinitions(document: Document, position: Position): Promise { - if(!this.isInsideFrontmatter(document, position)) { + if (!this.isInsideFrontmatter(document, position)) { return []; } diff --git a/tools/astro-languageserver/src/plugins/typescript/utils.ts b/tools/astro-languageserver/src/plugins/typescript/utils.ts index 1b1a673da..9acbe2ed8 100644 --- a/tools/astro-languageserver/src/plugins/typescript/utils.ts +++ b/tools/astro-languageserver/src/plugins/typescript/utils.ts @@ -233,4 +233,4 @@ function append(result: string, str: string, n: number): string { str += str; } return result; -} \ No newline at end of file +}