Skip to content

Commit

Permalink
Allow using void to silence the `@typescript-eslint/no-floating-pro…
Browse files Browse the repository at this point in the history
…mises` rule
  • Loading branch information
sindresorhus committed Jun 3, 2020
1 parent 47eea57 commit 9998f57
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Expand Up @@ -294,9 +294,16 @@ module.exports = {
allowWithDecorator: true
}
],
'no-void': [
'error',
{
allowAsStatement: true // To allow `ignoreVoid` in `@typescript-eslint/no-floating-promises`
}
],
'@typescript-eslint/no-floating-promises': [
'error',
{
ignoreVoid: true, // Prepend a function call with `void` to mark it as not needing to be await'ed, which silences this rule.
ignoreIIFE: true
}
],
Expand Down

0 comments on commit 9998f57

Please sign in to comment.