0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Prettier または ESLint の自動修正を使用する

Posted at

1.VSCode での設定確認

 VSCode の設定で、ファイル保存時に Prettier で自動フォーマットする設定を確認します。設定が有効であれば、ファイル保存時に自動で修正されるはずです。
 設定は、settings.json に次のように記述します。

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode"
}

2.手動で Prettier を実行:

 コマンドパレット(Ctrl+Shift+P)で「Format Document」を選択し、Prettier を使ってファイルをフォーマットします。

これらの処理を行うことで、改行の修正が行えます。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?