Skip to content

Commit 90fc93d

Browse files
committed
chore: remove unused catch bindings
1 parent 4d967bf commit 90fc93d

13 files changed

Lines changed: 16 additions & 16 deletions

File tree

components/git/land.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ async function main(state, argv, cli, dir) {
181181
}
182182
try {
183183
session.restore();
184-
} catch (err) { // JSON error?
184+
} catch { // JSON error?
185185
if (state === ABORT) {
186186
await session.abort();
187187
return;

lib/auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async function auth(
7676
let token;
7777
try {
7878
({ username, token } = getMergedConfig());
79-
} catch (e) {
79+
} catch {
8080
// Ignore error and prompt
8181
}
8282

@@ -127,7 +127,7 @@ async function auth(
127127
let token;
128128
try {
129129
token = await encryptValue(credentials.token);
130-
} catch (err) {
130+
} catch {
131131
console.warn('Failed encrypt token, storing unencrypted instead');
132132
token = credentials.token;
133133
}

lib/backport_session.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class BackportSession extends Session {
2727
logs = runSync('git',
2828
['log', `-${num}`, '--format=%h', rev, '--', file]
2929
).trim();
30-
} catch (e) {
30+
} catch {
3131
return null;
3232
}
3333
if (!logs) {
@@ -282,7 +282,7 @@ export default class BackportSession extends Session {
282282
['rev-parse', '--verify', '--quiet', branch]
283283
);
284284
return true;
285-
} catch (e) {
285+
} catch {
286286
return false;
287287
}
288288
}

lib/ci/run_ci.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class RunPRJob {
3838
try {
3939
const { crumb } = await this.request.json(CI_CRUMB_URL);
4040
return crumb;
41-
} catch (e) {
41+
} catch {
4242
return false;
4343
}
4444
}

lib/landing_session.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export default class LandingSession extends Session {
286286
}
287287
});
288288
return this.final();
289-
} catch (e) {
289+
} catch {
290290
await runAsync('git', ['rebase', '--abort']);
291291
const count = subjects.length;
292292
cli.log(`Couldn't rebase ${count} commits in the PR automatically`);

lib/prepare_security.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export default class PrepareSecurityRelease extends SecurityRelease {
309309
return body.substring(index);
310310
}
311311
return body;
312-
} catch (error) {
312+
} catch {
313313
this.cli.error(`Could not retrieve the security issue template from ${url}`);
314314
}
315315
}

lib/security-release/security-release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export async function commitAndPushVulnerabilitiesJSON(
121121
['push', '-u', 'origin', NEXT_SECURITY_RELEASE_BRANCH],
122122
`This pushes the security release branch to origin/${NEXT_SECURITY_RELEASE_BRANCH}.`
123123
);
124-
} catch (error) {
124+
} catch {
125125
cli.warn('Rebasing...');
126126
// try to pull rebase and push again
127127
await runSecurityGitCommand(

lib/security_blog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export default class SecurityBlog extends SecurityRelease {
362362
const date = await this.promptAnnouncementDate(cli);
363363
validateDate(date);
364364
return new Date(date).toISOString();
365-
} catch (error) {
365+
} catch {
366366
return PLACEHOLDERS.annoucementDate;
367367
}
368368
}

lib/session.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export default class Session {
160160
let sess;
161161
try {
162162
sess = this.session;
163-
} catch (err) {
163+
} catch {
164164
return fs.rmSync(this.sessionPath, { recursive: true, force: true });
165165
}
166166

lib/update-v8/backport.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ async function applyPatch(ctx, task, patch, method = 'apply') {
261261
['-p1', '--3way', '--directory=deps/v8'],
262262
patch.data /* input */
263263
);
264-
} catch (e) {
264+
} catch {
265265
patch.hadConflicts = true;
266266
return task.prompt(ListrEnquirerPromptAdapter).run({
267267
type: 'input',

0 commit comments

Comments
 (0)