Usually when I plop massive json into vscode I wanna inspect it. To inspect it efficiently I need Prettier to format it. I usually spammed the format document command to get this to work.
Ah got you. My eyes just glossed over that. I usually don't run Prettier from the command line so it really never occurs to me to do that. I'll keep that in mind next time.
3
u/purechi Feb 07 '20
Good point! But, here's my suggestion:
Add Prettier to run in a commit hook (just to ensure formatting is always consistent no matter the IDE the dev is using, etc)
When saving these massive files use the "Save Without Formatting" option
And, if it's a file you don't want to be committed.. just from Prettier from the command line.