prettier-vscode
prettier-vscode copied to clipboard
Plugin not finding local config file, only for .svelte files
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.
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
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.
This issue has been labeled as stale due to inactivity. Reply to keep this issue open.