From cc2be30f53cbc4585338d06252c352075b8cc226 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 25 Feb 2025 16:25:06 +0530 Subject: [PATCH] Scope --- .../accounts/components/utils/second-factor-choice.ts | 6 +++--- web/packages/accounts/eslint.config.mjs | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/packages/accounts/components/utils/second-factor-choice.ts b/web/packages/accounts/components/utils/second-factor-choice.ts index 6694568b48..d31fc9a6a5 100644 --- a/web/packages/accounts/components/utils/second-factor-choice.ts +++ b/web/packages/accounts/components/utils/second-factor-choice.ts @@ -51,10 +51,10 @@ export const useSecondFactorChoiceIfNeeded = () => { // ID will be in a V2 attribute during a transient migration period. // // Note the use of || instead of ?? since _twoFactorSessionIDV1 will - // be an empty string, not undefined, if it is unset. We might need - // to add a `xxx-eslint-disable - // @typescript-eslint/prefer-nullish-coalescing` here too later. + // be an empty string, not undefined, if it is unset. This is + // intentional, so disable the eslint rule too. const _twoFactorSessionID = + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing _twoFactorSessionIDV1 || _twoFactorSessionIDV2; let passkeySessionID: string | undefined; diff --git a/web/packages/accounts/eslint.config.mjs b/web/packages/accounts/eslint.config.mjs index 447b0f36d4..d721f5eb56 100644 --- a/web/packages/accounts/eslint.config.mjs +++ b/web/packages/accounts/eslint.config.mjs @@ -8,7 +8,6 @@ export default [ * "This rule requires the `strictNullChecks` compiler option to be * turned on to function correctly" */ - "@typescript-eslint/prefer-nullish-coalescing": "off", "@typescript-eslint/no-unnecessary-condition": "off", "@typescript-eslint/no-unsafe-assignment": "off", "@typescript-eslint/no-explicit-any": "off",