eslint: add strict await checking: (#684)

- require await / void / catch for promises
- don't allow unnecessary await
This commit is contained in:
Ilya Kreymer 2024-09-06 16:24:18 -07:00 committed by GitHub
parent 9cacae6bb6
commit b42548373d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 79 additions and 46 deletions

View file

@ -437,7 +437,7 @@ class InteractiveBrowser {
// attempt to keep everything to initial tab if headless
if (this.params.headless) {
cdp.send("Page.enable");
cdp.send("Page.enable").catch((e) => logger.warn("Page.enable error", e));
cdp.on("Page.windowOpen", async (resp) => {
if (!resp.url) {
@ -493,7 +493,9 @@ class InteractiveBrowser {
handlePageLoad() {
this.addOrigin();
this.saveCookiesFor(this.page.url());
this.saveCookiesFor(this.page.url()).catch((e) =>
logger.warn("Error saving cookies", e),
);
}
async saveAllCookies() {
@ -722,4 +724,4 @@ class InteractiveBrowser {
}
}
main();
await main();