fix: lint: Ban waitForTimeout, setTimeout-as-delay, and fixed sleep patterns (#442)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-03 20:58:01 +00:00
parent c9e84b2c34
commit 748557bc83
24 changed files with 139 additions and 3 deletions

View file

@ -50,6 +50,7 @@ async function waitForReceipt(rpcUrl: string, txHash: string, maxAttempts = 20):
}
return; // status === '0x1' — success
}
// eslint-disable-next-line no-restricted-syntax -- Polling with timeout: no event source for transaction receipt over HTTP RPC (eth_subscribe not available). See AGENTS.md #Engineering Principles.
await new Promise(r => setTimeout(r, 500));
}
throw new Error(`Transaction ${txHash} not mined after ${maxAttempts * 500}ms`);