How to configure Prettier and VSCode

1 · Gleb Bahmutov · Sept. 9, 2019, 2:19 p.m.
You can configure JavaScript code auto-formatting with Prettier to work per-project. This allows you to get a consistent formatting without thinking or arguing about it. This blog post shows how to configure Prettier to work from command line, from VSCode and from Git hooks.You can find the sample project with different Prettier settings configured per-subfolder at bahmutov/prettier-config-example.Why Prettier?SetupSettingsVSCode setupFormat files from CLIFormat staged files on commitCatch mis-f...