chore: add no unused vars lint rule

This commit is contained in:
Christian Andolf
2025-02-14 10:24:52 +01:00
parent 1116bdafa8
commit 06d861fb6f
54 changed files with 47 additions and 143 deletions

View File

@@ -11,7 +11,6 @@ import {
import { serverClient } from "@/lib/trpc/server"
import PaymentCallback from "@/components/HotelReservation/EnterDetails/Payment/PaymentCallback"
import { trackPaymentEvent } from "@/utils/tracking"
import type { LangParams, PageArgs } from "@/types/params"
@@ -62,7 +61,7 @@ export default async function PaymentCallbackPage({
? error.errorCode.toString()
: PaymentErrorCodeEnum.Failed.toString()
)
} catch (error) {
} catch {
console.error(
`[payment-callback] failed to get booking status for ${confirmationNumber}, status: ${status}`
)

View File

@@ -1,4 +1,3 @@
import { notFound } from "next/navigation"
import { Suspense } from "react"
import { SelectHotelMapContainer } from "@/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContainer"
@@ -6,8 +5,6 @@ import { SelectHotelMapContainerSkeleton } from "@/components/HotelReservation/S
import { MapContainer } from "@/components/MapContainer"
import { setLang } from "@/i18n/serverContext"
import { getHotelSearchDetails } from "../../utils"
import styles from "./page.module.css"
import type { AlternativeHotelsSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"

View File

@@ -3,7 +3,6 @@ import { beforeAll, describe, expect, it } from "@jest/globals"
import { getValidFromDate, getValidToDate } from "./getValidDates"
const NOW = new Date("2020-10-01T00:00:00Z")
let originalTz: string | undefined
describe("getValidFromDate", () => {
beforeAll(() => {

View File

@@ -62,7 +62,7 @@ export default async function CurrentContentPage({
<Tracking pageData={trackingData} />
</>
)
} catch (err) {
} catch {
return notFound()
}
}

View File

@@ -12,7 +12,6 @@ import type { LangParams, PageArgs, SearchParams } from "@/types/params"
export default async function Page({
searchParams,
params,
}: PageArgs<LangParams> & SearchParams<{ errorCode?: "dateOfBirthMismatch" }>) {
const intl = await getIntl()

View File

@@ -3,7 +3,6 @@ import { ArrowLeft } from "react-feather"
import { overview as profileOverview } from "@/constants/routes/myPages"
import Image from "@/components/Image"
import { ProtectedLayout } from "@/components/ProtectedLayout"
import Link from "@/components/TempDesignSystem/Link"
import { getIntl } from "@/i18n"
import background from "@/public/_static/img/partner/sas/sas_x_scandic_airplane_window_background.jpg"

View File

@@ -3,7 +3,6 @@ import React from "react"
import { getProfileSafely } from "@/lib/trpc/memoizedRequests"
import { AlreadyLinkedError } from "../components/AlreadyLinkedError"
import { SASModal } from "../components/SASModal"
import { LinkAccountForm } from "./LinkAccountForm"

View File

@@ -7,11 +7,7 @@ import { getIntl } from "@/i18n"
import { SASModal } from "../../components/SASModal"
import type { LangParams, PageArgs } from "@/types/params"
export default async function SASxScandicLinkPage({
params,
}: PageArgs<LangParams>) {
export default async function SASxScandicLinkPage() {
const intl = await getIntl()
return (

View File

@@ -1,5 +1,5 @@
import { cookies } from "next/headers"
import { redirect, RedirectType } from "next/navigation"
import { redirect } from "next/navigation"
import { z } from "zod"
import { serverClient } from "@/lib/trpc/server"
@@ -8,7 +8,9 @@ import { getIntl } from "@/i18n"
import { safeTry } from "@/utils/safeTry"
import { SAS_TOKEN_STORAGE_KEY } from "../sasUtils"
import OneTimePasswordForm, {type OnSubmitHandler } from "./OneTimePasswordForm"
import OneTimePasswordForm, {
type OnSubmitHandler,
} from "./OneTimePasswordForm"
import type { LangParams, PageArgs, SearchParams } from "@/types/params"
import type { Lang } from "@/constants/languages"
@@ -125,7 +127,7 @@ function verifyTokenValidity(token: string | undefined) {
const decoded = JSON.parse(atob(token.split(".")[1]))
const expiry = decoded.exp * 1000
return Date.now() < expiry
} catch (error) {
} catch {
return false
}
}

View File

@@ -47,7 +47,7 @@ export default async function ContentTypePage({
)
default:
const u: never = user
console.log(`[webview:page] unhandled user loading error`)
console.log("[webview:page] unhandled user loading error", u)
}
}