Skip to content

chore(dev-server-ui): remove unused eslint-plugin-react-hooks - #880

Draft
nieblara wants to merge 1 commit into
mainfrom
cursor/remove-react-hooks-eslint-plugin-1739
Draft

nieblara wants to merge 1 commit into
mainfrom
cursor/remove-react-hooks-eslint-plugin-1739

Conversation

@nieblara

@nieblara nieblara commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Dependabot PR #869 tried to update eslint-plugin-react-hooks from 4.6.2 to 7.1.1. That PR is closed.

Describe the solution you've provided

This change removes eslint-plugin-react-hooks from internal/dev_server/ui. ESLint does not load the plugin, so the package does nothing.

These facts show that the plugin is not used:

  • eslint.config.js does not import the plugin. It loads only @eslint/js, typescript-eslint, and eslint-plugin-react.
  • No file in the repository contains react-hooks, other than package.json and package-lock.json. No eslint-disable comment exists in the UI source.
  • npm explain shows that only the root package.json requires the plugin.

npm uninstall eslint-plugin-react-hooks made the change. I used npm 11.19.1 because CI uses Node lts/*, which is Node 24.22.0 with npm 11.19.1. The diff removes one line from package.json and one 13-line block from package-lock.json. npm 11.6.2 also changed peer and libc fields in other packages, so I did not use it.

The resolved ESLint rules did not change. I ran eslint --print-config for each of the 25 files that npm run lint checks, before and after the change. The two outputs are the same:

Before After
Files that ESLint checks 25 25
Rule entries for all files 2745 2745
Unique rule settings 128 128
react-hooks/ rules 0 0
Loaded plugins core, @typescript-eslint, react core, @typescript-eslint, react
SHA-256 of the rule output 75b7a32a…99ed0 75b7a32a…99ed0

I ran the CI steps on Node 24.22.0 and npm 11.19.1. npm ci, npm run lint, npm run prettier:write, npm test (5 of 5 tests pass), and npm run build all pass. After the build, git diff --exit-code found no changes, so the committed dist/ did not change.

Describe alternatives you've considered

Dependabot PR #869 updated the plugin to 7.1.1. That update changes nothing, because ESLint does not load the plugin. Another option is to turn on the plugin in eslint.config.js. That option adds new lint rules, so it needs a separate change.

Additional context

Another open change also edits package-lock.json. If that change merges first, this branch will be rebased on main and the lockfile will be generated again.

Open in Web Open in Cursor 

The ESLint configuration does not load this plugin, and no rule or
eslint-disable comment uses it. Dependabot PR #869 tried to update it
from 4.6.2 to 7.1.1. This change removes the package instead.

npm 11.19.1 generated the lockfile change. CI uses this version
through Node lts/*.

Co-authored-by: rniebla <rniebla@launchdarkly.com>
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