[return-await] Fix result needs parentheses when code includes as
cast
#3613
Labels
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Repro
Expected Result
Fix result:
return await (res.json() as Promise<T>);
Actual Result
Fix result:
return await res.json() as Promise<T>;
This "fixed" code triggers the same lint error, and ESLint runs the fix multiple times, resulting in
return await await ... await await res.json() as Promise<T>;
.Versions
@typescript-eslint/eslint-plugin
4.28.2
@typescript-eslint/parser
4.28.2
TypeScript
4.3.5
ESLint
7.30.0
node
15.9.0
The text was updated successfully, but these errors were encountered: