import-sort
import-sort copied to clipboard
Bug: Duplicated commented imports
Running prettier on a file with a comment as the last import duplicates that comment
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
Run prettier three times
The commented out imports also multiply
Repro Steps
- Create a
.tsx
file where the last import is commented out -
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 https://github.com/ggascoigne/prettier-plugin-import-sort/issues/13 in my prettier config, and after opening an issue there, they directed me here.
Hi @renke , any thoughts on this?