-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
Picking up
babel/babel-eslint#593
and
#9787
Some of the meanest kinds of bugs we are running into are race conditions happening at runtime because of accidentally missing await
statements.
Others run in this, too. Quoting @aymericbouzy:
My real pain point is the following: I have a large codebase, and when my code runs, I encounter bugs that are difficult to reproduce, unpredictable results ... simply because I forgot to await a promise. Here is a simple example where not awaiting a promise leads to bad results:
Now, I think we already know that ESLint cannot reliably detect these errors. I think that @ljharb is right with this statement:
This is what a type system and/or tests are for; this just isn’t a lintable problem.
But in practice I often times find myself in a situation where the type system doesn't catch the problem either or where the effort to make it detect the problem would simply be quite large.
Pragmatically, a simple warning when an await
keyword might be missing would do wonders.
Then I can still decide if that's the case or not.
What do you think?