How to disable eslint on vue-cli 3?

Marcogomesr picture Marcogomesr · Mar 6, 2018 · Viewed 21.7k times · Source

I recently update the laster version vue-cli 3

After creating a project and run it, it will show the message

  • You may use special comments to disable some warnings.
  • Use //eslint-disable-next-line to ignore the next line.
  • Use /* eslint-disable */ to ignore all warnings in a file.

but in Which file should I put those comments?

I only have a package.json / package-lock.json and .gitignore on my root folder

Do I have to create a .eslintrc?

Answer

Padhraic picture Padhraic · Oct 22, 2018

You can remove the eslint rule by adding a vue.config.js file to your project with the following content.

module.exports = {
    chainWebpack: config => {
        config.module.rules.delete('eslint');
    }
}

Alternatively if your project has a config\index.js file you can disable eslint by adding the following line.

useEslint: false,