Biome forEach false positive repro for issue #10799
Repro in ./index.ts
To install dependencies:
bun installTo repro:
bunx biome lintPrints:
index.ts:5:9 lint/suspicious/useIterableCallbackReturn ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ This callback passed to forEach() iterable method should not return a value.
3 │ await pipe(
4 │ Iterable.range(0, 2),
> 5 │ Effect.forEach(
│ ^^^^^^^
6 │ (num) =>
7 │ pipe(
ℹ Either remove this return or remove the returned value.
5 │ Effect.forEach(
6 │ (num) =>
> 7 │ pipe(
│ ^^^^^
> 8 │ Effect.succeed(String.fromCharCode(65 + num)),
> 9 │ Effect.delay(`${num} seconds`),
> 10 │ Effect.tap(Console.log),
> 11 │ ),
│ ^
12 │ { concurrency: "unbounded" },
13 │ ),
Checked 3 files in 3ms. No fixes applied.
Found 1 error.