Prettier is an opinionated code formatter.
- Install the Node package:
Install with npm
:
npm install --save-dev prettier
# or globally
npm install --global prettier
Install with yarn
:
yarn add prettier --dev
# or globally
yarn global add prettier
- Install the VS Code extension:
Search the VS Code extensions for Prettier - Code formatter
and click Install
.