Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I haveread the FAQ and my problem is not listed.
Repro
{"rules": {"@typescript-eslint/await-thenable":"error" }}
asyncfunctionbar(){}asyncfunctionfoo(){try{returnwindow.foo??bar();}catch{}}
tsconfig:https://github.com/sindresorhus/tsconfig/blob/67d56ca87d2790081696fe3d745befa7e9ff38b8/tsconfig.json
Expected Result
asyncfunctionbar(){}asyncfunctionfoo(){try{returnwindow.foo??awaitbar();// ^ correct position of `await`}catch{}}
Actual Result
asyncfunctionbar(){}asyncfunctionfoo(){try{returnawaitawaitawaitawaitawaitawaitawaitawaitawaitawaitwindow.foo??bar();// ^ incorrect position of `await`, which is then "autofixed" repeatedly}catch{}}
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 5.3.0 |
@typescript-eslint/parser | 5.3.0 |
TypeScript | 4.4.4 |
ESLint | 8.1.0 |
node | 16.4.2 |