[twenty-server] no-misused-promise lint (#20529)

# Introduction
Adding `no-miused-promise` lint rule to the twenty-server
In order to flag such pattern
```ts
//  Flagged — forEach doesn't await the callback
items.forEach(async (item) => {
  await process(item);
});
```

## What happened
- Refactored the code-interpreter driver to have a async onResult (
which is also expected by e2b )
- Workspace manager still dirty solution including force cast
- Basic fixes
This commit is contained in:
Paul Rastoin
2026-05-13 15:14:06 +02:00
committed by GitHub
parent 27fd124c2e
commit 643ec121a7
9 changed files with 15 additions and 10 deletions
@@ -17,9 +17,9 @@ export function wrapAsyncIteratorWithLifecycle<T>(
const startHeartbeat = () => {
if (onHeartbeat && heartbeatIntervalMs) {
heartbeatInterval = setInterval(async () => {
heartbeatInterval = setInterval(() => {
try {
await onHeartbeat();
void onHeartbeat().catch(() => {});
} catch {
// Heartbeat failure shouldn't crash the stream
}