Skip to content

Comments

fix(formatter): correct printing comments around decorators#14076

Merged
graphite-app[bot] merged 1 commit intomainfrom
09-24-fix_formatter_correct_printing_comments_around_decorators
Sep 29, 2025
Merged

fix(formatter): correct printing comments around decorators#14076
graphite-app[bot] merged 1 commit intomainfrom
09-24-fix_formatter_correct_printing_comments_around_decorators

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Sep 24, 2025

No description provided.

@github-actions github-actions bot added A-formatter Area - Formatter C-bug Category - Bug labels Sep 24, 2025
Copy link
Member Author

Dunqing commented Sep 24, 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 24, 2025

CodSpeed Instrumentation Performance Report

Merging #14076 will not alter performance

Comparing 09-24-fix_formatter_correct_printing_comments_around_decorators (e299ab0) with main (8ca1adf)

Summary

✅ 33 untouched
⏩ 4 skipped1

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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 fixes the formatting of comments around decorators in the TypeScript formatter to improve Prettier conformance.

  • Improved comment formatting logic for decorators and TypeScript function types
  • Enhanced handling of trailing comments after decorators
  • Fixed call argument formatting when used with decorators

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
prettier.ts.snap.md Updated test compatibility scores showing improvements from fixing decorator comment formatting
write/mod.rs Added trailing comment handling for TypeScript function and constructor types
write/decorators.rs Enhanced decorator formatting with new trailing comment handling function
write/class.rs Simplified accessibility handling and removed specific comment logic for accessor properties
write/call_arguments.rs Modified function composition argument detection to exclude decorator contexts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Dunqing Dunqing force-pushed the 09-24-fix_formatter_correct_printing_comments_around_decorators branch from 9241980 to effe2cd Compare September 26, 2025 16:42
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Sep 29, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 29, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 09-24-fix_formatter_correct_printing_comments_around_decorators branch from effe2cd to d857864 Compare September 29, 2025 09:38
@graphite-app graphite-app bot force-pushed the 09-24-fix_formatter_correct_printing_comments_around_decorators branch from d857864 to e299ab0 Compare September 29, 2025 09:43
@graphite-app graphite-app bot merged commit e299ab0 into main Sep 29, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 09-24-fix_formatter_correct_printing_comments_around_decorators branch September 29, 2025 09:49
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 29, 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-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant