Saturday, May 11, 2019

Prettier with VS Code

Prettier · Opinionated Code Formatter

An opinionated code formatter
Supports many languages
Integrates with most editors
Has few options

prettier/prettier-vscode: Visual Studio Code extension for Prettier

1. CMD + Shift + P -> Format Document
1. Select the text you want to Prettify
2. CMD + Shift + P -> Format Selection
Format On Save

// Set the default
"editor.formatOnSave": false,
// Enable per-language
"[javascript]": {
    "editor.formatOnSave": true

Automated code formatting with Prettier

Use Prettier in Visual Studio Code - YouTube

No comments: