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

Invalid output for JSX comment (2 cases w/ a link to Playground) #574

Open
o-alexandrov opened this issue Nov 4, 2023 · 0 comments
Open

Comments

@o-alexandrov
Copy link

o-alexandrov commented Nov 4, 2023

Link to Playground

Related issue #89

Describe the bug

dprint-plugin-typescript version: 0.88.3

Input Code

function Test() {
  return (
    <div
      // bug 1: goes inside the parenthesis
      {...(process.env.NODE_ENV !== `production` && { strict: true })} // bug 2: goes inside JSX
    ></div>
  )
}

Expected Output

No changes for both bug 1 & bug 2 comments

Actual Output

function Test() {
  return (
    <div
      {// bug 1: goes inside the parenthesis
      ...(process.env.NODE_ENV !== `production` && { strict: true })}
    > // bug 2: goes inside JSX
    </div>
  )
}
@o-alexandrov o-alexandrov changed the title Invalid output for JSX comment Invalid output for JSX comment (2 cases w/ a link to Playground) Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant