Skip to content

fix(formatter): do not skip cast comment lookup - #26216

Merged
graphite-app[bot] merged 1 commit into
mainfrom
09-01-fix_formatter_do_not_skip_cast_comment_lookup
Sep 1, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
09-01-fix_formatter_do_not_skip_cast_comment_lookup

Conversation

@leaysgur

@leaysgur leaysgur commented Sep 1, 2026

Copy link
Copy Markdown
Member

Fixes #26202


The trigger for this issue is the presence of a suppressed typecast.

// oxfmt-ignore
const cast = /** c */ (x)

Because a comment had already been printed in a subsequent typecast check without going through the casting mechanism, it failed to find its own cast comment.

@github-actions github-actions Bot added the A-formatter Area - Formatter label Sep 1, 2026

leaysgur commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

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 changes, fast-track this PR to the front of the merge queue

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

codspeed Bot commented Sep 1, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 19 skipped benchmarks1


Comparing 09-01-fix_formatter_do_not_skip_cast_comment_lookup (52ed826) with 09-01-fix_formatter_preserve_comment_for_statement_terminators_and_binary_casts (cfef465)

Open in CodSpeed

Footnotes

  1. 19 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.

@graphite-app graphite-app Bot added the 0-merge Merge with Graphite Merge Queue label Sep 1, 2026
@graphite-app

graphite-app Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Merge activity

Fixes #26202

---

The trigger for this issue is the presence of a suppressed typecast.

```js
// oxfmt-ignore
const cast = /** c */ (x)
```

Because a comment had already been printed in a subsequent typecast check without going through the casting mechanism, it failed to find its own cast comment.
@graphite-app
graphite-app Bot force-pushed the 09-01-fix_formatter_preserve_comment_for_statement_terminators_and_binary_casts branch from cfef465 to 1213e12 Compare September 1, 2026 03:56
@graphite-app
graphite-app Bot force-pushed the 09-01-fix_formatter_do_not_skip_cast_comment_lookup branch from 52ed826 to 2f4d759 Compare September 1, 2026 03:57
Base automatically changed from 09-01-fix_formatter_preserve_comment_for_statement_terminators_and_binary_casts to main September 1, 2026 04:02
@graphite-app
graphite-app Bot merged commit 2f4d759 into main Sep 1, 2026
33 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Sep 1, 2026
@graphite-app
graphite-app Bot deleted the 09-01-fix_formatter_do_not_skip_cast_comment_lookup branch September 1, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-formatter Area - Formatter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

formatter: JSDoc type cast loses parentheses after a prettier-ignore comment

1 participant

Sponsor
SponsoredKunjungi sekarang
Promo