You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me this problem happens when I use the shortcut CTRL + SHIFT + F to format the code and then immediately save the file with CTRL + S. I ended up discovering that I can solve it by changing the automatic saving configuration of VS Code in the settings.json file:
"editor.formatOnSaveMode": "modificationsIfAvailable"
or "editor.formatOnSaveMode": "modifications"
For me, this (or similar issue) started happening a few weeks ago, after one of the PHPStorm updates. Moreover, the formatter also removes the empty line at the end of file, which also causes linter errors.
But it happens only if 'Optimize imports' option is checked when I'm trying to reformat file by Ctrl-Alt-Shift-L
For me, this (or similar issue) started happening a few weeks ago, after one of the PHPStorm updates. Moreover, the formatter also removes the empty line at the end of file, which also causes linter errors. But it happens only if 'Optimize imports' option is checked when I'm trying to reformat file by Ctrl-Alt-Shift-L
I disabled the "Reformat code" option for "Actions on save", and fixed the issue in Webstorm.
Your Environment
Describe the bug
This plugin is placing two line breaks after the last import:
Here is what things look like when this plugin is disabled:
To Reproduce
Expected behavior
The last import
Screenshots, code sample, etc
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
Error log
Contribute to @trivago/prettier-plugin-sort-imports
The text was updated successfully, but these errors were encountered: