-
Notifications
You must be signed in to change notification settings - Fork 96
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
Not formatting monorepo #311
Comments
Are you using pnpm? If yes, possible duplicate of #155 |
Nope! I'm using yarn and the Svelte project is TypeScript. |
Exactly the same problem here. |
I have the same problem |
Joining this issue since I have the same problem. |
Same problem here. Output logs for Svelte plugin (VSCode opened from
Output logs for Svelte plugin (VSCode opened from
One way to resolve this might be to init Svelte language server from the same path as where the |
@jsxclan, @jerebtw, @ItzaMi and @toqueteos, I had some problems in configuring prettier in my monorepo setup. But I fixed them with this setting I hope it helps.
|
@phcoliveira solution didn't work for me but I found a working alternative.
Here's the default /**
* @type {import('prettier').Options}
*/
module.exports = {
useTabs: true,
singleQuote: true,
trailingComma: 'none',
printWidth: 100,
plugins: [require('prettier-plugin-svelte')],
pluginSearchDirs: ["."],
overrides: [{ 'files': '*.svelte', 'options': { 'parser': 'svelte' } }]
}; |
Same problem with this monorepo PS: I manually added file extensions and it works fine pnpm prettier './**/*.{js,ts,mjs,cjs,json,svelte}' --write |
The formatter seems not to be working with monorepo!
I have three mono repo in a project (i.e.
landing
,servers
, andstudio
), thelanding
dir is a Next.js app, while theservers
dir contains multiple servers which are Nest.js apps, and finally, thestudio
dir is a Svelte (SvelteKit) app. If the working directory is the root/project folder prettier works perfectly on thelanding
andservers
dir, and other files in thestudio
dir except for the.svelte
files but the formatter works with.svelte
files if the working directory isstudio
itself.And my PC lag if I have multiple vscode instances running with other heavy applications (i.e. Docker, Firefox, Postman, etc)
What am I doing wrong!?
System info:
The text was updated successfully, but these errors were encountered: