How to Solve “unexpected console statement” in Node.js & Vue.js

In this short tutorial, I’m going to show how to solve “unexpected console statement” in Node.js and Vue.js.


Create a .eslintrc.js in the directory of the project and put the following contents in it:

module.exports = {
    rules: {
        'no-console': 'off',


Open package.json and under section eslintConfig put no-console under rules and restart dev server (npm run serve or yarn serve).

"eslintConfig": {
  "rules": {
    "no-console": "off"
The article is over. Thanks for reading. ?