Skip to content

Drop the redundant @babel/core dev dependency#268

Merged
ocean90 merged 1 commit into
masterfrom
chore/drop-babel-core-devdep
Jul 19, 2026
Merged

Drop the redundant @babel/core dev dependency#268
ocean90 merged 1 commit into
masterfrom
chore/drop-babel-core-devdep

Conversation

@ocean90

@ocean90 ocean90 commented Jul 19, 2026

Copy link
Copy Markdown
Member

Why

@babel/core was a direct root devDependency (^7), but it is a peer of both @wordpress/eslint-plugin (>=7) and its @babel/eslint-parser (^7.11.0) — and bundled by neither. So npm 7+ auto-installs it anyway; we don't need to pin it ourselves.

Keeping the direct entry only created a maintenance liability: Dependabot kept proposing @babel/core@8 (#265), which can never resolve because @babel/eslint-parser's peer caps it below 8. Removing the direct dep lets the version follow WordPress's peer ranges (stays on the latest 7.x) and drops that recurring false-positive.

Verified

  • npm install → no unmet-peer warnings; @babel/core resolves to 7.29.7 and stays in the lockfile (so npm ci is still deterministic).
  • npm run lint-js (dogfood) and all smoke tests pass.

Note

npm install also synced the lockfile's workspace versions (6.0.17.0.0-alpha.0) and the widened eslint peer, which the 7.0.0-alpha.0 release bump had left stale in the lockfile. Harmless here, but the release step should regenerate the lockfile after changeset version so this doesn't drift every release — tracked as a separate follow-up.

Makes Dependabot #265 obsolete.

`@babel/core` is a peer dependency of both `@wordpress/eslint-plugin` (`>=7`)
and its `@babel/eslint-parser` (`^7.11.0`), and is bundled by neither — so npm
auto-installs it (npm 7+). It resolves to the latest 7.x (capped below 8 by the
parser's peer range) and stays in the lockfile, so `npm ci` remains
deterministic and dogfooding still works.

Keeping it as a direct devDependency added nothing but a maintenance liability:
it made Dependabot repeatedly propose `@babel/core@8`, which can never resolve
because the parser peer caps it below 8 (PR #265). Removing the direct entry
lets the version follow WordPress's peer ranges and drops that noise.
@ocean90
ocean90 merged commit c61d285 into master Jul 19, 2026
6 checks passed
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