Fix `prettier` installed in a directory not named prettier (#4706)

master
Anthony Sottile 2018-06-18 09:29:54 -07:00 committed by Lucas Duailibe
parent b99de9811b
commit 5d5c97a17f
1 changed files with 1 additions and 4 deletions

View File

@ -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];
}