From 07a77ffb351af783df45544447eb1ea88b569540 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 17 Feb 2020 23:42:25 +0100 Subject: Migrate to eslint --- editors/code/src/config.ts | 34 +++++++++++----------- .../installation/fetch_artifact_release_info.ts | 6 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'editors/code/src') diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index c3fa788c7..fab062dda 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -22,7 +22,7 @@ export class Config { "cargoFeatures", "cargo-watch", ] - .map(opt => `${Config.rootSection}.${opt}`); + .map(opt => `${Config.rootSection}.${opt}`); private static readonly extensionVersion: string = (() => { const packageJsonVersion = vscode @@ -96,7 +96,7 @@ export class Config { } case "darwin": return "ra_lsp_server-mac"; - case "win32": return "ra_lsp_server-windows.exe"; + case "win32": return "ra_lsp_server-windows.exe"; // Users on these platforms yet need to manually build from sources case "aix": @@ -126,7 +126,7 @@ export class Config { return { type: BinarySource.Type.GithubRelease, - dir: this.ctx.globalStoragePath, + dir: this.ctx.globalStoragePath, file: prebuiltBinaryName, storage: this.ctx.globalState, version: Config.extensionVersion, @@ -140,30 +140,30 @@ export class Config { // We don't do runtime config validation here for simplicity. More on stackoverflow: // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension - get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; } + get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; } get rainbowHighlightingOn() { return this.cfg.get("rainbowHighlightingOn") as boolean; } - get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; } - get displayInlayHints() { return this.cfg.get("displayInlayHints") as boolean; } - get maxInlayHintLength() { return this.cfg.get("maxInlayHintLength") as number; } - get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } - get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } - get featureFlags() { return this.cfg.get("featureFlags") as Record; } - get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } - + get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; } + get displayInlayHints() { return this.cfg.get("displayInlayHints") as boolean; } + get maxInlayHintLength() { return this.cfg.get("maxInlayHintLength") as number; } + get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } + get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } + get featureFlags() { return this.cfg.get("featureFlags") as Record; } + get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } + get cargoWatchOptions(): CargoWatchOptions { return { - enable: this.cfg.get("cargo-watch.enable") as boolean, - arguments: this.cfg.get("cargo-watch.arguments") as string[], + enable: this.cfg.get("cargo-watch.enable") as boolean, + arguments: this.cfg.get("cargo-watch.arguments") as string[], allTargets: this.cfg.get("cargo-watch.allTargets") as boolean, - command: this.cfg.get("cargo-watch.command") as string, + command: this.cfg.get("cargo-watch.command") as string, }; } get cargoFeatures(): CargoFeatures { return { noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean, - allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, - features: this.cfg.get("cargoFeatures.features") as string[], + allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, + features: this.cfg.get("cargoFeatures.features") as string[], }; } diff --git a/editors/code/src/installation/fetch_artifact_release_info.ts b/editors/code/src/installation/fetch_artifact_release_info.ts index 7d497057a..71889e82a 100644 --- a/editors/code/src/installation/fetch_artifact_release_info.ts +++ b/editors/code/src/installation/fetch_artifact_release_info.ts @@ -14,7 +14,7 @@ export async function fetchArtifactReleaseInfo( ): Promise { const repoOwner = encodeURIComponent(repo.owner); - const repoName = encodeURIComponent(repo.name); + const repoName = encodeURIComponent(repo.name); const apiEndpointPath = releaseTag ? `/repos/${repoOwner}/${repoName}/releases/tags/${releaseTag}` @@ -28,8 +28,8 @@ export async function fetchArtifactReleaseInfo( // FIXME: handle non-ok response const response: GithubRelease = await fetch(requestUrl, { - headers: { Accept: "application/vnd.github.v3+json" } - }) + headers: { Accept: "application/vnd.github.v3+json" } + }) .then(res => res.json()); const artifact = response.assets.find(artifact => artifact.name === artifactFileName); -- cgit v1.2.3