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 { env, extensions, QuickPickItemKind, ShellExecution, TaskGroup, TaskPanelKind, TaskRevealKind, tasks, TaskScope, ThemeIcon, Uri, window } from "vscode";
|
||||||
import { act, componentsTreeDataProvider } from "./extension";
|
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 }> {
|
async getCliInfo(command: string, versionRegex: RegExp, ignoreError: boolean, checksIfRunning: boolean): Promise<{ version?: string, status: CliStatus }> {
|
||||||
return new Promise<{ version?: string, status: CliStatus }>((resolve, reject) => {
|
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);
|
const version = stdout?.match(versionRegex);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
@@ -257,11 +257,11 @@ export class ComponentsManager {
|
|||||||
return {
|
return {
|
||||||
status: ExtensionStatus.Activated,
|
status: ExtensionStatus.Activated,
|
||||||
version: extension.packageJSON.version
|
version: extension.packageJSON.version
|
||||||
}
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
status: ExtensionStatus.NotActivated
|
status: ExtensionStatus.NotActivated
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ export class HistoryManager {
|
|||||||
async viewOutput(history: History) {
|
async viewOutput(history: History) {
|
||||||
await workspace.openTextDocument({ content: history.output }).then(async document => {
|
await workspace.openTextDocument({ content: history.output }).then(async document => {
|
||||||
await window.showTextDocument(document);
|
await window.showTextDocument(document);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async restart(history: History) {
|
async restart(history: History) {
|
||||||
@@ -64,7 +64,7 @@ export class HistoryManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async remove(history: History) {
|
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.workspaceHistory[history.commandArgs.fsPath].splice(historyIndex, 1);
|
||||||
this.storageManager.update(StorageKey.WorkspaceHistory, this.workspaceHistory);
|
this.storageManager.update(StorageKey.WorkspaceHistory, this.workspaceHistory);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export default class ComponentsTreeDataProvider implements TreeDataProvider<Gith
|
|||||||
items.push(new ComponentTreeItem(component));
|
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;
|
return items;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default class HistoryTreeItem extends TreeItem implements GithubLocalActi
|
|||||||
if (history.date.end) {
|
if (history.date.end) {
|
||||||
endTime = history.date.end;
|
endTime = history.date.end;
|
||||||
totalDuration = Utils.getTimeDuration(history.date.start, endTime);
|
totalDuration = Utils.getTimeDuration(history.date.start, endTime);
|
||||||
} else if (history.status == HistoryStatus.Running) {
|
} else if (history.status === HistoryStatus.Running) {
|
||||||
endTime = new Date().toString();
|
endTime = new Date().toString();
|
||||||
totalDuration = Utils.getTimeDuration(history.date.start, endTime);
|
totalDuration = Utils.getTimeDuration(history.date.start, endTime);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user