Skip to content

Upgrade React to 18, react-router to 7, stylelint to 17#1307

Merged
cybele-ripple merged 52 commits intomainfrom
react-router-stylelint-scss-updates
Apr 22, 2026
Merged

Upgrade React to 18, react-router to 7, stylelint to 17#1307
cybele-ripple merged 52 commits intomainfrom
react-router-stylelint-scss-updates

Conversation

@cybele-ripple
Copy link
Copy Markdown
Contributor

@cybele-ripple cybele-ripple commented Apr 1, 2026

This PR covers updates to react-router and stylelint-scss from tickets DGE-5422 and DGE-4784 to update react-router to 7.9.5 and stylelint-scss to 6.12.1, respectively.. The changes to other places in the code base outside of these two packages is due to peer dependencies and removing deprecated testing libraries.

This PR also addresses this issue

Comment thread package-lock.json Outdated
Comment thread package.json
Comment thread package.json
@kuan121
Copy link
Copy Markdown
Contributor

kuan121 commented Apr 2, 2026

A dependabot PR #1186 to upgrade stylelint-prettier from 4.1.0 to 5.0.3. I saw that stylelint-prettier upgrade is handled by this PR as well.

kuan121 and others added 11 commits April 10, 2026 16:16
# Conflicts:
#	src/containers/Accounts/AMM/AMMAccounts/AMMAccountHeader/test/AMMAccountHeader.test.tsx
- Add PropsWithChildren to React 18 FC components (TooltipProvider,
  StreamsProvider, VHSValidatorsProvider, SelectedValidatorProvider)
- Cast Trans i18next interpolation objects to any in TrustSet/Description
  and Offer meta renderer to satisfy React 18's stricter children typing
- Merge duplicate react-router imports in AccountsRouter
- Remove obsolete V7_FUTURE_ROUTER_FLAGS reference (react-router v7
  makes this opt-in unnecessary)
- Migrate useCursorPaginatedQuery test from deprecated
  @testing-library/react-hooks to @testing-library/react
- Fix package.json prettier formatting
The previous lock file had 90 packages with resolved URLs pointing to
artifactory.ops.ripple.com (Ripple's internal Artifactory), which CI
runners cannot reach. This caused all four CI jobs (lint, test, build,
typescript-check) to fail at the Install Dependencies step.

Regenerated by running npm install --registry=https://registry.npmjs.org/
after clearing node_modules and the existing lock.
Comment thread package.json
Comment thread .stylelintrc.js
Comment thread src/containers/Transactions/DetailTab/Meta/Offer.tsx
Comment thread src/containers/App/test/App.test.jsx
Comment thread src/containers/App/index.tsx
Comment thread src/containers/Accounts/AccountAsset/test/AccountAsset.test.tsx
@pdp2121
Copy link
Copy Markdown
Collaborator

pdp2121 commented Apr 20, 2026

Can you also update stylelint-config-recommended-scss as well (#1243)? This will close all package update tickets this quarter for Explorer. Thank you!

@cybele-ripple
Copy link
Copy Markdown
Contributor Author

Since this is a very comprehensive update, I have a thorough manual testing plan:

Core routes

  • / — Ledgers
  • /ledgers/94000000 — Ledger detail (by sequence)
  • /ledgers/ — Ledger detail (by hash)
  • /transactions/ — Transaction detail
  • /amendments — Amendments list
  • /amendment/ — Amendment detail
  • /tokens — Tokens list
  • /token/USD.rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B — Token (IOU) page
  • /search/ — Search result
  • /this-does-not-exist — 404 / NoMatch renders (not blank)

Network section

  • /network/nodes
  • /network/upgrade-status
  • /network/validators
  • /network/validators/uptime
  • /network/validators/voting

Validator detail tabs

  • /validators/<master_key>
  • /validators/<master_key>/details
  • /validators/<master_key>/history
  • /validators/<master_key>/voting

Account tabs

  • /accounts/ (including all tabs)

Transaction detail tabs

  • /transactions//simple
  • /transactions//detailed
  • /transactions//raw

AMM pool tabs

  • /amm/ (including all tabs)

kuan121
kuan121 previously approved these changes Apr 21, 2026
@cybele-ripple cybele-ripple changed the title update react-router and stylelint-scss Upgrade React to 18, react-router to 7, stylelint to 17 Apr 21, 2026
The previous commit (React 17→18) downgraded the stylelint stack to v16
because stylelint-config-idiomatic-order@10 pins stylelint-order ^6,
which caps stylelint at <17. Pin stylelint-order to ^8.1.1 via an npm
override (restoring the pattern from c889aaa) so the rest of the stack
can stay on v17.

- stylelint ^16.26.1 → ^17.8.0
- stylelint-config-recommended-scss ^14.1.0 → ^17.0.0
- stylelint-config-standard ^36.0.1 → ^40.0.0
- stylelint-order ^6.0.4 → ^8.1.1 (via override)
- stylelint-scss ^6.12.1 → ^7.0.0
@cybele-ripple
Copy link
Copy Markdown
Contributor Author

Can you also update stylelint-config-recommended-scss as well (#1243)? This will close all package update tickets this quarter for Explorer. Thank you!

This update is now covered with this commit

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.

4 participants