Skip to content

Commit a906553

Browse files
committed
ref(replay): Enable @typescript-eslint/no-floating-promises rule
1 parent 08fd5a3 commit a906553

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

packages/replay/.eslintrc.js

-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ module.exports = {
5959
],
6060
// TODO (high-prio): Re-enable this after migration
6161
'@sentry-internal/sdk/no-async-await': 'off',
62-
// TODO (high-prio): Re-enable this after migration
63-
'@typescript-eslint/no-floating-promises': 'off',
6462
// TODO (medium-prio): Re-enable this after migration
6563
'jsdoc/require-jsdoc': 'off',
6664
},

packages/replay/src/eventBuffer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class EventBufferCompressionWorker implements IEventBuffer {
142142
}
143143

144144
init(): void {
145-
this.postMessage({ id: this.id, method: 'init', args: [] });
145+
void this.postMessage({ id: this.id, method: 'init', args: [] });
146146
__DEBUG_BUILD__ && logger.log('[Replay] Initialized compression worker');
147147
}
148148

packages/replay/src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ export class Replay implements Integration {
724724
}
725725

726726
this.addUpdate(() => {
727-
this.createPerformanceSpans([result as ReplayPerformanceEntry]);
727+
void this.createPerformanceSpans([result as ReplayPerformanceEntry]);
728728
// Returning true will cause `addUpdate` to not flush
729729
// We do not want network requests to cause a flush. This will prevent
730730
// recurring/polling requests from keeping the replay session alive.
@@ -901,7 +901,7 @@ export class Replay implements Integration {
901901
* called in an event handler for a user action that we consider as the user
902902
* being "active" (e.g. a mouse click).
903903
*/
904-
async triggerUserActivity(): Promise<void> {
904+
triggerUserActivity(): void {
905905
this.updateUserActivity();
906906

907907
// This case means that recording was once stopped due to inactivity.
@@ -1036,7 +1036,7 @@ export class Replay implements Integration {
10361036
return;
10371037
}
10381038

1039-
this.flushImmediate();
1039+
void this.flushImmediate();
10401040
}
10411041

10421042
/**

0 commit comments

Comments
 (0)