mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-03 17:04:07 +00:00
chore(lint): enable no-promise-executor-return
This commit is contained in:
@@ -140,7 +140,9 @@ const DISCORD_RESPONSE_BODY_MAX_BYTES = 1024 * 1024;
|
||||
const WEBHOOK_CLEANUP_TIMEOUT_MS = 10_000;
|
||||
|
||||
function sleep(ms: number): Promise<void> {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
function remainingTimeoutMs(deadlineMs: number, nowMs = Date.now()): number {
|
||||
|
||||
@@ -145,7 +145,9 @@ async function main() {
|
||||
const waitSeconds = Number.parseInt(getArg("--wait-seconds") ?? "25", 10);
|
||||
const deadline = Date.now() + Math.max(1, waitSeconds) * 1000;
|
||||
while (!node && Date.now() < deadline) {
|
||||
await new Promise((r) => setTimeout(r, 1000));
|
||||
await new Promise((r) => {
|
||||
setTimeout(r, 1000);
|
||||
});
|
||||
const res = await request("node.list").catch(() => null);
|
||||
if (!res?.ok) {
|
||||
continue;
|
||||
|
||||
@@ -54,7 +54,9 @@ function parseOptions(args = process.argv.slice(2)): Options {
|
||||
}
|
||||
|
||||
function delay(ms: number): Promise<void> {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
function shouldUseAltScreen(options: Options) {
|
||||
|
||||
Reference in New Issue
Block a user