Drop the redundant @babel/core dev dependency#268
Merged
Conversation
`@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.
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.
Why
@babel/corewas a direct rootdevDependency(^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/coreresolves to7.29.7and stays in the lockfile (sonpm ciis still deterministic).npm run lint-js(dogfood) and all smoke tests pass.Note
npm installalso synced the lockfile's workspace versions (6.0.1→7.0.0-alpha.0) and the widenedeslintpeer, which the7.0.0-alpha.0release bump had left stale in the lockfile. Harmless here, but the release step should regenerate the lockfile afterchangeset versionso this doesn't drift every release — tracked as a separate follow-up.Makes Dependabot #265 obsolete.