Skip to content

Commit

Permalink
feat(eslint-plugin): [no-floating-promise] don't ignore void
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed May 10, 2020
1 parent 3947418 commit 5dbc169
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/eslint-plugin/docs/rules/no-floating-promises.md
Expand Up @@ -56,7 +56,8 @@ type Options = {
};

const defaults = {
ignoreVoid: false,
ignoreVoid: true,
ignoreIIFE: false,
};
```

Expand All @@ -76,6 +77,8 @@ void returnsPromise();
void Promise.reject('value');
```

With this option set to `true`, and if you are using `no-void`, you should turn on the [`allowAsAStatement`](https://eslint.org/docs/rules/no-void#allowasstatement) option.

### `ignoreIIFE`

This allows you to skip checking of async iife
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-floating-promises.ts
Expand Up @@ -47,7 +47,7 @@ export default util.createRule<Options, MessageId>({
},
defaultOptions: [
{
ignoreVoid: false,
ignoreVoid: true,
ignoreIIFE: false,
},
],
Expand Down

0 comments on commit 5dbc169

Please sign in to comment.