-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Copy link
Labels
area:cliIssues with Prettier's Command Line InterfaceIssues with Prettier's Command Line Interface
Milestone
Description
Environments:
- Prettier Version: 2.7.0
- Running Prettier via: CLI
- Operating System: Windows
After discussion #12800 (comment) you moved from default cache location .prettiercache
(eslint style) to node_modules/.cache/prettier
(ava style).
In #12800 (comment) you needed a use case for a --cache-location
CLI param.
I have a script which formats and compiles many Visual Studio projects which shares one node_modules
dir.
Compiling one project boosts the prettier call from 15s to 2s. 🎉
But every project has different files (surprise :-) so every prettier call finds new files and rebuilds (!) node_modules/.cache/prettier
from scratch (which renders the cache useless in many situations).
It would be better if prettier would
- expand the cached cache file with new found files (but when do we cleanup?) or
- default to
.prettiercache
to be able to have a cache file per vs project or - readd
--cache-location
CLI param so I can configure the cache in my build script
dirkdev98 and belgattitude
Metadata
Metadata
Assignees
Labels
area:cliIssues with Prettier's Command Line InterfaceIssues with Prettier's Command Line Interface