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

Bug: Duplicated commented imports #118

Open
dawsbot opened this issue Jun 19, 2020 · 1 comment
Open

Bug: Duplicated commented imports #118

dawsbot opened this issue Jun 19, 2020 · 1 comment

Comments

@dawsbot
Copy link

dawsbot commented Jun 19, 2020

Running prettier on a file with a comment as the last import duplicates that comment

image

the axios import is multiplied each time I run prettier

This applies to not just imports, it occurs for any comment which immediately follows your imports without a blank line in-between


Run prettier once

image

Run prettier three times

image

The commented out imports also multiply

Repro Steps

  1. Create a .tsx file where the last import is commented out
  2. npx prettier --write FILE_NAME on a file where the imports end in a commented out import

More Information

I came to this error by using ggascoigne/prettier-plugin-import-sort#13 in my prettier config, and after opening an issue there, they directed me here.

@dawsbot
Copy link
Author

dawsbot commented Aug 28, 2020

Hi @renke , any thoughts on this?

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