feat(formatter): implement formatting for TSAsExpression and TSSatisfiesExpression#13892
Merged
graphite-app[bot] merged 1 commit intomainfrom Sep 22, 2025
Conversation
Member
Author
This was referenced Sep 18, 2025
CodSpeed Instrumentation Performance ReportMerging #13892 will not alter performanceComparing Summary
|
8b7f7c3 to
2cead8b
Compare
e4ae613 to
ed989d2
Compare
ed989d2 to
64c0546
Compare
64c0546 to
e4ae613
Compare
e4ae613 to
622db8d
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements improved formatting for TypeScript's as and satisfies expressions by creating a dedicated module with context-aware formatting logic. The changes enhance the formatter's ability to handle these expressions in different syntactic contexts, particularly when they appear as callees or object references.
- Refactored
TSAsExpressionandTSSatisfiesExpressionformatting into a dedicated module - Added context-aware formatting that applies special indentation for callee/object contexts
- Improved test compatibility, increasing TypeScript compatibility from 70.51% to 70.86%
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/prettier_conformance/snapshots/prettier.ts.snap.md | Updates test compatibility metrics and removes two failing test cases |
| crates/oxc_formatter/src/write/mod.rs | Adds new module import and removes old inline implementations |
| crates/oxc_formatter/src/write/as_or_satisfies_expression.rs | New module with enhanced formatting logic for as/satisfies expressions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
leaysgur
approved these changes
Sep 22, 2025
Member
Merge activity
|
…isfiesExpression` (#13892)
622db8d to
0f15ed3
Compare
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.

No description provided.