Skip to content

frontend: drop unused eslint-plugin-react-refres dev-dep - #4647

Open
thisconnect wants to merge 4 commits into
BitBoxSwiss:masterfrom
thisconnect:frontend-update-devdeps-III
Open

thisconnect wants to merge 4 commits into
BitBoxSwiss:masterfrom
thisconnect:frontend-update-devdeps-III

Conversation

@thisconnect

@thisconnect thisconnect commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

Replace eslint-plugin-react and eslint-plugin-react-hooks with
@eslint-react/eslint-plugin and move JSX formatting rules to
@stylistic/eslint-plugin.

Update rule references and inline suppressions, and address new
recommended lint rules by removing a redundant initial assignment
and preserving caught errors when throwing new errors.
Use the Vitest-specific jest-dom entry point in the shared test
setup and explicitly include its types in the TypeScript
configuration. Remove redundant jest-dom imports from individual
test files.

Regenerate npm licenses.
"name": "@jridgewell/sourcemap-codec",
"versions": [
"1.5.5"
"1.6.0"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reason this surfaces in our prod deps is react-select

% npm list @jridgewell/sourcemap-codec
bitboxapp@0.0.0 /app/frontends/web
├─┬ react-select@5.10.2
│ └─┬ @emotion/react@11.11.4
│   └─┬ @emotion/babel-plugin@11.11.0
│     └─┬ @babel/helper-module-imports@7.29.7
│       └─┬ @babel/traverse@7.29.10
│         └─┬ @babel/generator@7.29.8
│           └─┬ @jridgewell/gen-mapping@0.3.13
│             └── @jridgewell/sourcemap-codec@1.6.0 deduped
└─┬ vitest@5.1.1
  ├─┬ @vitest/mocker@5.1.1
  │ └─┬ @jridgewell/trace-mapping@0.3.31
  │   └── @jridgewell/sourcemap-codec@1.6.0 deduped
  └─┬ magic-string@1.4.5
    └── @jridgewell/sourcemap-codec@1.6.0

],
"license": "MIT",
"repository": "https://github.com/colinhacks/zod",
"licenseText": "MIT License\n\nCopyright (c) 2025 Colin McDonnell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this module was coming from @walletconnect/utils

% npm list zod
bitboxapp@0.0.0 /app/frontends/web
├─┬ @walletconnect/utils@2.21.7
│ └─┬ viem@2.31.0 overridden
│   └─┬ abitype@1.0.8
│     └── zod@3.25.76 deduped
└─┬ eslint-plugin-react-hooks@7.1.1
  ├─┬ zod-validation-error@4.0.2
  │ └── zod@3.25.76 deduped
  └── zod@3.25.76

"@types/react-dom": "^18.3.7",
"@vitejs/plugin-react": "^6.1.2",
"eslint": "^9.39.5",
"eslint-plugin-react": "^7.37.5",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found that this is not maintained anymore and others migrate to @eslint-react/eslint-plugin

jsx-eslint/eslint-plugin-react#3977 (comment)

TypeScript 6.0 deprecates the legacy Node module resolution
strategy and baseUrl. Switch to bundler resolution to align
with Vite and adjust the @/ alias to preserve existing import
paths without relying on baseUrl.

Import the flag-icons stylesheet explicitly to satisfy the
stricter side-effect import checks in TypeScript 6.0.
@thisconnect
thisconnect marked this pull request as ready for review November 27, 2026 09:52
@thisconnect
thisconnect requested a review from a team as a code owner November 27, 2026 09:52
@thisconnect

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The web frontend updates ESLint plugins, rules, and development dependencies. Test files remove local jest-dom imports, while the shared test setup and TypeScript configuration add the Vitest-specific jest-dom integration. The changes also update license metadata, preserve caught errors as pairing error causes, remove an initial value from the backup date declaration, and import flag-icons CSS directly.

Merge Risk: Minimal · up to ac40f · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0c47b876-dd32-4ce2-aca7-4740c960c2da
Commits

Reviewing files that changed from the base of the PR and between 4aa2a8f and ac40fb6.

Files ignored due to path filters: 1

  • frontends/web/package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 31

  • frontends/web/eslint.config.mjs
  • frontends/web/package.json
  • frontends/web/public/licenses-npm.json
  • frontends/web/src/components/alert/Alert.test.tsx
  • frontends/web/src/components/amount/amount.test.tsx
  • frontends/web/src/components/aopp/vasp.test.tsx
  • frontends/web/src/components/forms/button.test.tsx
  • frontends/web/src/components/forms/checkbox.test.tsx
  • frontends/web/src/components/forms/input-number.test.tsx
  • frontends/web/src/components/forms/radio.test.tsx
  • frontends/web/src/components/guide/entry.test.tsx
  • frontends/web/src/components/headerssync/headerssync.test.tsx
  • frontends/web/src/components/message/message.test.tsx
  • frontends/web/src/contexts/WCWeb3WalletProvider.tsx
  • frontends/web/src/hooks/api.ts
  • frontends/web/src/hooks/scrollable.ts
  • frontends/web/src/hooks/sdcard.ts
  • frontends/web/src/routes/account/addresses/addresses.test.tsx
  • frontends/web/src/routes/account/sign-message/sign-message.test.tsx
  • frontends/web/src/routes/account/summary/percentage-diff.test.tsx
  • frontends/web/src/routes/device/components/backup.tsx
  • frontends/web/src/routes/lightning/lightning.test.tsx
  • frontends/web/src/routes/lightning/receive/receive.test.tsx
  • frontends/web/src/routes/lightning/topup/topup.test.tsx
  • frontends/web/src/routes/market/components/markettab.test.tsx
  • frontends/web/src/routes/market/market.tsx
  • frontends/web/src/routes/market/swap/components/swap-service-selector.test.tsx
  • frontends/web/src/routes/market/swap/swap.test.tsx
  • frontends/web/src/utils/markup.test.tsx
  • frontends/web/tsconfig.json
  • frontends/web/vite.setup-tests.mjs
Files with no reviewable changes: 20

  • frontends/web/src/components/alert/Alert.test.tsx
  • frontends/web/src/components/amount/amount.test.tsx
  • frontends/web/src/components/aopp/vasp.test.tsx
  • frontends/web/src/components/forms/button.test.tsx
  • frontends/web/src/components/forms/checkbox.test.tsx
  • frontends/web/src/components/forms/input-number.test.tsx
  • frontends/web/src/components/forms/radio.test.tsx
  • frontends/web/src/components/guide/entry.test.tsx
  • frontends/web/src/components/headerssync/headerssync.test.tsx
  • frontends/web/src/components/message/message.test.tsx
  • frontends/web/src/routes/account/addresses/addresses.test.tsx
  • frontends/web/src/routes/account/sign-message/sign-message.test.tsx
  • frontends/web/src/routes/account/summary/percentage-diff.test.tsx
  • frontends/web/src/routes/lightning/lightning.test.tsx
  • frontends/web/src/routes/lightning/receive/receive.test.tsx
  • frontends/web/src/routes/lightning/topup/topup.test.tsx
  • frontends/web/src/routes/market/components/markettab.test.tsx
  • frontends/web/src/routes/market/swap/components/swap-service-selector.test.tsx
  • frontends/web/src/routes/market/swap/swap.test.tsx
  • frontends/web/src/utils/markup.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

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