How to update your @nuxtjs/eslint-module from v2 to v3.

I was spending a lot of time figuring out why I my app kept crashing and I hope this write up will help those who are struggling to understand where your build is breaking during your upgrade from v2 to v3 upgrade of this package. Here are the steps to upgrade.

Update eslint to be at least v7 before installing eslint-webpack-plugin.

npm install eslint@latest -save-dev
npm install eslint-webpack-plugin -save-dev

Configure nuxt.config.js to use updated module. Replace eslint-loader with eslintplugin.

You may also configure options within nuxt.config.js, but it is highly recommended to use eslintrc.js to configure options to make this file cleaner.

npm run lint
> eslint - ext .js,.ts,.vue - ignore-path .gitignore .

Remember to test your builds and run your tests.

Sum Up

  • Install eslint and eslint-webpack-plugin
  • Replace eslint-loader with eslintplugin within nuxt.config.js
  • Test out eslint with your eslint command within package.json

Let me know if I need to add more clarifications! I hope this helped you! Cheers! 🍺

#nuxtjs #vue #eslint #eslint-module #help #npm #eslintplugin #js #nodejs #node


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store