Repository navigation
feat(prettier): switch to the new formatter architecture - #944
Merged
Merged
Conversation
9 of 10 tasks
This was referenced 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.
Make
@tsrx/prettier-pluginuse the new formatter architecture: ordinary JavaScript, TypeScript, and JSX are printed by Prettier, with custom handling for TSRX-specific syntax. Existing imports and Prettier configuration now resolve to this implementation under the same public package name.Follows #943's preparatory folder move.
packages/tsrx-prettier-plugintopackages/prettier-pluginand deletepackages/old-prettier-plugin. Remove the old test project and typecheck path, and rename the new projects and maintenance commands to their final names.@tsrx/prettier-plugin, current version0.4.12, public publishing, and author. Remove the temporary private package identity.CHANGELOG.mdbyte-for-byte, replacing the temporary package's changelog.@tsrx/prettier-pluginto0.5.0.Validation:
pnpm test: 9,010 passed, 77 skipped, across 129 test files.pnpm format:check: passes.pnpm changeset:check, frozen offline install, andgit diff --check: pass.@tsrx/prettier-pluginto the new implementation.pnpm typecheckpasses all package checks, then fails in the website on the existing Vite/RolldownMinimalPluginContext/environmenttype conflict between Vite installations using different@types/nodeversions. These diagnostics also reproduce on the unchanged pre-switch branch; no new diagnostic was introduced by the switch.Note
Medium Risk
Replacing the published formatter changes default formatting for all TSRX consumers and may churn CI or editor workflows; scope is mostly packaging and docs, not runtime compiler behavior.
Overview
Ships the Prettier-backed formatter as the public
@tsrx/prettier-pluginpackage by promotingpackages/prettier-plugin(formerly the privatetsrx-prettier-pluginwork) and removing the legacypackages/old-prettier-pluginimplementation. Workspace wiring, roottypecheck, Vitest projects (prettier-plugin/prettier-plugin-3.6), andpnpm-lock.yamlnow point at the new package path while keeping the same npm name, version lineage (0.4.12), and publish metadata.Release notes are reorganized: a single minor changeset documents the architecture switch (Prettier’s JS/TS printer + TSRX-specific printing, peer
prettier >=3.6.0, expected output diffs). Dozens of mixed changesets drop redundant@tsrx/prettier-pluginbullets so formatter behavior is described as parser/core comment attachment where that’s what changed; several formatter-only changesets are deleted.Repo fixtures and docs are updated to match the new output—especially parentheses around multiline assigned
<style>blocks in scoped-style tests—and README/maintenance commands use@tsrx/prettier-plugin/prettier-pluginproject names instead oftsrx-prettier-plugin/old-prettier-plugin.Reviewed by Cursor Bugbot for commit 846d260. Bugbot is set up for automated code reviews on this repo. Configure here.