Repository navigation
fix(eslint-plugin-cds): drop cds-common, cds-mobile and cds-web peer dependencies - #915
Merged
cb-ekuersch merged 1 commit intoOct 26, 2026
Conversation
…dependencies The plugin never imports @coinbase/cds-common, @coinbase/cds-mobile or @coinbase/cds-web. Its rules only compare import sources in the linted code against those package names, and the published lib/ requires only @typescript-eslint/utils, eslint-plugin-jsx-a11y and eslint-plugin-react-native-a11y. Because the peers were required, installers that auto-install peers (pnpm, Bun, npm 7+) pulled @coinbase/cds-mobile, and with it React Native, into web-only projects that only wanted the lint rules. Remove the three peers and keep them as devDependencies for the workspace. Add a patch version plan for eslint-plugin-cds.
Collaborator
✅ Heimdall Review Status
✅
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
✅
1/1
|
Denominator calculation
|
IvanAfoninCoinbase
marked this pull request as ready for review
October 26, 2026 16:06
cb-ekuersch
approved these changes
Oct 26, 2026
adrienzheng-cb
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed? Why?
@coinbase/eslint-plugin-cdsdeclares@coinbase/cds-common,@coinbase/cds-mobileand@coinbase/cds-webas requiredpeerDependencies, but it never imports them. The rules only compare import sources in the code being linted against those package names (for example the package list insrc/rules/no-v7-imports.tsand theallowedPackageslists in the a11y rules).Installers that auto-install required peers (pnpm, Bun, npm 7+) therefore install
@coinbase/cds-mobilefor every consumer of the lint plugin, and with itreact-nativeand the rest of its peer tree. Web-only repos that only want the lint rules end up with React Native innode_modules; infrontend/coinbase-wwwthat is roughly 10k+ extra files.This PR:
peerDependenciesinpackages/eslint-plugin-cds/package.json. They stay indevDependencies, so the workspace setup and theyarn.config.cjspeer/dev sync are unchanged;yarn.lockto match (threepeerDependencieslines removed; no resolutions change);.nx/version-plans/eslint-plugin-cds-drop-cds-peers.md.Root cause (required for bugfixes)
The peers were declared as required, with no
peerDependenciesMetaentry, although the plugin has no runtime or type dependency on them.Evidence:
grep -rnE "(from|require\(|import\()\s*['\"]@coinbase/cds-(common|mobile|web)" packages/eslint-plugin-cds/srcfinds nothing (exit 1). The names appear only as string literals.@coinbase/eslint-plugin-cds@3.5.0lib/requires only@typescript-eslint/utils,eslint-plugin-jsx-a11yandeslint-plugin-react-native-a11y.npm view @coinbase/eslint-plugin-cds@3.5.0 peerDependencieslists@coinbase/cds-common,@coinbase/cds-mobileand@coinbase/cds-webat^9.8.0, with nopeerDependenciesMeta.RuleTestercode strings, which are parsed and never resolved.Separate from this PR:
lib/requires@typescript-eslint/utilsat runtime, but the package lists it only indevDependencies. I left it alone to keep this change narrow.UI changes
None. This only changes package metadata.
Testing
How has it been tested?
I did not run a local install or build for this metadata-only change. Instead I checked the source with grep, inspected the published 3.5.0 tarball (
npm pack), and compared it with the registry metadata. CI coversyarn install --immutableand the eslint-plugin-cds tests.Screen recording
Real terminal session (Python
pty, replayed in xterm.js and captured with PlaywrightrecordVideo, 1600×1000, about 31 s) of commit546d0b42on macOS. It shows the branch diff (peers before and after), the version plan, a grep showing thatsrc/never imports the removed peers, the published 3.5.0peerDependenciesfromnpm view, the@coinbase/cds-mobilepeers that get pulled in as a result, and every externalrequire()in the publishedlib/. It does not show an actual pnpm or Bun install.Recording: attached below by the author (GitHub CLI uploads need write access to this repository).
Testing instructions
Release and follow-ups
eslint-plugin-cds). The new version is published once a maintainer runsyarn release(here or in a later batch) and the bump lands onmaster.cds-internal(@cbhq/eslint-plugin-cds).frontend/nx-toolspackages/eslint-plugindepends on@cbhq/eslint-plugin-cds^0.0.3. It will need to be bumped to the released fixed version before consumers such asfrontend/coinbase-wwwstop installing React Native.Illustrations/Icons Checklist
Required if this PR changes files under
packages/illustrations/**orpackages/icons/**Not applicable.
Change management
type=routine
risk=low
impact=sev5
automerge=false