[return-await] --fix (amusingly) confused by ternaries #1838
Labels
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Repro
Expected Result
or:
I think I prefer the second?
Actual Result
Yes, that's ten of them.
Additional Info
This new code is valid, possibly not even wrong? I don't know the binding order on
await foo ? bar : baz;
. It does, however, trigger "unnecessary await", pretty amusingly.Full eslintrc / package.json (templates, without this specific lint enabled, at least, at time of writing):
https://github.com/snyk/unless-overloaded/blob/master/.eslintrc.json
https://github.com/snyk/unless-overloaded/blob/master/package.json
Versions
@typescript-eslint/eslint-plugin
2.26.0
@typescript-eslint/parser
2.26.0
TypeScript
3.8.3
ESLint
6.8.0
node
12.16.1
npm
6.14.1
The text was updated successfully, but these errors were encountered: