prettier-vscode
prettier-vscode copied to clipboard
Update config resolution for Prettier 3.1.1
Fixes #3253.
- [ ] No tests broken
- [x]
CHANGELOG.mdupdated - [ ] Code is formatted
Currently makes 1 one more test fail ("Test configurations": "it formats custom file extension") and I'll try to investigate why, but I wanted to at least post this for discussion.
The change is to resolve config for the active file not for the workspace directory. Passing the root directory to resolveConfig was broken in Prettier v3.1.1 with no intention of reverting, as reported here: https://github.com/prettier/prettier/issues/15879
I found one issue and fixed it and when I tried the *.abc case manually, it started working, but the automated test still fails. Any ideas?
If I only run the config.test.js suite, it doesn't fail. O.O
Something else has updated also in prettier where rolling back the VSCode plugin version doesn't work. So I'm unable to format .svelte files.
Something else has updated also in prettier where rolling back the VSCode plugin version doesn't work. So I'm unable to format .svelte files.
Yep, same here. Fingers crossed for this fix. Pinning prettier to version 3.1.0 fixes it for me currently, but yeah not ideal.
I ran into this as well with 3.1.1 and latest 3.2.5. Instead of pinning to 3.1.0 you can add config file setting. See https://github.com/prettier/prettier-vscode/issues/3235#issuecomment-1879640587
Moved to by https://github.com/prettier/prettier-vscode/pull/3348