Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config resolution for Prettier 3.1.1 #3267

Closed

Conversation

elieux
Copy link

@elieux elieux commented Jan 17, 2024

Fixes #3253.

  • No tests broken
  • CHANGELOG.md updated
  • 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: prettier/prettier#15879

... not for the workspace directory.

Passing a directory to resolveConfig was broken in prettier v3.1.1, as reported here:
prettier/prettier#15879
@elieux elieux force-pushed the prettier-3.1.1-resolve-config branch from d681cc7 to 73498f8 Compare January 18, 2024 09:14
@elieux
Copy link
Author

elieux commented Jan 18, 2024

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

@olafurw
Copy link

olafurw commented Jan 29, 2024

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.

@phocks
Copy link

phocks commented Feb 28, 2024

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.

@ryanb
Copy link

ryanb commented Mar 19, 2024

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 #3235 (comment)

@ntotten
Copy link
Member

ntotten commented Mar 21, 2024

Moved to by #3348

@ntotten ntotten closed this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin not finding local config file, only for .svelte files
5 participants