Open artola opened 2 years ago
@byara The "input" example above is properly handled by Prettier (if several lines added between the comment and the first import, then just 1 empty line remains) but once added this plugin, it removes all the whitespace.
Same behaviour using single or multi-line comments (// ...
or /* ... */
).
Looks like this PR wanted to fix this issue: https://github.com/trivago/prettier-plugin-sort-imports/pull/24 @ayusharma @byara Can you provide any info why that PR was closed? Is this planned to be fixed? Thanks!
Looks like this PR wanted to fix this issue: #24 @ayusharma @byara Can you provide any info why that PR was closed? Is this planned to be fixed? Thanks!
Same. Hope this feature can be considered. In the projects I work on, we put the Apache License
at the top. So we want to have a blank line between it and the actual code.
Thank you for creating this project. ❤️ It's very useful.
I'm seeing the same issues with copyright blocks on top of our files. It's removing the blank separator line.
Same problem with copyright blocks in our project.
Your Environment
Describe the bug
The plugin removes the whitespace before the imports' block, but it should not be affected at all.
To Reproduce
Input:
Output:
Expected behavior
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)