build: add ESLint to script/lint and containerize linting (closes #152)
All checks were successful
check / check (push) Successful in 39s
e2e / e2e-chrome (push) Successful in 48s
e2e / e2e-firefox (push) Successful in 24s

This commit was merged in pull request #286.
This commit is contained in:
2026-08-17 09:10:03 +02:00
parent 4b7a678a9b
commit 47bf38644d
32 changed files with 716 additions and 82 deletions

View File

@@ -88,7 +88,7 @@ class Driver {
let parsed;
try {
parsed = JSON.parse(text);
} catch (_) {
} catch {
throw new Error(
method + " " + path + ": non-JSON response: " + text,
);
@@ -229,7 +229,9 @@ class Driver {
// condition it was waiting on rather than "timed out".
async waitFor(what, script, args = [], timeout = DEFAULT_WAIT_MS) {
const deadline = Date.now() + timeout;
let last = null;
// Assigned on every path through the loop body before it is read, so
// there is no initializer to give it.
let last;
for (;;) {
try {
const v = await this.execute(script, args);
@@ -512,7 +514,7 @@ async function waitForDriverReady(base, timeoutMs) {
const body = await res.json();
if (body && body.value && body.value.ready !== false) return;
}
} catch (_) {
} catch {
// not listening yet
}
if (Date.now() >= deadline) {

View File

@@ -287,7 +287,7 @@ async function pageCompilesWasm(page) {
try {
await WebAssembly.compile(new Uint8Array(bytes));
return true;
} catch (_) {
} catch {
return false;
}
}, EMPTY_WASM_MODULE);

View File

@@ -68,7 +68,11 @@ function withTimeout(promise, name) {
const timeout = new Promise((_, reject) => {
timer = setTimeout(
() =>
reject(new Error("timed out after " + TEST_TIMEOUT_MS + "ms")),
reject(
new Error(
name + ": timed out after " + TEST_TIMEOUT_MS + "ms",
),
),
TEST_TIMEOUT_MS,
);
});