From 5f7e89c330054b604feee1c6be560657da360131 Mon Sep 17 00:00:00 2001 From: Stavros Date: Fri, 31 Oct 2025 16:13:51 +0200 Subject: [PATCH] feat: enable eslint in ci --- .github/workflows/ci.yml | 4 ++-- frontend/src/lib/utils.ts | 2 +- frontend/src/pages/continue-page.tsx | 9 ++++++++- frontend/src/pages/login-page.tsx | 12 +++++++++++- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2b5f5e..936fe5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,10 @@ jobs: run: | echo testing > internal/assets/version - - name: Build frontend + - name: Lint frontend run: | cd frontend - bun run build + bun run lint - name: Copy frontend run: | diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index 5172a7c..a451ae6 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -9,7 +9,7 @@ export const isValidUrl = (url: string) => { try { new URL(url); return true; - } catch (e) { + } catch { return false; } }; diff --git a/frontend/src/pages/continue-page.tsx b/frontend/src/pages/continue-page.tsx index dd03a4c..b19205f 100644 --- a/frontend/src/pages/continue-page.tsx +++ b/frontend/src/pages/continue-page.tsx @@ -76,7 +76,14 @@ export const ContinuePage = () => { clearTimeout(auto); clearTimeout(reveal); }; - }, []); + }, [ + handleRedirect, + isAllowedRedirectProto, + isHttpsDowngrade, + isLoggedIn, + isTrustedRedirectUri, + isValidRedirectUri, + ]); if (!isLoggedIn) { return ( diff --git a/frontend/src/pages/login-page.tsx b/frontend/src/pages/login-page.tsx index 2f3bc99..b39c580 100644 --- a/frontend/src/pages/login-page.tsx +++ b/frontend/src/pages/login-page.tsx @@ -119,6 +119,8 @@ export const LoginPage = () => { !isLoggedIn && redirectUri ) { + // Not sure of a better way to do this + // eslint-disable-next-line react-hooks/set-state-in-effect setOauthAutoRedirectHandover(true); oauthMutation.mutate(oauthAutoRedirect); redirectButtonTimer.current = window.setTimeout(() => { @@ -126,7 +128,15 @@ export const LoginPage = () => { }, 5000); } } - }, []); + }, [ + isMounted, + oauthProviders.length, + providers, + isLoggedIn, + redirectUri, + oauthAutoRedirect, + oauthMutation, + ]); useEffect( () => () => {