12
7

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.

eslintとprettierの競合を解消する

Last updated at Posted at 2020-03-22

競合とは、eslintとprettierが互いに別のコードフォーマットを適用して、コードが修正されない状態を言います。

その解決法は.eslintrc.jseslint-config-prettierを加えるだけです。

{
  "extends": [
    /* 他の設定 */
     'eslint-config-prettier' //必ず最後に加える
  ]
}

eslint-config-prettierは、必ず最後に加える必要があります。なぜなら後に書かれた設定の方が優先順位が高いからです。

[参考]

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?