Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/git/land.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ async function main(state, argv, cli, dir) {
}
try {
session.restore();
} catch (err) { // JSON error?
} catch { // JSON error?
if (state === ABORT) {
await session.abort();
return;
Expand Down
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export default [
{ ignoreRegExpLiterals: true, ignoreUrls: true },
],
'@stylistic/object-property-newline': 'off',
'no-unused-vars': ['error', {
args: 'none',
caughtErrors: 'all',
ignoreRestSiblings: true,
vars: 'all',
}],
'promise/always-return': ['error', { ignoreLastCallback: true }],
'n/no-process-exit': 'off',
'n/no-unsupported-features/node-builtins': 'off',
Expand Down
4 changes: 2 additions & 2 deletions lib/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function auth(
let token;
try {
({ username, token } = getMergedConfig());
} catch (e) {
} catch {
// Ignore error and prompt
}

Expand Down Expand Up @@ -127,7 +127,7 @@ async function auth(
let token;
try {
token = await encryptValue(credentials.token);
} catch (err) {
} catch {
console.warn('Failed encrypt token, storing unencrypted instead');
token = credentials.token;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/backport_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class BackportSession extends Session {
logs = runSync('git',
['log', `-${num}`, '--format=%h', rev, '--', file]
).trim();
} catch (e) {
} catch {
return null;
}
if (!logs) {
Expand Down Expand Up @@ -282,7 +282,7 @@ export default class BackportSession extends Session {
['rev-parse', '--verify', '--quiet', branch]
);
return true;
} catch (e) {
} catch {
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ci/run_ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class RunPRJob {
try {
const { crumb } = await this.request.json(CI_CRUMB_URL);
return crumb;
} catch (e) {
} catch {
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/landing_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export default class LandingSession extends Session {
}
});
return this.final();
} catch (e) {
} catch {
await runAsync('git', ['rebase', '--abort']);
const count = subjects.length;
cli.log(`Couldn't rebase ${count} commits in the PR automatically`);
Expand Down
2 changes: 1 addition & 1 deletion lib/prepare_security.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export default class PrepareSecurityRelease extends SecurityRelease {
return body.substring(index);
}
return body;
} catch (error) {
} catch {
this.cli.error(`Could not retrieve the security issue template from ${url}`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/security-release/security-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export async function commitAndPushVulnerabilitiesJSON(
['push', '-u', 'origin', NEXT_SECURITY_RELEASE_BRANCH],
`This pushes the security release branch to origin/${NEXT_SECURITY_RELEASE_BRANCH}.`
);
} catch (error) {
} catch {
cli.warn('Rebasing...');
// try to pull rebase and push again
await runSecurityGitCommand(
Expand Down
2 changes: 1 addition & 1 deletion lib/security_blog.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export default class SecurityBlog extends SecurityRelease {
const date = await this.promptAnnouncementDate(cli);
validateDate(date);
return new Date(date).toISOString();
} catch (error) {
} catch {
return PLACEHOLDERS.annoucementDate;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default class Session {
let sess;
try {
sess = this.session;
} catch (err) {
} catch {
return fs.rmSync(this.sessionPath, { recursive: true, force: true });
}

Expand Down
2 changes: 1 addition & 1 deletion lib/update-v8/backport.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ async function applyPatch(ctx, task, patch, method = 'apply') {
['-p1', '--3way', '--directory=deps/v8'],
patch.data /* input */
);
} catch (e) {
} catch {
patch.hadConflicts = true;
return task.prompt(ListrEnquirerPromptAdapter).run({
type: 'input',
Expand Down
2 changes: 1 addition & 1 deletion lib/update-v8/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function checkCwd(ctx) {
isNode = true;
ctx.nodeMajorVersion = parseInt(match[1], 10);
}
} catch (e) {
} catch {
// ignore
}
if (!isNode) {
Expand Down
2 changes: 1 addition & 1 deletion lib/update-v8/majorUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function checkoutBranch() {
ctx.newVersion = version.split('.').map((s) => parseInt(s, 10));
try {
await ctx.execGitV8('branch', '-D', ctx.branch);
} catch (e) {
} catch {
// ignore
}
await ctx.execGitV8('branch', ctx.branch, `origin/${ctx.branch}`);
Expand Down
4 changes: 2 additions & 2 deletions lib/update_security_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class UpdateSecurityRelease extends SecurityRelease {

try {
validateDate(releaseDate);
} catch (error) {
} catch {
cli.error('Invalid date format. Please use the format yyyy/mm/dd.');
process.exit(1);
}
Expand Down Expand Up @@ -350,7 +350,7 @@ export default class UpdateSecurityRelease extends SecurityRelease {
h1Report.data.relationships.severity?.data.attributes.cvss_vector_string,
rating: h1Report.data.relationships.severity?.data.attributes.rating
};
} catch (error) {
} catch {
this.cli.error(`Couldnt not retrieve severity from report ${id}, skipping...`);
return false;
}
Expand Down
Loading