🚨 fix: resolve all linter and typecheck warnings across codebase

This commit is contained in:
2026-04-07 14:42:24 -04:00
parent 54ca910609
commit f38b0188df
6 changed files with 12 additions and 10 deletions

View File

@@ -32,7 +32,7 @@ export default function SignInPage() {
providerId: "authentik",
callbackURL: "/",
});
} catch (_error) {
} catch {
toast.error("Failed to sign in. Please try again.");
} finally {
setIsLoading(false);

View File

@@ -182,10 +182,9 @@ export default function HomePage() {
const persistAiEvents = async (data: CalendarEvent[]) => {
for (const ev of data) {
const { id: _existingId, ...rest } = ev;
const newEvent = {
const newEvent: CalendarEvent = {
...ev,
id: nanoid(),
...rest,
createdAt: new Date().toISOString(),
lastModified: new Date().toISOString(),
};

View File

@@ -47,7 +47,6 @@ export function IcsFilePicker({
accept=".ics"
onChange={handleFileChange}
className="hidden"
aria-hidden="true"
/>
<Button
onClick={handleButtonClick}

View File

@@ -41,8 +41,8 @@ export function RRuleDisplayDetailed({
{showBadges && details.length > 0 && (
<div className="flex flex-wrap gap-1">
{details.map((detail, index) => (
<Badge key={index} variant="outline" className="text-xs">
{details.map((detail) => (
<Badge key={detail} variant="outline" className="text-xs">
{detail}
</Badge>
))}
@@ -159,7 +159,7 @@ function formatRRuleToHuman(rule: RecurrenceRule): string {
const [, num, dayCode] = match;
const dayName = dayNames[dayCode as keyof typeof dayNames];
if (num) {
const ordinal = getOrdinal(parseInt(num));
const ordinal = getOrdinal(parseInt(num, 10));
return `${ordinal} ${dayName}`;
}
return dayName;

View File

@@ -13,7 +13,7 @@ export default function SignIn() {
try {
await signOut();
router.push("/");
} catch (_error) {
} catch {
toast.error("Failed to sign out. Please try again.");
}
};

View File

@@ -2,7 +2,11 @@ import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import * as schema from "./schema";
const connectionString = process.env.DATABASE_URL!;
const connectionString = process.env.DATABASE_URL;
if (!connectionString) {
throw new Error("DATABASE_URL environment variable is required");
}
const client = postgres(connectionString, {
prepare: false,