Fix eslint no-unused-vars in async handlers
Some checks failed
build-and-push / lint (push) Failing after 4s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped

This commit is contained in:
nocci 2025-12-30 16:15:14 +00:00
parent 3fd861f134
commit 52895fd991
3 changed files with 24 additions and 24 deletions

View file

@ -64,7 +64,7 @@ try {
await page.waitForSelector('#h_captcha_challenge_login_prod iframe', { timeout: 15000 });
console.error('Got a captcha during login (likely due to too many attempts)! You may solve it in the browser, get a new IP or try again in a few hours.');
notify('unrealengine: got captcha during login. Please check.');
} catch (e) {
} catch {
return;
}
})();
@ -75,7 +75,7 @@ try {
const otp = cfg.eg_otpkey && authenticator.generate(cfg.eg_otpkey) || await prompt({ type: 'text', message: 'Enter two-factor sign in code', validate: n => n.toString().length == 6 || 'The code must be 6 digits!' }); // can't use type: 'number' since it strips away leading zeros and codes sometimes have them
await page.locator('input[name="code-input-0"]').pressSequentially(otp.toString());
await page.click('button[type="submit"]');
} catch (e) {
} catch {
return;
}
})();
@ -142,15 +142,15 @@ try {
await page.locator('button.checkout').click();
console.log('Click checkout');
// maybe: Accept End User License Agreement
void (async () => {
try {
await page.locator('[name=accept-label]').check({ timeout: 10000 });
console.log('Accept End User License Agreement');
await page.locator('span:text-is("Accept")').click(); // otherwise matches 'Accept All Cookies'
} catch (e) {
return;
}
})();
void (async () => {
try {
await page.locator('[name=accept-label]').check({ timeout: 10000 });
console.log('Accept End User License Agreement');
await page.locator('span:text-is("Accept")').click(); // otherwise matches 'Accept All Cookies'
} catch {
return;
}
})();
await page.waitForSelector('#webPurchaseContainer iframe');
const iframe = page.frameLocator('#webPurchaseContainer iframe');
@ -170,7 +170,7 @@ try {
try {
await btnAgree.waitFor({ timeout: 10000 });
await btnAgree.click();
} catch (e) {
} catch {
return;
}
})(); // EU: wait for and click 'I Agree'
@ -181,7 +181,7 @@ try {
try {
await captcha.waitFor({ timeout: 10000 });
console.error(' Got hcaptcha challenge! Lost trust due to too many login attempts? You can solve the captcha in the browser or get a new IP address.');
} catch (e) {
} catch {
return;
}
})(); // may time out if not shown