Fix lint errors
Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as child_process from "child_process";
|
||||
import * as childProcess from "child_process";
|
||||
import { env, extensions, QuickPickItemKind, ShellExecution, TaskGroup, TaskPanelKind, TaskRevealKind, tasks, TaskScope, ThemeIcon, Uri, window } from "vscode";
|
||||
import { act, componentsTreeDataProvider } from "./extension";
|
||||
|
||||
@@ -214,7 +214,7 @@ export class ComponentsManager {
|
||||
|
||||
async getCliInfo(command: string, versionRegex: RegExp, ignoreError: boolean, checksIfRunning: boolean): Promise<{ version?: string, status: CliStatus }> {
|
||||
return new Promise<{ version?: string, status: CliStatus }>((resolve, reject) => {
|
||||
child_process.exec(command, (error, stdout, stderr) => {
|
||||
childProcess.exec(command, (error, stdout, stderr) => {
|
||||
const version = stdout?.match(versionRegex);
|
||||
|
||||
if (error) {
|
||||
@@ -257,11 +257,11 @@ export class ComponentsManager {
|
||||
return {
|
||||
status: ExtensionStatus.Activated,
|
||||
version: extension.packageJSON.version
|
||||
}
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
status: ExtensionStatus.NotActivated
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ export class HistoryManager {
|
||||
async viewOutput(history: History) {
|
||||
await workspace.openTextDocument({ content: history.output }).then(async document => {
|
||||
await window.showTextDocument(document);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async restart(history: History) {
|
||||
@@ -64,7 +64,7 @@ export class HistoryManager {
|
||||
}
|
||||
|
||||
async remove(history: History) {
|
||||
const historyIndex = this.workspaceHistory[history.commandArgs.fsPath].findIndex(workspaceHistory => workspaceHistory.index === history.index)
|
||||
const historyIndex = this.workspaceHistory[history.commandArgs.fsPath].findIndex(workspaceHistory => workspaceHistory.index === history.index);
|
||||
this.workspaceHistory[history.commandArgs.fsPath].splice(historyIndex, 1);
|
||||
this.storageManager.update(StorageKey.WorkspaceHistory, this.workspaceHistory);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export default class ComponentsTreeDataProvider implements TreeDataProvider<Gith
|
||||
items.push(new ComponentTreeItem(component));
|
||||
}
|
||||
|
||||
await commands.executeCommand('setContext', 'githubLocalActions:noComponents', items.length == 0);
|
||||
await commands.executeCommand('setContext', 'githubLocalActions:noComponents', items.length === 0);
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export default class HistoryTreeItem extends TreeItem implements GithubLocalActi
|
||||
if (history.date.end) {
|
||||
endTime = history.date.end;
|
||||
totalDuration = Utils.getTimeDuration(history.date.start, endTime);
|
||||
} else if (history.status == HistoryStatus.Running) {
|
||||
} else if (history.status === HistoryStatus.Running) {
|
||||
endTime = new Date().toString();
|
||||
totalDuration = Utils.getTimeDuration(history.date.start, endTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user