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

Published on Apr 10, 2020

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

Node.js

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

.eslintrc.js
module.exports = {
    rules: {
        'no-console': 'off',
    },
};

Vue.js

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

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

Comments (0)