Skip to content

chore(frontend): two eslint errors in the auth feature (MFAEnrollmentBanner, MFAPostAhaPrompt) #878

Description

@alex-dembele

Problem

npx eslint src/features/auth reports 2 errors on master, so the auth feature can't be held to a clean lint gate:

  • src/features/auth/MFAEnrollmentBanner.tsx:61: react-refresh/only-export-components. The file exports a non-component next to the component, which breaks Fast Refresh for it.
  • src/features/auth/MFAPostAhaPrompt.tsx:64: react-hooks/set-state-in-effect. setState is called synchronously inside an effect, which causes an extra render cascade.

Found while verifying #688; neither file was touched there.

Acceptance criteria

  1. npx eslint src/features/auth reports 0 problems.
  2. No rule is disabled or suppressed with a comment. The code is changed.
  3. Behaviour is unchanged: the existing tests for both components still pass unmodified (mfaEnrollmentBanner*.test.tsx, mfaPostAhaPrompt.test.tsx).
  4. Any non-component export moves to its own module and every import is updated.

Definition of Done

  • npx tsc -b --noEmit, npx eslint src/features/auth, npx vitest run, npm run build green, output pasted.
  • Live pass: the banner and the post-Aha prompt render and behave as before.
  • Progress comment in the CLAUDE.md format; PR with Closes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions