You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for prettier.resolveGlobalModules says:
When enabled, this extension will attempt to use global npm or yarn modules if local modules cannot be resolved.
This implies that any kind of reference to a module would attempted to be resolved this way, but looking at the code, it seems that this really only applies to resolving the Prettier module itself (I guess if you wanted to manually use a global installation of Prettier instead?).
The documentation should really be changed to make this clear, and possibly even the option name itself (e.g. resolveGlobalPrettier).
And moreover, it would be really good to have plugins be able to be resolved in the same way. By looking at that code, and by testing it locally (I can verify I have the listed plugins installed globally with both npm and yarn).
For the past several hours, I've been trying to set up this extension to simply be able to use a global .prettierrc configuration in my ~/ home directory (MacOS) with some plugins like prettier-plugin-css-order, and I can't get it to work because of #3104 and this issue (even when downgrading the extension). I need this because I work on many one-off, stand-alone .js/.html/.svg/etc. files that I want to format, and cannot define a whole .pretterrc, package.json, and node_modules for each one.
The text was updated successfully, but these errors were encountered:
I'm running into a similar issue trying to run prettier using prettier.resolveGlobalModules with prettier-plugin-tailwindcss because my local version of prettier is pinned to 2.x because of jest
The documentation for
prettier.resolveGlobalModules
says:This implies that any kind of reference to a module would attempted to be resolved this way, but looking at the code, it seems that this really only applies to resolving the Prettier module itself (I guess if you wanted to manually use a global installation of Prettier instead?).
The documentation should really be changed to make this clear, and possibly even the option name itself (e.g.
resolveGlobalPrettier
).And moreover, it would be really good to have plugins be able to be resolved in the same way. By looking at that code, and by testing it locally (I can verify I have the listed plugins installed globally with both
npm
andyarn
).For the past several hours, I've been trying to set up this extension to simply be able to use a global
.prettierrc
configuration in my~/
home directory (MacOS) with some plugins likeprettier-plugin-css-order
, and I can't get it to work because of #3104 and this issue (even when downgrading the extension). I need this because I work on many one-off, stand-alone.js
/.html
/.svg
/etc. files that I want to format, and cannot define a whole.pretterrc
,package.json
, andnode_modules
for each one.The text was updated successfully, but these errors were encountered: