Fix `prettier` installed in a directory not named prettier (#4706)
parent
b99de9811b
commit
5d5c97a17f
|
@ -18,10 +18,7 @@ function loadPlugins(plugins, pluginSearchDirs) {
|
|||
}
|
||||
// unless pluginSearchDirs are provided, auto-load plugins from node_modules that are parent to Prettier
|
||||
if (!pluginSearchDirs.length) {
|
||||
const autoLoadDir = thirdParty.findParentDir(
|
||||
thirdParty.findParentDir(__dirname, "prettier"),
|
||||
"node_modules"
|
||||
);
|
||||
const autoLoadDir = thirdParty.findParentDir(__dirname, "node_modules");
|
||||
if (autoLoadDir) {
|
||||
pluginSearchDirs = [autoLoadDir];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue