Skip to content

Commit 43aa1c6

Browse files
authored
Switch to vercel's biome setup (#543)
1 parent b864335 commit 43aa1c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+414
-201
lines changed

app/(auth)/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface LoginActionState {
1717

1818
export const login = async (
1919
_: LoginActionState,
20-
formData: FormData
20+
formData: FormData,
2121
): Promise<LoginActionState> => {
2222
try {
2323
const validatedData = authFormSchema.parse({
@@ -53,7 +53,7 @@ export interface RegisterActionState {
5353

5454
export const register = async (
5555
_: RegisterActionState,
56-
formData: FormData
56+
formData: FormData,
5757
): Promise<RegisterActionState> => {
5858
try {
5959
const validatedData = authFormSchema.parse({

app/(auth)/auth.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export const {
2020
providers: [
2121
Credentials({
2222
credentials: {},
23-
// biome-ignore lint/suspicious/noExplicitAny: TODO
2423
async authorize({ email, password }: any) {
2524
const users = await getUser(email);
2625
if (users.length === 0) return null;
26+
// biome-ignore lint: Forbidden non-null assertion.
2727
const passwordsMatch = await compare(password, users[0].password!);
28-
// biome-ignore lint/suspicious/noExplicitAny: TODO
28+
if (!passwordsMatch) return null;
2929
return users[0] as any;
3030
},
3131
}),
@@ -43,7 +43,6 @@ export const {
4343
token,
4444
}: {
4545
session: ExtendedSession;
46-
// biome-ignore lint/suspicious/noExplicitAny: TODO
4746
token: any;
4847
}) {
4948
if (session.user) {

app/(auth)/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function Page() {
2020
login,
2121
{
2222
status: 'idle',
23-
}
23+
},
2424
);
2525

2626
useEffect(() => {

app/(auth)/register/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function Page() {
2020
register,
2121
{
2222
status: 'idle',
23-
}
23+
},
2424
);
2525

2626
useEffect(() => {

app/(chat)/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use server';
22

3-
import { CoreMessage, type CoreUserMessage, generateText } from 'ai';
3+
import { type CoreUserMessage, generateText } from 'ai';
44
import { cookies } from 'next/headers';
55

66
import { customModel } from '@/lib/ai';

app/(chat)/api/chat/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export async function POST(request: Request) {
104104
}),
105105
execute: async ({ latitude, longitude }) => {
106106
const response = await fetch(
107-
`https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&current=temperature_2m&hourly=temperature_2m&daily=sunrise,sunset&timezone=auto`
107+
`https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&current=temperature_2m&hourly=temperature_2m&daily=sunrise,sunset&timezone=auto`,
108108
);
109109

110110
const weatherData = await response.json();
@@ -350,7 +350,7 @@ export async function POST(request: Request) {
350350
content: message.content,
351351
createdAt: new Date(),
352352
};
353-
}
353+
},
354354
),
355355
});
356356
} catch (error) {

app/(chat)/api/files/upload/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const FileSchema = z.object({
1616
['image/jpeg', 'image/png', 'application/pdf'].includes(file.type),
1717
{
1818
message: 'File type should be JPEG, PNG, or PDF',
19-
}
19+
},
2020
),
2121
});
2222

@@ -65,7 +65,7 @@ export async function POST(request: Request) {
6565
} catch (error) {
6666
return NextResponse.json(
6767
{ error: 'Failed to process request' },
68-
{ status: 500 }
68+
{ status: 500 },
6969
);
7070
}
7171
}

app/(chat)/api/history/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export async function GET() {
88
return Response.json('Unauthorized!', { status: 401 });
99
}
1010

11+
// biome-ignore lint: Forbidden non-null assertion.
1112
const chats = await getChatsByUserId({ id: session.user.id! });
1213
return Response.json(chats);
1314
}

app/(chat)/chat/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CoreMessage } from 'ai';
1+
22
import { cookies } from 'next/headers';
33
import { notFound } from 'next/navigation';
44

app/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export default async function RootLayout({
5151
>
5252
<head>
5353
<script
54-
// biome-ignore lint/security/noDangerouslySetInnerHtml: <explanation>
5554
dangerouslySetInnerHTML={{
5655
__html: THEME_COLOR_SCRIPT,
5756
}}

0 commit comments

Comments
 (0)