Skip to content

Commit 857f95e

Browse files
fix lint
1 parent 2dc5b6b commit 857f95e

7 files changed

Lines changed: 20 additions & 20 deletions

File tree

apps/dashboard/sentry.edge.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import * as Sentry from "@sentry/nextjs";
66
import { TRPCError } from "@trpc/server";
77

88
// tRPC error codes that should not be reported to Sentry (expected client errors)
9-
const IGNORED_TRPC_CODES: TRPCError["code"][] = new Set([
9+
const IGNORED_TRPC_CODES: TRPCError["code"][] = [
1010
"UNAUTHORIZED",
1111
"NOT_FOUND",
1212
"BAD_REQUEST",
13-
]);
13+
];
1414

1515
Sentry.init({
1616
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
@@ -25,7 +25,7 @@ Sentry.init({
2525
beforeSend(event, hint) {
2626
if (
2727
hint.originalException instanceof TRPCError &&
28-
IGNORED_TRPC_CODES.has(hint.originalException.code)
28+
IGNORED_TRPC_CODES.includes(hint.originalException.code)
2929
) {
3030
return null;
3131
}

apps/dashboard/sentry.server.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as Sentry from "@sentry/nextjs";
66
import { TRPCError } from "@trpc/server";
77

88
// tRPC error codes that should not be reported to Sentry (expected client errors)
9-
const IGNORED_TRPC_CODES: TRPCError["code"][] = new Set([
9+
const IGNORED_TRPC_CODES: TRPCError["code"][] = ([
1010
"UNAUTHORIZED",
1111
"NOT_FOUND",
1212
"BAD_REQUEST",
@@ -25,7 +25,7 @@ Sentry.init({
2525
beforeSend(event, hint) {
2626
if (
2727
hint.originalException instanceof TRPCError &&
28-
IGNORED_TRPC_CODES.has(hint.originalException.code)
28+
IGNORED_TRPC_CODES.includes(hint.originalException.code)
2929
) {
3030
return null;
3131
}

apps/status-page/sentry.edge.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as Sentry from "@sentry/nextjs";
66
import { TRPCError } from "@trpc/server";
77

88
// tRPC error codes that should not be reported to Sentry (expected client errors)
9-
const IGNORED_TRPC_CODES: TRPCError["code"][] = new Set([
9+
const IGNORED_TRPC_CODES: TRPCError["code"][] = ([
1010
"UNAUTHORIZED",
1111
"NOT_FOUND",
1212
"BAD_REQUEST",
@@ -25,7 +25,7 @@ Sentry.init({
2525
beforeSend(event, hint) {
2626
if (
2727
hint.originalException instanceof TRPCError &&
28-
IGNORED_TRPC_CODES.has(hint.originalException.code)
28+
IGNORED_TRPC_CODES.includes(hint.originalException.code)
2929
) {
3030
return null;
3131
}

apps/status-page/sentry.server.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import * as Sentry from "@sentry/nextjs";
66
import { TRPCError } from "@trpc/server";
77

88
// tRPC error codes that should not be reported to Sentry (expected client errors)
9-
const IGNORED_TRPC_CODES: TRPCError["code"][] = new Set([
9+
const IGNORED_TRPC_CODES: TRPCError["code"][] = [
1010
"UNAUTHORIZED",
1111
"NOT_FOUND",
1212
"BAD_REQUEST",
13-
]);
13+
];
1414

1515
Sentry.init({
1616
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
@@ -25,7 +25,7 @@ Sentry.init({
2525
beforeSend(event, hint) {
2626
if (
2727
hint.originalException instanceof TRPCError &&
28-
IGNORED_TRPC_CODES.has(hint.originalException.code)
28+
IGNORED_TRPC_CODES.includes(hint.originalException.code)
2929
) {
3030
return null;
3131
}

apps/web/sentry.edge.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { TRPCError } from "@trpc/server";
88
import { env } from "@/env";
99

1010
// tRPC error codes that should not be reported to Sentry (expected client errors)
11-
const IGNORED_TRPC_CODES: TRPCError["code"][] = new Set([
11+
const IGNORED_TRPC_CODES: TRPCError["code"][] = [
1212
"UNAUTHORIZED",
1313
"NOT_FOUND",
1414
"BAD_REQUEST",
15-
]);
15+
];
1616

1717
Sentry.init({
1818
dsn: env.NEXT_PUBLIC_SENTRY_DSN,
@@ -27,7 +27,7 @@ Sentry.init({
2727
beforeSend(event, hint) {
2828
if (
2929
hint.originalException instanceof TRPCError &&
30-
IGNORED_TRPC_CODES.has(hint.originalException.code)
30+
IGNORED_TRPC_CODES.includes(hint.originalException.code)
3131
) {
3232
return null;
3333
}

apps/web/sentry.server.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { TRPCError } from "@trpc/server";
88
import { env } from "@/env";
99

1010
// tRPC error codes that should not be reported to Sentry (expected client errors)
11-
const IGNORED_TRPC_CODES: TRPCError["code"][] = new Set([
11+
const IGNORED_TRPC_CODES: TRPCError["code"][] = [
1212
"UNAUTHORIZED",
1313
"NOT_FOUND",
1414
"BAD_REQUEST",
15-
]);
15+
];
1616

1717
Sentry.init({
1818
dsn: env.NEXT_PUBLIC_SENTRY_DSN,
@@ -27,7 +27,7 @@ Sentry.init({
2727
beforeSend(event, hint) {
2828
if (
2929
hint.originalException instanceof TRPCError &&
30-
IGNORED_TRPC_CODES.has(hint.originalException.code)
30+
IGNORED_TRPC_CODES.includes(hint.originalException.code)
3131
) {
3232
return null;
3333
}

packages/tracker/src/tracker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ export class Tracker {
8181
}
8282

8383
private isOngoingReport() {
84-
const resolved: StatusReport["status"][] = new Set([
84+
const resolved: StatusReport["status"][] = [
8585
"monitoring",
8686
"resolved",
87-
]);
88-
return this.statusReports.some((report) => !resolved.has(report.status));
87+
];
88+
return this.statusReports.some((report) => !resolved.includes(report.status));
8989
}
9090

9191
private isOngoingMaintenance() {
@@ -155,7 +155,7 @@ export class Tracker {
155155
// HACK: this is a temporary solution to get the status reports
156156
private getStatusReportsByDay(props: Monitor): StatusReports {
157157
const statusReports = this.statusReports?.filter((report) => {
158-
const firstStatusReportUpdate = report?.statusReportUpdates?.toSorted(
158+
const firstStatusReportUpdate = report?.statusReportUpdates?.sort(
159159
(a, b) => a.date.getTime() - b.date.getTime(),
160160
)?.[0];
161161

0 commit comments

Comments
 (0)