-
-
Notifications
You must be signed in to change notification settings - Fork 490
Closed
Labels
enhancementlockedPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
As soon as VScode was updated to 1.31.0, it appears that this prettier extensions conflicts with the the built-in organize imports setting, when organize imports on save is enabled.
prettier: "prettier": "^1.16.4", (was initially on 1.13.7, tried to update)
vscode: Version 1.31.0 (1.31.0)
extension: 1.8.0
I first opened a ticket with vscode core, but was referred to the extension as the source of the problem:
microsoft/vscode#68193
Steps to reproduce
- Add setting for
editor.codeActionsOnSave.source.organizeImports = true(see below for example json) - Ensure prettier is configured to format on save
- create a ts file (may also work with js) that has an import that exceeds the configured line length, which should be turned into a multi-line import
- Save file
Expected behavior:
- imports should be organized
- imports should be formatted to multi-line import
- file should be saved
Actual behavior:
- imports are organized
- imports remain on a single line
- file remains "dirty" - with the little white dot in the tab-bar
Note:
I can format the document manually using the command menu and the import is correctly formatted, but then on save it is unformatted and the file shows as modified by the file system.
"editor.codeActionsOnSave": {
"source.organizeImports": true
},Initial file
Format file manually, just to show that it works
After Save (cmd+s)
hypergeometric, jaydp17, dko-slapdash, blixt, mattarau and 64 more
Metadata
Metadata
Assignees
Labels
enhancementlockedPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.



