about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorTetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com>2023-06-28 18:15:30 +0900
committerTetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com>2023-07-06 16:17:02 +0900
commitf70845305f54181e1681828c7935305c66e743bb (patch)
treed0ea8aa1241afa77dd6fc46095f0cf9f0e8c70d9 /editors/code/src
parent72a3883a7128b4eae6f38d6479f33aaaaae4790b (diff)
downloadrust-f70845305f54181e1681828c7935305c66e743bb.tar.gz
rust-f70845305f54181e1681828c7935305c66e743bb.zip
editor/code: Enable `noPropertyAccessFromIndexSignature` ts option
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/bootstrap.ts2
-rw-r--r--editors/code/src/config.ts4
-rw-r--r--editors/code/src/debug.ts5
-rw-r--r--editors/code/src/toolchain.ts2
4 files changed, 7 insertions, 6 deletions
diff --git a/editors/code/src/bootstrap.ts b/editors/code/src/bootstrap.ts
index b38fa06a85c..7b831a8a695 100644
--- a/editors/code/src/bootstrap.ts
+++ b/editors/code/src/bootstrap.ts
@@ -36,7 +36,7 @@ async function getServer(
     config: Config,
     state: PersistentState
 ): Promise<string | undefined> {
-    const explicitPath = process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath;
+    const explicitPath = process.env["__RA_LSP_SERVER_DEBUG"] ?? config.serverPath;
     if (explicitPath) {
         if (explicitPath.startsWith("~/")) {
             return os.homedir() + explicitPath.slice("~".length);
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 9595ba05282..deea958f8da 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -339,7 +339,7 @@ export function substituteVariablesInEnv(env: Env): Env {
             const depRe = new RegExp(/\${(?<depName>.+?)}/g);
             let match = undefined;
             while ((match = depRe.exec(value))) {
-                const depName = unwrapUndefinable(match.groups?.depName);
+                const depName = unwrapUndefinable(match.groups?.["depName"]);
                 deps.add(depName);
                 // `depName` at this point can have a form of `expression` or
                 // `prefix:expression`
@@ -448,7 +448,7 @@ function computeVscodeVar(varName: string): string | null {
         // https://github.com/microsoft/vscode/blob/08ac1bb67ca2459496b272d8f4a908757f24f56f/src/vs/workbench/api/common/extHostVariableResolverService.ts#L81
         // or
         // https://github.com/microsoft/vscode/blob/29eb316bb9f154b7870eb5204ec7f2e7cf649bec/src/vs/server/node/remoteTerminalChannel.ts#L56
-        execPath: () => process.env.VSCODE_EXEC_PATH ?? process.execPath,
+        execPath: () => process.env["VSCODE_EXEC_PATH"] ?? process.execPath,
 
         pathSeparator: () => path.sep,
     };
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index ede90d707dd..29758feafe4 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -147,8 +147,9 @@ async function getDebugConfiguration(
         debugConfig.name = `run ${path.basename(executable)}`;
     }
 
-    if (debugConfig.cwd) {
-        debugConfig.cwd = simplifyPath(debugConfig.cwd);
+    const cwd = debugConfig["cwd"];
+    if (cwd) {
+        debugConfig["cwd"] = simplifyPath(cwd);
     }
 
     return debugConfig;
diff --git a/editors/code/src/toolchain.ts b/editors/code/src/toolchain.ts
index b2c0c669db2..014e6b66f64 100644
--- a/editors/code/src/toolchain.ts
+++ b/editors/code/src/toolchain.ts
@@ -176,7 +176,7 @@ export const getPathForExecutable = memoizeAsync(
 );
 
 async function lookupInPath(exec: string): Promise<boolean> {
-    const paths = process.env.PATH ?? "";
+    const paths = process.env["PATH"] ?? "";
 
     const candidates = paths.split(path.delimiter).flatMap((dirInPath) => {
         const candidate = path.join(dirInPath, exec);