Disallow and suppress unsafe assignment (#19736)

This commit is contained in:
Christian Gunderman
2026-02-20 22:28:55 +00:00
committed by GitHub
parent b746524a1b
commit 58d637f919
71 changed files with 149 additions and 22 deletions
@@ -38,6 +38,7 @@ async function checkForUpdates(
isManagedExtensionSurface: boolean,
) {
try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const currentVersion = context.extension.packageJSON.version;
// Fetch extension details from the VSCode Marketplace.
@@ -75,9 +76,12 @@ async function checkForUpdates(
return;
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const data = await response.json();
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const extension = data?.results?.[0]?.extensions?.[0];
// The versions are sorted by date, so the first one is the latest.
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const latestVersion = extension?.versions?.[0]?.version;
if (