9
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VSCodeでPrettierが使えない問題を解決する3手順

Posted at

VSCodeでPrettierが使えない問題

たまに上書き保存時にPrettierが使えない問題が発生するけど、対処方法がぱっと出てこないやつ。
特に3つ目。
そしてFormatOnSaveとDefaultFormatterを同時に説明してる記事が上の方に出てこなくてつらい

Prettier拡張を入れる

  1. Cmd + Pでクイックオープンウィンドウを開く
  2. ext install esbenp.prettier-vscodeを入力, Enterを押下しインストールする。

Format On Saveが有効にする

  1. Cmd + Shift + Pでコマンドパレットを開く
  2. Preferences: Open Settings (UI)を入力し設定パネルを開く
  3. format on saveを検索し、Editor: Format On Saveにチェックを入れる。

Editor: Default Formatterをprettierにする

  1. Cmd + Shift + Pでコマンドパレットを開く
  2. Preferences: Open Settings (UI)を入力し設定パネルを開く
  3. default formatterを検索し、Editor: Default Formatterの値をesbenp.prettier-vscodeに設
9
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?