Skip to content

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Sep 18, 2025

No description provided.

@github-actions github-actions bot added the A-formatter Area - Formatter label Sep 18, 2025
Copy link
Member Author

Dunqing commented Sep 18, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 18, 2025

CodSpeed Instrumentation Performance Report

Merging #13892 will not alter performance

Comparing 09-18-feat_formatter_implement_formatting_for_tsasexpression_and_tssatisfiesexpression (0f15ed3) with main (0800c6b)

Summary

✅ 37 untouched

@graphite-app graphite-app bot changed the base branch from 09-17-feat_formatter_keep_parse_options_consistent_for_all_formatter_usages to graphite-base/13892 September 18, 2025 23:18
@graphite-app graphite-app bot force-pushed the graphite-base/13892 branch from 8b7f7c3 to 2cead8b Compare September 18, 2025 23:26
@graphite-app graphite-app bot force-pushed the 09-18-feat_formatter_implement_formatting_for_tsasexpression_and_tssatisfiesexpression branch from e4ae613 to ed989d2 Compare September 18, 2025 23:26
@graphite-app graphite-app bot changed the base branch from graphite-base/13892 to main September 18, 2025 23:26
@graphite-app graphite-app bot force-pushed the 09-18-feat_formatter_implement_formatting_for_tsasexpression_and_tssatisfiesexpression branch from ed989d2 to 64c0546 Compare September 18, 2025 23:26
@Dunqing Dunqing force-pushed the 09-18-feat_formatter_implement_formatting_for_tsasexpression_and_tssatisfiesexpression branch from 64c0546 to e4ae613 Compare September 19, 2025 02:40
@Dunqing Dunqing force-pushed the 09-18-feat_formatter_implement_formatting_for_tsasexpression_and_tssatisfiesexpression branch from e4ae613 to 622db8d Compare September 19, 2025 09:39
@Dunqing Dunqing marked this pull request as ready for review September 19, 2025 13:49
Copilot AI review requested due to automatic review settings September 19, 2025 13:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TSAsExpression and TSSatisfiesExpression formatting 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 leaysgur self-assigned this Sep 22, 2025
@leaysgur leaysgur added the 0-merge Merge with Graphite Merge Queue label Sep 22, 2025
Copy link
Member

leaysgur commented Sep 22, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 09-18-feat_formatter_implement_formatting_for_tsasexpression_and_tssatisfiesexpression branch from 622db8d to 0f15ed3 Compare September 22, 2025 04:07
@graphite-app graphite-app bot merged commit 0f15ed3 into main Sep 22, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 09-18-feat_formatter_implement_formatting_for_tsasexpression_and_tssatisfiesexpression branch September 22, 2025 04:12
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 22, 2025
@Boshen Boshen mentioned this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-formatter Area - Formatter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants