Skip to content

Commit db0893c

Browse files
committed
Fix linting for tree node files
1 parent 340936f commit db0893c

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/treeViews/current-branch/currentBranchRepoNode.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ export async function getCurrentBranchWorkflowRunNodes(
4444
}
4545

4646
return runs.map((wr) => {
47-
const wf = wr.workflow_id;
48-
4947
// TODO: Do we need to include the workflow name here?
5048
return new WorkflowRunNode(gitHubRepoContext, wr, wr.name ?? undefined);
5149
});

src/treeViews/icons.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function _getIconForWorkflowrun(
3939
case "cancelled":
4040
return getAbsoluteIconPath("conclusions/cancelled.svg");
4141
}
42+
break;
4243
}
4344

4445
case "queued":
@@ -73,6 +74,7 @@ export function getCodIconForWorkflowrun(runOrJob?: IStatusAndConclusion): strin
7374
case "cancelled":
7475
return "circle-slash";
7576
}
77+
break;
7678
}
7779

7880
case "queued":

src/treeViews/settings/settingsRepoNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class SettingsRepoNode extends vscode.TreeItem {
1313
this.contextValue = "settings-repo";
1414
}
1515

16-
async getSettings(): Promise<SettingsExplorerNode[]> {
16+
getSettings(): SettingsExplorerNode[] {
1717
return getSettingNodes(this.gitHubRepoContext);
1818
}
1919
}

src/treeViews/workflows.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ export class WorkflowsTreeProvider implements vscode.TreeDataProvider<WorkflowsT
5454

5555
log("No GitHub repositories found");
5656
return [];
57-
} catch (e: any) {
57+
} catch (e: unknown) {
5858
logError(e as Error, "Failed to get GitHub context");
5959

60-
if (`${e?.message}`.startsWith("Could not get token from the GitHub authentication provider.")) {
60+
if (`${(e as Error).message}`.startsWith("Could not get token from the GitHub authentication provider.")) {
6161
return [new AuthenticationNode()];
6262
}
6363

64-
return [new ErrorNode(`An error has occured: ${e.message}`)];
64+
return [new ErrorNode(`An error has occured: ${(e as Error).message}`)];
6565
}
6666
}
6767

src/treeViews/workflows/workflowJobNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class WorkflowJobNode extends vscode.TreeItem {
2020
return !!(this.job.steps && this.job.steps.length > 0);
2121
}
2222

23-
async getSteps(): Promise<WorkflowStepNode[]> {
23+
getSteps(): WorkflowStepNode[] {
2424
return (this.job.steps || []).map((s) => new WorkflowStepNode(this.gitHubRepoContext, this.job, s));
2525
}
2626
}

src/treeViews/workflows/workflowRunNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class WorkflowRunNode extends vscode.TreeItem {
3131
}
3232

3333
this.iconPath = getIconForWorkflowRun(this.run);
34-
this.tooltip = `${this.run.status} ${this.run.conclusion || ""}`;
34+
this.tooltip = `${this.run.status || ""} ${this.run.conclusion || ""}`;
3535
}
3636

3737
async getJobs(): Promise<WorkflowJobNode[]> {
@@ -44,7 +44,7 @@ export class WorkflowRunNode extends vscode.TreeItem {
4444
});
4545

4646
const resp = result.data;
47-
const jobs: WorkflowJob[] = (resp as any).jobs;
47+
const jobs: WorkflowJob[] = resp.jobs;
4848

4949
return jobs.map((job) => new WorkflowJobNode(this.gitHubRepoContext, job));
5050
}

0 commit comments

Comments
 (0)