Skip to content

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Sep 17, 2025

The decorators of class expressions should be printed on the class expression itself; otherwise, the parentheses wouldn't wrap the decorators, which would cause a syntax error.

Input:

export default (@dec class {}) {};

Output before:

export default @dec (
  class {}
) { }

Output after:

export default (@dec class {}) {}

Copy link
Member Author

Dunqing commented Sep 17, 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.

@Dunqing Dunqing marked this pull request as ready for review September 17, 2025 06:40
@leaysgur leaysgur self-assigned this Sep 17, 2025
@leaysgur leaysgur added the 0-merge Merge with Graphite Merge Queue label Sep 17, 2025
Copy link
Member

leaysgur commented Sep 17, 2025

Merge activity

  • Sep 17, 6:58 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 17, 7:37 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 17, 9:43 AM UTC: Boshen added this pull request to the Graphite merge queue.
  • Sep 17, 9:53 AM UTC: Merged by the Graphite merge queue.

@Boshen Boshen added 0-merge Merge with Graphite Merge Queue and removed 0-merge Merge with Graphite Merge Queue labels Sep 17, 2025
@graphite-app graphite-app bot force-pushed the 09-17-fix_formatter_missing_parenthesis_for_tsasexpression branch from 950eeb5 to 3cf1a41 Compare September 17, 2025 09:37
@graphite-app graphite-app bot force-pushed the 09-17-fix_formatter_handle_decorators_correctly_for_class_expressions_in_export branch from 2ff5804 to d0c5b06 Compare September 17, 2025 09:37
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 17, 2025

CodSpeed Instrumentation Performance Report

Merging #13845 will not alter performance

Comparing 09-17-fix_formatter_handle_decorators_correctly_for_class_expressions_in_export (5c3645b) with main (3cf1a41)

Summary

✅ 37 untouched

@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 17, 2025
Base automatically changed from 09-17-fix_formatter_missing_parenthesis_for_tsasexpression to main September 17, 2025 09:46
…export (#13845)

The decorators of class expressions should be printed on the class expression itself; otherwise, the parentheses wouldn't wrap the decorators, which would cause a syntax error.

Input:
```ts
export default (@dec class {}) {};
```
Output before:
```ts
export default @dec (
  class {}
) { }
```
Output after:
```ts
export default (@dec class {}) {}
@graphite-app graphite-app bot force-pushed the 09-17-fix_formatter_handle_decorators_correctly_for_class_expressions_in_export branch from d0c5b06 to 5c3645b Compare September 17, 2025 09:46
@graphite-app graphite-app bot merged commit 5c3645b into main Sep 17, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 09-17-fix_formatter_handle_decorators_correctly_for_class_expressions_in_export branch September 17, 2025 09:53
This was referenced Sep 19, 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.

4 participants