Closed
Description
Repro
{
"rules": {
"@typescript-eslint/no-floating-promises": "error"
}
}
(async () => {
await something();
})();
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 |
Metadata
Metadata
Assignees
Labels
New rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin ruleGood for newcomersGood for newcomersIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin