Skip to content

Commit

Permalink
style: clean up eslint errors toggles
Browse files Browse the repository at this point in the history
using some dynamic typing magickery here.
  • Loading branch information
j1nxie committed Mar 9, 2024
1 parent 6dc9144 commit 6652363
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/eventRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import type { FastifyInstance } from "fastify";
/* eslint-disable @typescript-eslint/no-unsafe-call */
function eventRouter(fastify: FastifyInstance, options: any, done: any) {
fastify.get("/event", async () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const data = JSON.parse((await client.get("cache")) ?? "null");
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
const timestamp = data === null ? null : data.timestamp;

if (Date.now() - timestamp >= 86400000 || timestamp === null) {
Expand Down Expand Up @@ -64,7 +66,6 @@ async function getEvent() {

const document = dom.window.document;

/* eslint-disable @typescript-eslint/no-non-null-assertion */
const eventList = Array.from(
document
.querySelector(
Expand Down

0 comments on commit 6652363

Please sign in to comment.