From 6533883eaac04721f2f60f77f1e2b59d87bf27a4 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 20 Nov 2024 09:43:50 +0530 Subject: [PATCH] Prune --- web/packages/accounts/eslint.config.mjs | 6 ------ web/packages/accounts/pages/two-factor/recover.tsx | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/web/packages/accounts/eslint.config.mjs b/web/packages/accounts/eslint.config.mjs index b23b6c9dd4..1dee2987bf 100644 --- a/web/packages/accounts/eslint.config.mjs +++ b/web/packages/accounts/eslint.config.mjs @@ -17,12 +17,6 @@ export default [ "@typescript-eslint/no-unsafe-argument": "off", "@typescript-eslint/no-unsafe-call": "off", /** TODO: Disabled as we migrate, try to prune these again */ - "@typescript-eslint/no-unnecessary-type-assertion": "off", - "@typescript-eslint/array-type": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/prefer-optional-chain": "off", - - "react-hooks/exhaustive-deps": "off", "react-hooks/rules-of-hooks": "off", "react-refresh/only-export-components": "off", diff --git a/web/packages/accounts/pages/two-factor/recover.tsx b/web/packages/accounts/pages/two-factor/recover.tsx index ece422aca9..08fd7a2d8f 100644 --- a/web/packages/accounts/pages/two-factor/recover.tsx +++ b/web/packages/accounts/pages/two-factor/recover.tsx @@ -57,7 +57,7 @@ const Page: React.FC = ({ appContext, twoFactorType }) => { useEffect(() => { const user = getData(LS_KEYS.USER); const sid = user.passkeySessionID || user.twoFactorSessionID; - if (!user || !user.email || !sid) { + if (!user?.email || !sid) { void router.push("/"); } else if ( !(user.isTwoFactorEnabled || user.isTwoFactorEnabledPasskey) &&