We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@typescript-eslint/no-floating-promises
no-void
When there is no need to wait for a Promise to be resolved, two rules are in conflict.
void
ignoreVoid
true
best-practices.js
The ESLint official docs recommends using the allowAsStatement option of no-void when using two rules.
allowAsStatement
With this option set to true, and if you are using no-void, you should turn on the allowAsStatement option. https://typescript-eslint.io/rules/no-floating-promises/#ignorevoid
ignoreVoid: false
@typescript/no-floating-promises
eslint-disable-next-line
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
When there is no need to wait for a Promise to be resolved, two rules are in conflict.
@typescript-eslint/no-floating-promises
recommends to usingvoid
operator to as an explicit marker.no-void
prohibits usingvoid
Details
ignoreVoid
option of@typescript-eslint/no-floating-promises
is set totrue
by default.https://typescript-eslint.io/rules/no-floating-promises/#ignorevoid
no-void
is declared inbest-practices.js
The ESLint official docs recommends using the
allowAsStatement
option ofno-void
when using two rules.Possible solutions
allowAsStatement
option tono-void
to developer can usevoid
as markersignoreVoid: false
to@typescript/no-floating-promises
, and developer useeslint-disable-next-line
as markers.The text was updated successfully, but these errors were encountered: