-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
area:cliIssues with Prettier's Command Line InterfaceIssues with Prettier's Command Line Interfacestatus:needs discussionIssues needing discussion and a decision to be made before action can be takenIssues needing discussion and a decision to be made before action can be taken
Description
Environments:
- Prettier Version: 3.0.0
- Running Prettier via: CLI
- Runtime: Node.js v16
- Operating System: Linux
- Prettier plugins (if any): Well that's the issue ...
Steps to reproduce:
Context: trying to update a monorepo pre-commit hook to Prettier 3.0. I've worked through a bunch of issues related to the sync removals, but now I'm left with a change in how Prettier searches for plugins.
In Prettier 2.8.8, I could point it to the central location of the prettier tooling in the monorepo via setting NODE_PATH. But in Prettier 3.x
Expected behavior:
Tries to load plugins from NODE_PATH directories as a fallback.
Actual behavior:
Ignores NODE_PATH when trying to load plugins.
Running under strace suggests that the only directories it looks in are those derived from the target file's directory, or just $PWD in some cases, which is very hard to make work in a monorepo environment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:cliIssues with Prettier's Command Line InterfaceIssues with Prettier's Command Line Interfacestatus:needs discussionIssues needing discussion and a decision to be made before action can be takenIssues needing discussion and a decision to be made before action can be taken