From 221077f72f3ad2eab822e64c96edfd031ac9c817 Mon Sep 17 00:00:00 2001 From: Alex Chew Date: Tue, 10 Oct 2023 14:25:44 -0700 Subject: [PATCH] fix lint errors --- src/dotnet.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dotnet.ts b/src/dotnet.ts index 38e9ceb..cacea78 100644 --- a/src/dotnet.ts +++ b/src/dotnet.ts @@ -20,18 +20,18 @@ export async function checkSupportedDotnetVersion(): Promise return dotnetExecutable + Messages.Dotnet.IsNotAnExecutableFile; } const { stdout } = await execFileAsync(dotnetExecutable, [ ListRuntimesArg ]); - const runtimeVersions = [...stdout.matchAll(DotnetConstants.SupportedRuntimesPattern)] + const runtimeVersions = [ ...stdout.matchAll(DotnetConstants.SupportedRuntimesPattern) ] .map(match => { - const version = match[1]; + const full = match[1]; const major = parseInt(match[2], 10); - return [major, version] as [number, string]; + return { full, major }; }); - if (runtimeVersions.find(([major, _]) => major >= DotnetConstants.SupportedRuntimesMinVersion) !== undefined) { + if(runtimeVersions.find(({ major }) => major >= DotnetConstants.SupportedRuntimesMinVersion) !== undefined) { return undefined; } const runtimeVersionsStr = runtimeVersions.length === 0 - ? " no installed versions" - : runtimeVersions.map(([_, version]) => version).join(", "); + ? ' no installed versions' + : runtimeVersions.map(({ full }) => full).join(', '); return dotnetExecutable + Messages.Dotnet.NotASupportedDotnetInstallation + runtimeVersionsStr; } catch(error: unknown) { const errorMsg = `Error invoking ${dotnetExecutable} ${ListRuntimesArg}: ${error}`;