Unused error variables in catch block are not allowed (#24487)

This commit is contained in:
Alisa
2026-04-01 21:33:07 -07:00
committed by GitHub
parent 84936dc85d
commit 3344f6849c
92 changed files with 162 additions and 157 deletions

View File

@@ -1064,7 +1064,7 @@ async function resolveWorktreeSettings(
if (isGeminiWorktree(toplevel, projectRoot)) {
worktreePath = toplevel;
}
} catch (_e) {
} catch {
return undefined;
}

View File

@@ -33,7 +33,7 @@ describe('copyExtension permissions', () => {
makeWritableSync(path.join(p, child)),
);
}
} catch (_e) {
} catch {
// Ignore errors during cleanup
}
};

View File

@@ -101,7 +101,7 @@ describe('ExtensionManager', () => {
themeManager.clearExtensionThemes();
try {
fs.rmSync(tempHomeDir, { recursive: true, force: true });
} catch (_e) {
} catch {
// Ignore
}
});

View File

@@ -63,7 +63,7 @@ export function loadInstallMetadata(
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
const metadata = JSON.parse(configContent) as ExtensionInstallMetadata;
return metadata;
} catch (_e) {
} catch {
return undefined;
}
}

View File

@@ -151,7 +151,7 @@ export async function fetchReleaseFromGithub(
return await fetchJson(
`https://api.github.com/repos/${owner}/${repo}/releases/latest`,
);
} catch (_) {
} catch {
// This can fail if there is no release marked latest. In that case
// we want to just try the pre-release logic below.
}

View File

@@ -612,7 +612,7 @@ export function loadEnvironment(
}
}
}
} catch (_e) {
} catch {
// Errors are ignored to match the behavior of `dotenv.config({ quiet: true })`.
}
}