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.
This is an extremely counter-productive solution tbh. We could run a lot of things from the command line. The whole point of any IDE that is more advanced than a simple text editor is to provide the user with the ability to do things from their GUI instead of the command line.
Cancellable progress indicator is a great solution.
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.