Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix types, CSS import in frontend #5257

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Fix types, CSS import in frontend #5257

wants to merge 4 commits into from

Conversation

jwhitlock
Copy link
Member

When attempting to fix PR #5248, I found several typescript errors, and continued to get style warnings. This PR fixes those errors, most of which are in test code.

  • Convert next.config.js to next.config.ts, pass type checking
  • Add missing object members to mocked API calls, re-arrange object members to match type definition order
  • Switch fxaFlowTracker.test.ts to use a number for the time parameter instead of a string, matching the code
  • Switch to importing as import "react-toastify/dist/ReactToastify.css", to avoid dart sass warnings. This has the same declarations but with some additional space, which caused the CSS hash to change.
  • Reformat touched files

How to test:

  • cd frontend
  • npx tsc --noEmit runs with no warnings or errors
  • npm run test runs with all tests passing

This applies the same styles, but adds some spaces in the combined CSS.

This rule:

  height:calc(var(--g)*1px)

Becomes this rule:

  height:calc(var(--g) * 1px)

That's the same CSS rule, but it does cause a hash change from
58e1c80c0e503be3.css to 1b1c275d4655b992.css.
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.

2 participants