Open tristan-laroubine opened 2 years ago
Considering that the operator rxjs Tap is not blocking on operator chaining but can still contain an async function.
See the example code below:
const { of, tap } = require("rxjs"); const value$ = of(0).pipe( tap(async (data) => { await sleep(1000); console.log("1) async tap", data); }), tap((data) => console.log("2) tap", data)) );
Output
2) tap 0 1) async tap 0
A rule should be added to give the possibility to forbid the use of floating promises that are in the form of an async tap.
async tap
I use @typescript-eslint/no-misused-promises to ban stuff like this.
@typescript-eslint/no-misused-promises
Considering that the operator rxjs Tap is not blocking on operator chaining but can still contain an async function.
See the example code below:
Output
A rule should be added to give the possibility to forbid the use of floating promises that are in the form of an
async tap
.