M
M
mrSeller2020-10-27 10:35:58
Vue.js
mrSeller, 2020-10-27 10:35:58

How to disable eslint error output in vue-cli?

There is one incredibly annoying thing about VUE-CLI - eslint errors are perceived as breaking the build, which often prevents something from being tested during development (for example: commenting out the use of some variable causes a debug screen on the project and requires either to use the variable, or remove its initialization).

How to disable eslint tracking in development mode? (so that any mention of eslint remains only in the console and code editor)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-10-27
@mrSeller

Change the rules depending on the environment. Like this:
Example .eslintrc.js:

module.exports = {
  // ...
  rules: {
    // override/add rules settings here, such as:
    'vue/no-unused-vars': proccess.env.NODE_ENV === 'production' ? 'error' : 'warn'
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question