Skip to content

Commit

Permalink
feat(posts): add "How to run Prettier on save for VS Code"
Browse files Browse the repository at this point in the history
Post: 2024-10-08-visual-studio-code-run-prettier-on-save.md
  • Loading branch information
remarkablemark committed Oct 8, 2024
1 parent 764dee0 commit eba37ee
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions _posts/2024/2024-10-08-visual-studio-code-run-prettier-on-save.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: post
title: How to run Prettier on save for VS Code
date: 2024-10-08 18:21:42
excerpt: How to format with Prettier on save for Visual Studio Code.
categories: vscode prettier ide
---

Install [Visual Studio Code](https://code.visualstudio.com/) and the extension [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).

Press `Command` + `Shift` + `P` (or `Ctrl` + `Shift` + `P`) and open `settings.json`.

Add the following to `settings.json`:

```json
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
```

0 comments on commit eba37ee

Please sign in to comment.