35
23

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 5 years have passed since last update.

VSCode でファイル保存時にPrettierに自動整形してもらう

Last updated at Posted at 2019-06-04

やりたいこと

VSCode に Prettier の拡張機能をインストールして自動整形してもらいたい。

ちょっと困ったこと

他の方の記事をみると、User Settings の json ファイルを書き換えるようなことが書いてあるが、どこにあるんだろう&なんかGUIで設定できそう。

やり方

  1. VSCode に Prettier の拡張機能をインストールする。
    スクリーンショット 2019-06-04 14.25.11.png

  2. Command + Shift + P を押して Open User Settings を開く
    スクリーンショット 2019-06-04 14.24.21.png

  3. Text Editor -> Formatting の順で選択して、 Format On Save にチェックを入れて終わり
    スクリーンショット 2019-06-04 14.24.37.png

参考

VS Code上でファイル保存時にPrettierを走らせる
[React Native]VSCodeでPrettierを入れる

35
23
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
35
23

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?