fix: remove unnecessary TypeScript peer dependency - #20
Merged
Conversation
The typescript package is only used for type-checking during development; the plugin's source never imports it, and the published lib/index.js is a self-contained esbuild bundle. Pinning peerDependencies.typescript to ^5.0.0 nonetheless has consumers on TypeScript 6 hitting an unmet-peer warning (textlint#19). textlint-scripts, itself a dependency of this plugin, already treats typescript as an optional peer with a permissive "*" range. This aligns the plugin with that same policy.
Contributor
Author
This was referenced Aug 10, 2026
Member
|
This package is a plugin for textlint and does not ship any TypeScript declarations, so TypeScript should be treated solely as a development dependency. |
3w36zj6
approved these changes
Aug 10, 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.
Summary
Widens
peerDependencies.typescriptfrom^5.0.0to*.Background
The
typescriptpackage is only used for type-checking during development — the plugin's source never imports it, and the publishedlib/index.jsis a self-contained esbuild bundle with no.d.tsoutput. Despite that, pinning the peer range to^5.0.0makes consumers on TypeScript 6 hit an unmet-peer warning, as reported in #19, and can end up being a reason a downstream project can't upgrade its own TypeScript version.textlint-scripts, itself a dependency of this plugin, already treatstypescriptas an optional peer with a permissive"*"range. This change aligns the plugin with that same policy.Test plan
bun run tscbun run ci(biome)bun run buildbun run test -- --runCloses #19