Skip to content

Commit fc7b412

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

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -720,11 +720,11 @@ export class Replay implements Integration {
720720
if (type === 'history') {
721721
// Need to collect visited URLs
722722
this.context.urls.push(result.name);
723-
this.triggerUserActivity();
723+
void this.triggerUserActivity();
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.
@@ -755,7 +755,7 @@ export class Replay implements Integration {
755755
}
756756

757757
if (result.category === 'ui.click') {
758-
this.triggerUserActivity();
758+
void this.triggerUserActivity();
759759
} else {
760760
this.checkAndHandleExpiredSession();
761761
}
@@ -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)