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

Plugin not finding local config file, only for .svelte files #3253

Open
WoodyWoodsta opened this issue Jan 6, 2024 · 3 comments
Open

Plugin not finding local config file, only for .svelte files #3253

WoodyWoodsta opened this issue Jan 6, 2024 · 3 comments
Labels

Comments

@WoodyWoodsta
Copy link

Summary

When I open a .ts file, prettier is configured to use my local prettier.config.js file. When I open a .svelte file in the same project, I get the message: "Require config set to true and no config present. Skipping file."

If I explicitly set the name of the config file in the extension settings, it works.

Expected result

Prettier correctly finds my local config for all files.

Actual result

Prettier complains about not finding a local prettier config, despite it using it for other files in the same project.

VS Code Version:

Version: 1.85.1
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:48:06.308Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 23.2.0

Prettier Extension Version:

v10.1.0

OS and version:

macOS 14.2.1

Prettier Log Output

["DEBUG" - 20:58:15] Local prettier module path: '***/node_modules/prettier/index.cjs'
["DEBUG" - 20:58:15] Using prettier version 3.1.1
["INFO" - 20:58:15] Require config set to true and no config present. Skipping file.
@olafurw
Copy link

olafurw commented Jan 12, 2024

Same issue here. Stops working with prettier 3.1.1 but works with prettier 3.1.0. They did change how config file lookup was done, so probably something to do with that.

https://github.com/prettier/prettier/blob/main/CHANGELOG.md#311

@phocks
Copy link

phocks commented Feb 28, 2024

I am having the same issue. Version 3.1.0 works perfectly. Version 3.1.1 and I get:

Extension 'Prettier - Code formatter' is configured as formatter but it cannot format 'Svelte'-files

I wonder what happened.

Copy link

This issue has been labeled as stale due to inactivity. Reply to keep this issue open.

@github-actions github-actions bot added the Stale label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants