chore: Enable "curly" rule to avoid single-statement if confusion/errors.

This commit is contained in:
cpojer
2026-01-31 16:19:20 +09:00
parent 009b16fab8
commit 5ceff756e1
1266 changed files with 27871 additions and 9393 deletions

View File

@@ -5,7 +5,9 @@ export type BrowserControlServer = {
};
export async function startBrowserControlServerIfEnabled(): Promise<BrowserControlServer | null> {
if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_BROWSER_CONTROL_SERVER)) return null;
if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_BROWSER_CONTROL_SERVER)) {
return null;
}
// Lazy import: keeps startup fast, but still bundles for the embedded
// gateway (bun --compile) via the static specifier path.
const override = process.env.OPENCLAW_BROWSER_CONTROL_MODULE?.trim();
@@ -21,7 +23,9 @@ export async function startBrowserControlServerIfEnabled(): Promise<BrowserContr
typeof (mod as { stopBrowserControlService?: unknown }).stopBrowserControlService === "function"
? (mod as { stopBrowserControlService: () => Promise<void> }).stopBrowserControlService
: (mod as { stopBrowserControlServer?: () => Promise<void> }).stopBrowserControlServer;
if (!start) return null;
if (!start) {
return null;
}
await start();
return { stop: stop ?? (async () => {}) };
}