Skip to content

Make oxlint and oxfmt optional peer dependencies - #3

Merged
lukasz-zimnoch merged 1 commit into
mainfrom
oxfmt-optional-peer
Nov 9, 2026
Merged

lukasz-zimnoch merged 1 commit into
mainfrom
oxfmt-optional-peer

Conversation

@nkuba

@nkuba nkuba commented Nov 9, 2026

Copy link
Copy Markdown
Member

Each export configures one tool, and a repository may use only one of them. thesis/curation lints with oxlint and formats with bun fmt, but oxfmt was a required peer, so it got installed there unused.

With both peers optional, a repository installs only the tools it adds. pnpm still warns when an added tool is outside the peer range.

Tested with a packed tarball of this branch. pnpm 11 installs neither tool when none is added, and it warns for oxlint@1.80.0.

Each export configures one tool, and a repository may use only one of them,
for example oxlint with bun fmt. Both tools were required peers, so the
package manager installed both everywhere. As optional peers, a repository
installs only the tools it adds. pnpm still warns when an added tool is
outside the peer range.
@nkuba nkuba self-assigned this Nov 9, 2026
@lukasz-zimnoch
lukasz-zimnoch merged commit 828e68d into main Nov 9, 2026
5 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.

2 participants