Skip to content

Commit 9998f57

Browse files
committed
Allow using void to silence the @typescript-eslint/no-floating-promises rule
1 parent 47eea57 commit 9998f57

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,16 @@ module.exports = {
294294
allowWithDecorator: true
295295
}
296296
],
297+
'no-void': [
298+
'error',
299+
{
300+
allowAsStatement: true // To allow `ignoreVoid` in `@typescript-eslint/no-floating-promises`
301+
}
302+
],
297303
'@typescript-eslint/no-floating-promises': [
298304
'error',
299305
{
306+
ignoreVoid: true, // Prepend a function call with `void` to mark it as not needing to be await'ed, which silences this rule.
300307
ignoreIIFE: true
301308
}
302309
],

0 commit comments

Comments
 (0)