Search Terms
Suggestion
A simple warning when someone uses forEach(async. It's such an easy stumbling block for those entering the async/await world. A user never wants to write that code intentionally
Use Cases
I didn't know that forEach(async ... simply doesn't work (even though linting passes, and similar things like .map(async and relatives are fine.
Examples
Wherever the parser encounters forEach(async it marks it as an error.
Checklist
My suggestion meets these guidelines:
Search Terms
forEachforEach(asyncSuggestion
A simple warning when someone uses
forEach(async. It's such an easy stumbling block for those entering theasync/awaitworld. A user never wants to write that code intentionallyUse Cases
I didn't know that
forEach(async ...simply doesn't work (even though linting passes, and similar things like.map(asyncand relatives are fine.Examples
Wherever the parser encounters
forEach(asyncit marks it as an error.Checklist
My suggestion meets these guidelines: