Nuxt.js error and 0 warnings potentially fixable with the ‘-fix’ optionが発生した場合の対応方法

Nuxt.js error and 0 warnings potentially fixable with the ‘-fix’ optionが発生した場合の対応方法

ESLintを利用時に「error and 0 warnings potentially fixable with the ‘–fix’ option」が発生した際の対応方法です。よく出るので、コマンドをメモ

環境

  • OS  ubuntu19.10
  • node v12.13.0
  • npm 6.13.7
  • Nuxt.js v2.11.0

対応方法

原因を調べるのが面倒な場合は、下記のコマンドを実行するだけで、改善される場合が大半です。

yarn run lint --fix