chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -17,13 +17,9 @@ export const DEFAULT_RECONNECT_POLICY: ReconnectPolicy = {
|
||||
maxAttempts: 12,
|
||||
};
|
||||
|
||||
const clamp = (val: number, min: number, max: number) =>
|
||||
Math.max(min, Math.min(max, val));
|
||||
const clamp = (val: number, min: number, max: number) => Math.max(min, Math.min(max, val));
|
||||
|
||||
export function resolveHeartbeatSeconds(
|
||||
cfg: ClawdbotConfig,
|
||||
overrideSeconds?: number,
|
||||
): number {
|
||||
export function resolveHeartbeatSeconds(cfg: ClawdbotConfig, overrideSeconds?: number): number {
|
||||
const candidate = overrideSeconds ?? cfg.web?.heartbeatSeconds;
|
||||
if (typeof candidate === "number" && candidate > 0) return candidate;
|
||||
return DEFAULT_HEARTBEAT_SECONDS;
|
||||
|
||||
Reference in New Issue
Block a user