-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What
We would like to enforce that any Promise-returning function is also defined as async. TypeScript ESLint already enforced this with promise-function-async. We could recreate a similar behavior with a custom GritQL plugin, since Biome does not support this out of the box.
Why
- Better stack traces
- Consistent code style
- Our internal Slack discussion that we could use this rule
Example
function suspiciouslySynchronousFunction(): Promise<number> {
return Promise.resolve(123); // We should have an error here
}Target Config
Only node for now. May be extended to base.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request