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
Repro
{"rules": {"@typescript-eslint/no-floating-promises":"error" }}
(async()=>{awaitsomething();})();
Expected Result
I expected it not to report as it's an intentional action. It doesn't catch a mistake.
If you're not willing to add this exception by default, at least add an option to ignore async IIFEs.
Actual Result
It reports as a floating promise, which is technically correct, but not wanted behavior, at least from my perspective.
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 1.11.0 |
@typescript-eslint/parser | 1.11.0 |
TypeScript | 3.5.1 |
ESLint | 5.16.0 |
node | 8.16.0 |
npm | 6.9.0 |