Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable ESLint in vue-cli?

How do I go about disabling ESlint in project generated with vue-cli?

preLoaders: [
  {
    test: /\.vue$/,
    loader: 'eslint',
    include: projectRoot,
    exclude: /node_modules/
  },
  {
    test: /\.js$/,
    loader: 'eslint',
    include: projectRoot,
    exclude: /node_modules/
  }
]

If I remove the loader: 'eslint' line it won't compile, same with setting it to an empty string. I know I can opt out of ESLint during the initialization phase, but how can I disable it after my project has been created?

like image 617
Mahmud Adam Avatar asked Aug 04 '16 01:08

Mahmud Adam


People also ask

How do I disable ESLint on 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?

disable eslint directoryUse /* eslint-disable */ to ignore all warnings in a file. how to turn off eslint-disable no-undef in eslintrc.


2 Answers

There are some out-of-date answers here.

Because vue-cli 3 is using a zero configuration approach, the way to disable it is to just uninstall the module:

npm remove @vue/cli-plugin-eslint
like image 64
Wossname Avatar answered Oct 16 '22 17:10

Wossname


As of 2019, March :

In the vue.config.js :

module.exports = {
  ...
  lintOnSave: false
  ...
}
like image 117
Aakash Avatar answered Oct 16 '22 17:10

Aakash