Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_formatter): no comment reordeing in default clause #4255

Closed
wants to merge 1 commit into from
Closed

fix(rome_js_formatter): no comment reordeing in default clause #4255

wants to merge 1 commit into from

Conversation

Conaclos
Copy link
Contributor

@Conaclos Conaclos commented Mar 4, 2023

Summary

This is a tentative fix for #4254 that is blocking #4234.

For now, the fix avoids comments reordering in default clauses and the reformat failure.

However, this makes a regression on prettier compatibility.
Indeed, the following code:

switch(5){
  default: // comment
    break;
}

is formatted to:

switch(5){
  default:
    // comment
    break;
}

// comment should not be moved.

Any help could be welcome!

Test Plan

  • Regression test to include

Documentation

No change.

  • The PR requires documentation
  • I will create a new PR to update the documentation

@netlify
Copy link

netlify bot commented Mar 4, 2023

Deploy Preview for docs-rometools canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit ec3722a
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/6403412b406a7f0008787e02

@Conaclos Conaclos marked this pull request as draft March 4, 2023 13:01
@ematipico ematipico added Help wanted Help would be really appreciated A-Formatter Area: formatter labels Apr 16, 2023
@Conaclos Conaclos closed this by deleting the head repository Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter Help wanted Help would be really appreciated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants