Fix all biome linter errors (#541)

This commit is contained in:
Jared Palmer 2024-11-15 12:18:17 -05:00 committed by GitHub
parent f23c73f6a5
commit e5d654bf41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 317 additions and 275 deletions

View file

@ -1,5 +1,5 @@
import { compare } from 'bcrypt-ts';
import NextAuth, { User, Session } from 'next-auth';
import NextAuth, { type User, type Session } from 'next-auth';
import Credentials from 'next-auth/providers/credentials';
import { getUser } from '@/lib/db/queries';
@ -20,11 +20,13 @@ export const {
providers: [
Credentials({
credentials: {},
// biome-ignore lint/suspicious/noExplicitAny: TODO
async authorize({ email, password }: any) {
let users = await getUser(email);
const users = await getUser(email);
if (users.length === 0) return null;
let passwordsMatch = await compare(password, users[0].password!);
if (passwordsMatch) return users[0] as any;
const passwordsMatch = await compare(password, users[0].password!);
// biome-ignore lint/suspicious/noExplicitAny: TODO
return users[0] as any;
},
}),
],
@ -41,6 +43,7 @@ export const {
token,
}: {
session: ExtendedSession;
// biome-ignore lint/suspicious/noExplicitAny: TODO
token: any;
}) {
if (session.user) {