Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS snippet requires two passes to be properly formatted #12392

Closed
PyvesB opened this issue Mar 5, 2022 · 1 comment
Closed

JS snippet requires two passes to be properly formatted #12392

PyvesB opened this issue Mar 5, 2022 · 1 comment
Labels
type:duplicate Issues that are a duplicate of a previous issue

Comments

@PyvesB
Copy link

PyvesB commented Mar 5, 2022

Prettier 2.5.1
Playground link 1
Playground link 2

--parser babel

Input:

t.create('version')
  .get('/v/cowboy.json')
  .expectBadge({ label: 'hex', message: isVPlusDottedVersionNClausesWithOptionalSuffix })

Output:

t.create("version")
  .get("/v/cowboy.json")
  .expectBadge({
    label: "hex",
    message: isVPlusDottedVersionNClausesWithOptionalSuffix,
  });

New output with previous output reused as input:

t.create("version").get("/v/cowboy.json").expectBadge({
  label: "hex",
  message: isVPlusDottedVersionNClausesWithOptionalSuffix,
});

Expected behavior:

Prettier should get the formatting right the first time and not require multiple passes.

@Josh-Cena
Copy link

Duplicate of #2803

@thorn0 thorn0 closed this as completed Aug 24, 2022
@thorn0 thorn0 added the type:duplicate Issues that are a duplicate of a previous issue label Aug 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:duplicate Issues that are a duplicate of a previous issue
Projects
None yet
Development

No branches or pull requests

3 participants