π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Apply lints
Manav Rathi3d3ee1bb6f81
diff --git a/web/packages/accounts/components/two-factor/VerifyForm.tsx b/web/packages/accounts/components/two-factor/VerifyForm.tsxindex 765b8aa235..59332055d8 100644--- a/web/packages/accounts/components/two-factor/VerifyForm.tsx+++ b/web/packages/accounts/components/two-factor/VerifyForm.tsx@@ -20,16 +20,14 @@ interface Props {export type VerifyTwoFactorCallback = (otp: string,- markSuccessful: () => Promise<void>,+ markSuccessful: () => void,) => Promise<void>;export default function VerifyTwoFactor(props: Props) {const [waiting, setWaiting] = useState(false);const [shouldAutoFocus, setShouldAutoFocus] = useState(true);- const markSuccessful = async () => {- setWaiting(false);- };+ const markSuccessful = () => setWaiting(false);const submitForm = async ({ otp }: formValues,diff --git a/web/packages/accounts/eslint.config.mjs b/web/packages/accounts/eslint.config.mjsindex 08d3b6bc4d..43c778a7b3 100644--- a/web/packages/accounts/eslint.config.mjs+++ b/web/packages/accounts/eslint.config.mjs@@ -22,10 +22,6 @@ export default ["@typescript-eslint/no-empty-function": "off","@typescript-eslint/no-unnecessary-template-expression": "off","@typescript-eslint/consistent-indexed-object-style": "off",- "@typescript-eslint/prefer-promise-reject-errors": "off",- "@typescript-eslint/no-useless-constructor": "off",- "@typescript-eslint/dot-notation": "off",- "@typescript-eslint/require-await": "off","@typescript-eslint/no-var-requires": "off","@typescript-eslint/prefer-optional-chain": "off","@typescript-eslint/ban-types": "off",diff --git a/web/packages/accounts/pages/two-factor/setup.tsx b/web/packages/accounts/pages/two-factor/setup.tsxindex 289c9f95b6..c01ac811c8 100644--- a/web/packages/accounts/pages/two-factor/setup.tsx+++ b/web/packages/accounts/pages/two-factor/setup.tsx@@ -52,7 +52,7 @@ const Page: React.FC<PageProps> = () => {twoFactorSecret!.secretCode,);await enableTwoFactor(otp, recoveryEncryptedTwoFactorSecret);- await markSuccessful();+ markSuccessful();await setLSUser({...getData(LS_KEYS.USER),isTwoFactorEnabled: true,diff --git a/web/packages/accounts/pages/two-factor/verify.tsx b/web/packages/accounts/pages/two-factor/verify.tsxindex 0e609be0d9..9ee835172d 100644--- a/web/packages/accounts/pages/two-factor/verify.tsx+++ b/web/packages/accounts/pages/two-factor/verify.tsx@@ -33,20 +33,17 @@ const Page: React.FC<PageProps> = ({ appContext }) => {const router = useRouter();useEffect(() => {- const main = async () => {- const user: User = getData(LS_KEYS.USER);- if (!user?.email || !user.twoFactorSessionID) {- void router.push("/");- } else if (- !user.isTwoFactorEnabled &&- (user.encryptedToken || user.token)- ) {- void router.push(PAGES.CREDENTIALS);- } else {- setSessionID(user.twoFactorSessionID);- }- };- void main();+ const user: User = getData(LS_KEYS.USER);+ if (!user?.email || !user.twoFactorSessionID) {+ void router.push("/");+ } else if (+ !user.isTwoFactorEnabled &&+ (user.encryptedToken || user.token)+ ) {+ void router.push(PAGES.CREDENTIALS);+ } else {+ setSessionID(user.twoFactorSessionID);+ }}, []);const onSubmit: VerifyTwoFactorCallback = async (otp) => {