LoginSignup
3
3

More than 5 years have passed since last update.

prettierのインデント幅の設定

Last updated at Posted at 2018-09-26

prettierのインデント幅がデフォルトの「2」のままでWebstromの設定などが反映されずちょっとハマったのでメモ。

prettierの公式ページに設定ファイルの記述があったので、ここに書いてある通りにプロジェクト内に「prettier.config.js」というjsファイルを作成して以下の設定をして解決した(ファイルの置き場所はwebpackプロジェクト配下なら特にどこでも大丈夫っぽい)。

module.exports = {
    tabWidth: 4
};

これ以外の設定項目については同じく公式ページのこちらを参照。

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