You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched and didn't really see anything for this but as prettier gets more configuration options it would be ideal to be able to configure it on a per project basis.
For instance, some projects use trailing commas others don't. Some projects don't use semicolons others may want automatic semicolon insertion.
Seeing a .prettierrc file in the project is probably a good tip off that they expect all code to be formatted with prettier.
I may be missing something too.
I agree with the not-too-many-config approach, but if this lib already supports some options, why not support a .prettierrc file too? It's not asking to add more configuration, just an easier way to read them.
Where I'm coming from:
I've put the prettier configs in the vscodesettings.json.
Later, I run the cli command and did not pass the options in the cli, so it of course changed all my files back to the defaults. I was so used to eslint, babel, etc, looking at config files that I didn't realized the cli command would not use it. :)
Reacted by Maja Cieślak, Josh Buchea, Jon Crenshaw, Josh Burgess, Will Monk, Andrea Cadeddu, Peter Petrov, Ron Hsu, Gil Barbara, Christian Silver and 2 more
Activity
hzoo commentedon Jan 12, 2017
#40 can cover this in a way if you haven't seen
vramana commentedon Jan 12, 2017
@jlongster has confirmed that he is not interested in adding configuration files to prettier. He will soon add FAQ document for this.
brunolemos commentedon Jan 16, 2017
EDIT: Duplicated of #98.
I may be missing something too.
I agree with the not-too-many-config approach, but if this lib already supports some options, why not support a
.prettierrcfile too? It's not asking to add more configuration, just an easier way to read them.Where I'm coming from:
I've put the prettier configs in the
vscodesettings.json.Later, I run the cli command and did not pass the options in the cli, so it of course changed all my files back to the defaults. I was so used to eslint, babel, etc, looking at config files that I didn't realized the cli command would not use it. :)
rattrayalex-stripe commentedon Sep 23, 2017
Prettier now has a configuration file.
Docs: https://github.com/prettier/prettier/blob/master/README.md#configuration-file
Release notes: https://github.com/prettier/prettier/releases/tag/1.6.0
djvs commentedon May 20, 2018
Updated link for Googlers https://prettier.io/docs/en/configuration.html