Skip to content

ref(replay): Enable @typescript-eslint/no-floating-promises rule #6344

New issue

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

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/replay/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ module.exports = {
],
// TODO (high-prio): Re-enable this after migration
'@sentry-internal/sdk/no-async-await': 'off',
// TODO (high-prio): Re-enable this after migration
'@typescript-eslint/no-floating-promises': 'off',
// TODO (medium-prio): Re-enable this after migration
'jsdoc/require-jsdoc': 'off',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/eventBuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class EventBufferCompressionWorker implements IEventBuffer {
}

init(): void {
this.postMessage({ id: this.id, method: 'init', args: [] });
void this.postMessage({ id: this.id, method: 'init', args: [] });
__DEBUG_BUILD__ && logger.log('[Replay] Initialized compression worker');
}

Expand Down
6 changes: 3 additions & 3 deletions packages/replay/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ export class Replay implements Integration {
}

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

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

this.flushImmediate();
void this.flushImmediate();
}

/**
Expand Down