fix: sentry lint issues

!nuf
This commit is contained in:
Miodec 2025-08-20 23:44:00 +02:00
parent 263984f576
commit cc08930de3
5 changed files with 8 additions and 8 deletions

View file

@ -69,7 +69,7 @@ async function getDataAndInit(): Promise<boolean> {
);
}
Sentry.setUser(snapshot.uid, snapshot.name);
void Sentry.setUser(snapshot.uid, snapshot.name);
if (snapshot.needsToChangeName) {
Notifications.addPSA(
"You need to update your account name. <a class='openNameChange'>Click here</a> to change it and learn more about why.",
@ -155,7 +155,7 @@ export async function onAuthStateChanged(
}
if (!authInitialisedAndConnected || !user) {
Sentry.clearUser();
void Sentry.clearUser();
}
let keyframes = [

View file

@ -1,6 +1,6 @@
import * as Notifications from "./elements/notifications";
import { ZodSchema, z } from "zod";
import { captureException } from "./sentry";
import * as Sentry from "./sentry";
// function isConfigKeyValid(name: string): boolean {
// if (name === null || name === undefined || name === "") return false;
@ -21,7 +21,7 @@ export function invalid(
Notifications.add(message, -1);
console.error(message);
captureException(new Error(message));
void Sentry.captureException(new Error(message));
}
export function isConfigValueValid<T>(

View file

@ -37,6 +37,6 @@ export function activateWhatsAccepted(): void {
activateAnalytics();
}
if (accepted?.sentry) {
activateSentry();
void activateSentry();
}
}

View file

@ -128,7 +128,7 @@ export async function fillPresetButtons(): Promise<void> {
const msg =
"Failed to fill preset theme buttons: favThemes or allThemes element not found";
Notifications.add(msg, -1);
captureException(new Error(msg));
void captureException(new Error(msg));
console.error(msg, { favThemesEl, themesEl });
return;
}

View file

@ -76,7 +76,7 @@ import * as CompositionState from "../states/composition";
import { SnapshotResult } from "../constants/default-snapshot";
import { WordGenError } from "../utils/word-gen-error";
import { tryCatch } from "@monkeytype/util/trycatch";
import { captureException } from "../sentry";
import * as Sentry from "../sentry";
import * as Loader from "../elements/loader";
import * as TestInitFailed from "../elements/test-init-failed";
import { canQuickRestart } from "../utils/quick-restart";
@ -410,7 +410,7 @@ export async function init(): Promise<void | null> {
testReinitCount++;
if (testReinitCount > 3) {
if (lastInitError) {
captureException(lastInitError);
void Sentry.captureException(lastInitError);
TestInitFailed.showError(
`${lastInitError.name}: ${lastInitError.message}`
);