diff --git a/src/quickPicks.ts b/src/quickPicks.ts index 0d27912..fdc52cd 100644 --- a/src/quickPicks.ts +++ b/src/quickPicks.ts @@ -27,7 +27,7 @@ export const selectUrl = (rootPath: string, subgraph: Subgraph, context: Extensi }, ]; urlSelector.onDidChangeSelection(() => { - let label = urlSelector.selectedItems[0].label || ''; + const label = urlSelector.selectedItems[0].label || ''; if (!label) { return; } @@ -37,7 +37,7 @@ export const selectUrl = (rootPath: string, subgraph: Subgraph, context: Extensi urlSelector.dispose(); }); urlSelector.onDidTriggerItemButton((item) => { - let placeHolder = item.item.label === 'Use Local Url' ? subgraph.local : subgraph.dev; + const placeHolder = item.item.label === 'Use Local Url' ? subgraph.local : subgraph.dev; window .showInputBox({ ignoreFocusOut: true, @@ -49,12 +49,12 @@ export const selectUrl = (rootPath: string, subgraph: Subgraph, context: Extensi if (!inp) { return; } - let filePath = `${rootPath}/.rover-runner/${context.workspaceState.get( + const filePath = `${rootPath}/.rover-runner/${context.workspaceState.get( 'Supergraph Configuration Filename', 'supergraph.json' )}`; - let supergraphJson = JSON.parse(readFileSync(filePath, 'utf-8')); - let urlKey: string = item.item.label === 'Use Local Url' ? 'localUrl' : 'devUrl'; + const supergraphJson = JSON.parse(readFileSync(filePath, 'utf-8')); + const urlKey: string = item.item.label === 'Use Local Url' ? 'localUrl' : 'devUrl'; supergraphJson.subgraphs[subgraph.label][urlKey] = inp; writeFileSync(filePath, JSON.stringify(supergraphJson, null, 2), 'utf-8'); if (urlKey === 'localUrl') { diff --git a/src/redis.ts b/src/redis.ts index 671e730..997b1c1 100644 --- a/src/redis.ts +++ b/src/redis.ts @@ -5,7 +5,7 @@ export const startRedis = () => { detect(6379).then((_port: number) => { // _port is the next available port so if equal then server isn't running if (6379 === _port) { - let redisTerminal = + const redisTerminal = window.terminals.find((i: { name: string }) => i.name === `Redis`) || window.createTerminal(`Redis`); redisTerminal.sendText('redis-server'); } @@ -13,7 +13,7 @@ export const startRedis = () => { }; export const stopRedis = () => { - let redisTerminal = window.terminals.find((i: { name: string }) => i.name === `Redis`); + const redisTerminal = window.terminals.find((i: { name: string }) => i.name === `Redis`); if (redisTerminal) { redisTerminal.sendText('\u0003'); redisTerminal.dispose();