Skip to content

Commit

Permalink
dependabot eslint plugin related changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsinnit authored and Tatsat Mishra committed Aug 13, 2024
1 parent b94f437 commit faae05c
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 71 deletions.
133 changes: 74 additions & 59 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@
"@types/tmp": "^0.2.6",
"@types/uuid": "^10.0.0",
"@types/vscode": "^1.92.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@vscode/test-electron": "^2.4.1",
"@vscode/vsce": "^2.31.1",
"chai": "^5.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/auth/azureAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function getTokenInfo(session: AuthenticationSession): Errorable<TokenInf
try {
jsonBody = Buffer.from(body, "base64").toString();
} catch (e) {
return { succeeded: false, error: `Failed to decode JWT token body: ${body}` };
return { succeeded: false, error: `Failed to decode JWT token body: ${body}, with error ${e}` };
}

const jwt = parseJson<Jwt>(jsonBody);
Expand Down
6 changes: 3 additions & 3 deletions src/commands/draft/draftCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export async function draftWorkflow(_context: IActionContext, target: unknown):
path: join(".github", "workflows", name),
};
});
} catch (e) {
} catch {
// If the directory doesn't exist, that's fine - it just means there will be no existing workflow files.
}

Expand Down Expand Up @@ -235,8 +235,8 @@ async function getRepo(octokit: Octokit, remote: Remote): Promise<GitHubRepo | n

let response: RestEndpointMethodTypes["repos"]["get"]["response"];
try {
response = await octokit.rest.repos.get({ owner, repo });
} catch (e) {
response = await octokit.repos.get({ owner, repo });
} catch {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions src/commands/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function getFilteredSubscriptions(): SubscriptionFilter[] {
values = vscode.workspace.getConfiguration("azure").get<string[]>("resourceFilter", []);
}
return values.map(asSubscriptionFilter).filter((v) => v !== null) as SubscriptionFilter[];
} catch (e) {
} catch {
return [];
}
}
Expand All @@ -61,7 +61,7 @@ function asSubscriptionFilter(value: string): SubscriptionFilter | null {
try {
const parts = value.split("/");
return { tenantId: parts[0], subscriptionId: parts[1] };
} catch (e) {
} catch {
return null;
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/commands/utils/detectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ export async function getDetectorListData(
} catch (err) {
// This would be unexpected even in the event of network failure, because the individual promises handle
// their own errors.
return { succeeded: false, error: `Failed to retrieve detector data for ${categoryDetector.name}` };
return {
succeeded: false,
error: `Failed to retrieve detector data for ${categoryDetector.name}, with error ${err}`,
};
}

return combine(results);
Expand Down
4 changes: 3 additions & 1 deletion src/panels/InspektorGadgetPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export class InspektorGadgetDataProvider implements PanelDataProvider<"gadget">
}

getInitialState(): InitialState {
return {};
return {
clusterName: this.clusterName,
};
}

getTelemetryDefinition(): TelemetryDefinition<"gadget"> {
Expand Down
4 changes: 3 additions & 1 deletion src/webview-contract/webviewDefinitions/inspektorGadget.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { WebviewDefinition } from "../webviewTypes";

export interface InitialState {}
export interface InitialState {
clusterName: string;
}

export interface GadgetVersion {
client: string;
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/manualTest/inspektorGadgetTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export function getInspektorGadgetScenarios() {
}
}

const initialState: InitialState = {};
const initialState: InitialState = { clusterName: "clusterName" };

return [
Scenario.create(
Expand Down

0 comments on commit faae05c

Please sign in to comment.