Skip to content

IS-10847 Replace useContext with use hook in HaapiStepperFormContext#148

Draft
aleixsuau wants to merge 1 commit intointegration/IS-5161/login-web-appfrom
feature/IS-10847/use-for-form-context
Draft

IS-10847 Replace useContext with use hook in HaapiStepperFormContext#148
aleixsuau wants to merge 1 commit intointegration/IS-5161/login-web-appfrom
feature/IS-10847/use-for-form-context

Conversation

@aleixsuau
Copy link
Copy Markdown

Jira: https://curity.atlassian.net/browse/IS-10847

Summary

HaapiStepperFormContext.ts was the last useContext call in the LWA. Swapped to use() to align with the codebase standard (@eslint-react/no-use-context, already enforced everywhere else — see HaapiStepperHook.ts). The two eslint-disable comments that were guarding the holdout are gone with it.

Semantically identical — use(Context) reads context the same way as useContext(Context) and the explicit null-guard still works.

Addresses the "Refactor useContext to use" item from the IS-10847 checklist.

Test plan

  • npm run lint (changed file)
  • npx prettier --check (changed file)
  • npx vitest run src/haapi-stepper/feature/actions/form — 23/23 passing
  • npx tsc -b — clean

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant