-
-
Notifications
You must be signed in to change notification settings - Fork 195
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.includes is not a function
error when formatting document
#2106
Comments
plugin.includes is not a function
error when formatting document
This isn't directly related to using a |
I was able to work around this issue by switching back to using string package names for plugins... module.exports = {
plugins: [
'prettier-plugin-svelte',
'prettier-plugin-tailwindcss',
],
...
} but then I was getting...
the workaround was to add I'll do some more testing, and if looks like the correct fix, I'll send a PR to update the package.json in |
This (i.e. the original issue "plugin.includes is not a function") is also an issue for projects using yarn berry (and workspaces) since yarn requires that all modules used inside a workspace be declared in the workspace's When the The workaround is to add EDIT: a better workaround is to configure |
#2106 Fix cases where plugins: [require('prettier-plugin-svelte')] and where plugins ['prettier-plugin-svelte'] but never installed.
Describe the bug
After updating to Svelte for VS Code version 107.9.0, code formatting is no longer working with
prettier.config.cjs
.Reproduction
git clone https://github.com/NateXVI/plugin-includes-error.git cd plugin-includes-error
code .
Install Svelte for VS Code extension version 107.9.0
Mess up the formatting on
src/routes/+page.svelte
Format
src/routes/+page.svelte
Shift + Alt + F
Expected behaviour
src/routes/+page.svelte
should be formattedSystem Info
Which package is the issue about?
svelte-language-server
Additional Information, eg. Screenshots
The error seems to be cause by changes made in #2100 and only happens when using a
prettier.config.cjs
instead of.prettierrc
config file.Svelte extension output I get when formatting
The text was updated successfully, but these errors were encountered: