Skip to content

Commit

Permalink
Update to fulfill eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
WolffRuoff committed Oct 17, 2023
1 parent e5173d1 commit 93eb633
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/quickPicks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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,
Expand All @@ -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') {
Expand Down
4 changes: 2 additions & 2 deletions src/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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');
}
});
};

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();
Expand Down

0 comments on commit 93eb633

Please sign in to comment.