Skip to content

Commit bb7a021

Browse files
authored
ref(replay): Enable @typescript-eslint/no-floating-promises rule (#6344)
1 parent d7e72fb commit bb7a021

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

packages/replay/.eslintrc.js

Lines changed: 0 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ export class Replay implements Integration {
726726
}
727727

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

910910
// This case means that recording was once stopped due to inactivity.
@@ -1039,7 +1039,7 @@ export class Replay implements Integration {
10391039
return;
10401040
}
10411041

1042-
this.flushImmediate();
1042+
void this.flushImmediate();
10431043
}
10441044

10451045
/**

0 commit comments

Comments
 (0)