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

@@ -177,7 +177,7 @@ function runCommand(command, stdio = 'inherit') {
].join(sep);
execSync(command, { stdio, env, shell: true });
return true;
} catch (_e) {
} catch {
return false;
}
}
@@ -267,7 +267,7 @@ export function runSensitiveKeywordLinter() {
.trim()
.split('\n')
.filter(Boolean);
} catch (_error) {
} catch {
console.error(`Could not get changed files against origin/${baseRef}.`);
try {
console.log('Falling back to diff against HEAD~1');
@@ -276,7 +276,7 @@ export function runSensitiveKeywordLinter() {
.trim()
.split('\n')
.filter(Boolean);
} catch (_fallbackError) {
} catch {
console.error('Could not get changed files against HEAD~1 either.');
process.exit(1);
}