🚨 fix: resolve all linter and typecheck warnings across codebase
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(),
|
||||
};
|
||||
|
||||
@@ -47,7 +47,6 @@ export function IcsFilePicker({
|
||||
accept=".ics"
|
||||
onChange={handleFileChange}
|
||||
className="hidden"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<Button
|
||||
onClick={handleButtonClick}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user