prettier / prettier

Prettier is an opinionated code formatter.
https://prettier.io
MIT License
49.35k stars 4.34k forks source link

Loading configuration file from user's home if none found in project root ? #6440

Closed playahater closed 4 years ago

playahater commented 5 years ago

Environments:

Steps to reproduce:

Expected behavior: The configuration options should be loaded from the user's home directory and written to a file.

Actual behavior: The configuration options are not loaded. Prettier default ones are used instead.

So i tried using vim-prettier [ which actually uses prettier config resolver ] and using cli outside of vim and got the same results.

Am I i doing something wrong or this feature is not supported anymore ? Or it never was ? If i copy the configuration from user's home to a project root, everything works as expected.

Any feedback is more than appreciated in advance.

avegancafe commented 4 years ago

I'm also getting this issue and would love to be able to have a global config that applies as the base default. @playahater did you ever find a solution to this?

playahater commented 4 years ago

@keyboard-clacker unfortunately not. Doing manual copy of the rc file in the project root.

thorn0 commented 4 years ago

Prettier isn't going to support any kind of global configuration. See https://github.com/prettier/prettier/issues/8094#issuecomment-616444163