Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable eslint on vue-cli 3?

Tags:

vuejs2

vue-cli

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?

like image 606
Marcogomesr Avatar asked Mar 05 '18 23:03

Marcogomesr


People also ask

How do I turn off ESLint Vue?

To disable ESLint in Vue CLI, we just remove the @vue/cli-plugin-eslint package from the Vue CLI project. to remove the @vue/cli-plugin-eslint package, which will disable ESLint in the Vue CLI project.

How do I disable ESLint on next line?

disable warnings eslint Use /* eslint-disable */ to ignore all warnings in a file. 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.


1 Answers

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,
like image 73
Padhraic Avatar answered Sep 28 '22 09:09

Padhraic