New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node_modules/.cache/prettier #13032
Comments
@sosukesuzuki We can use the same logic as in webpack - https://github.com/webpack/webpack/blob/main/lib/config/defaults.js#L325 + option to change it, should cover the most of cases |
It looks good, I'll implement it. |
I would advise against that as you now end up with another cache folder since not all tools will follow the same logic and if you're using PnP with pnpm it doesn't make sense to have a |
@merceyz If I using PnP with pnpm, where should cache file is put? |
For angular-cli, it uses |
@sosukesuzuki I would just stick to |
What about not creating a cache directory if caching isn't enabled? Also the initially implemented |
My ideal is as follows:
|
Any updates on this? Just thought I would check-in. 🙂 Thanks for all the help on this! |
Any progress on this? |
The cache location flag change was already merged to main here. |
I second this. Why create empty folders especially when prettier does not enable the cache by default? This is especially apparent in a monorepo that creates empty |
Adding |
The docs state Running Prettier without |
I use Yarn PnP and therefore do not usually have a node_modules folder and instead have a .yarn folder. After prettier 2.7, when I run my
prettier --write .
command, I now get a node_modules folder with the only contents being: node_modules/.cache/prettier. Can we move the cache location inside the .yarn folder or somewhere besides node_modules when using pnp?Environments:
Steps to reproduce:
run
prettier --write .
Expected behavior:
No node_modules folder and Prettier cache location somewhere in .yarn folder.
Actual behavior:
Created a node_modules folder with the following cache: node_modules/.cache/prettier
The text was updated successfully, but these errors were encountered: