diff --git a/app/courses/create/page.tsx b/app/courses/create/page.tsx index 16ba554..57bf81e 100644 --- a/app/courses/create/page.tsx +++ b/app/courses/create/page.tsx @@ -23,6 +23,7 @@ export default function CreateCourse() { if (email && !isOnboardingComplete(email)) { router.push("/onboarding") } else { + // eslint-disable-next-line react-hooks/set-state-in-effect setIsLoading(false) } } diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index e3de948..744a513 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -88,6 +88,7 @@ export default function Dashboard() { // Load user stats const profile = getUserProfile() if (profile?.stats) { + // eslint-disable-next-line react-hooks/set-state-in-effect setUserStats(profile.stats) } diff --git a/app/layout.tsx b/app/layout.tsx index 6d40965..1e362ad 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -38,6 +38,7 @@ export default function RootLayout({ /> + {/* eslint-disable-next-line @next/next/no-page-custom-font */} diff --git a/app/profile/page.tsx b/app/profile/page.tsx index 0c00529..aa3ed07 100644 --- a/app/profile/page.tsx +++ b/app/profile/page.tsx @@ -277,7 +277,7 @@ export default function Profile() {

Profile completed

-

You're all set up.

+

You're all set up.

1h ago

diff --git a/app/quizzes/page.tsx b/app/quizzes/page.tsx index b2bfe73..85fb8bc 100644 --- a/app/quizzes/page.tsx +++ b/app/quizzes/page.tsx @@ -30,6 +30,7 @@ export default function MyQuizzes() { return } + // eslint-disable-next-line react-hooks/set-state-in-effect setQuizzes(getUserQuizzes()) setIsLoading(false) } diff --git a/app/schedule/page.tsx b/app/schedule/page.tsx index e563699..7627e39 100644 --- a/app/schedule/page.tsx +++ b/app/schedule/page.tsx @@ -20,6 +20,7 @@ export default function Schedule() { if (email && !isOnboardingComplete(email)) { router.push("/onboarding") } else { + // eslint-disable-next-line react-hooks/set-state-in-effect setIsLoading(false) } } diff --git a/lib/auth.ts b/lib/auth.ts index a8df71c..1b182aa 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -3,7 +3,7 @@ import NextAuth from "next-auth" import Google from "next-auth/providers/google" import GitHub from "next-auth/providers/github" -// @ts-ignore +// @ts-expect-error Types might be missing from the beta version of NextAuth export const { handlers, signIn, signOut, auth } = NextAuth({ providers: [ Google({ diff --git a/lib/security.test.ts b/lib/security.test.ts index bcf78eb..e2f1dba 100644 --- a/lib/security.test.ts +++ b/lib/security.test.ts @@ -63,7 +63,7 @@ describe('security lib', () => { // Passing something that isn't a string might trigger an error if not handled // although verifyData expects a string type. - // @ts-ignore + // @ts-expect-error Deliberately testing with incorrect type const isValid = verifyData(testData, { not: 'a string' }); assert.strictEqual(isValid, false); }); diff --git a/lib/setupTests.ts b/lib/setupTests.ts index 5c58739..b5ee5ee 100644 --- a/lib/setupTests.ts +++ b/lib/setupTests.ts @@ -32,12 +32,12 @@ export class MockStorage { export function setupTests() { if (typeof global.window === "undefined") { - // @ts-ignore + // @ts-expect-error Mocking global window object global.window = {}; } if (typeof global.localStorage === "undefined") { - // @ts-ignore + // @ts-expect-error Mocking global localStorage global.localStorage = new MockStorage(); } }