diff --git a/biome.json b/biome.json index 1e99f64fb9..cd6db8dd69 100644 --- a/biome.json +++ b/biome.json @@ -73,7 +73,8 @@ "*.gen.ts*", "*.d.ts", "*.exe", - "package.json" + "package.json", + "packages/artifacts.json" ] } } diff --git a/cli/common/bsb.js b/cli/common/bsb.js index c4f158e64e..9e94c121dc 100644 --- a/cli/common/bsb.js +++ b/cli/common/bsb.js @@ -72,8 +72,8 @@ function acquireBuild(args, options) { * @param {(code: number) => void} [maybeOnClose] */ function delegate(args, maybeOnClose) { - let p; - if ((p = acquireBuild(args))) { + const p = acquireBuild(args); + if (p) { p.once("error", e => { console.error(String(e)); releaseBuild(); @@ -376,12 +376,10 @@ Please pick a different one using the \`-ws [host:]port\` flag from bsb.`); return; } dlog(`Rebuilding since ${reasonsToRebuild}`); - let p; - if ( - (p = acquireBuild(rescriptWatchBuildArgs, { - stdio: ["inherit", "inherit", "pipe"], - })) - ) { + const p = acquireBuild(rescriptWatchBuildArgs, { + stdio: ["inherit", "inherit", "pipe"], + }); + if (p) { logStartCompiling(); p.on("data", s => { outputError(s, "ninja: error"); diff --git a/cli/rescript.js b/cli/rescript.js index f0454c32fa..3cce2c9c5a 100755 --- a/cli/rescript.js +++ b/cli/rescript.js @@ -29,7 +29,7 @@ let forwardedSignal = false; /** * @param {NodeJS.Signals} signal */ -const handleSignal = (signal) => { +const handleSignal = signal => { // Intercept the signal in the parent, forward it to the child, and let the // child perform its own cleanup. This ensures ordered shutdown in watch mode. // Guard against double-forwarding since terminals or OSes can deliver @@ -85,7 +85,7 @@ child.on("exit", (code, signal) => { }); // Surface spawn errors (e.g., executable not found) and exit with failure. -child.on("error", (err) => { +child.on("error", err => { console.error(err?.message ?? String(err)); process.exit(1); }); diff --git a/package.json b/package.json index 62a395f8fe..412921c3ed 100644 --- a/package.json +++ b/package.json @@ -48,9 +48,9 @@ "test": "node scripts/test.js -all", "test-bsb": "node scripts/test.js -bsb", "test-ocaml": "node scripts/test.js -ounit", - "check": "biome check --changed --no-errors-on-unmatched .", + "check": "biome check --no-errors-on-unmatched .", "check:all": "biome check .", - "format": "biome check --changed --no-errors-on-unmatched . --fix", + "format": "biome check --no-errors-on-unmatched . --fix", "coverage": "nyc --timeout=3000 --reporter=html mocha tests/tests/src/*_test.js && open ./coverage/index.html", "typecheck": "tsc", "apidocs:generate": "yarn workspace @utils/scripts apidocs:generate"