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

Published on April 10, 2020 17 sec read

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. 🙂

Monthly Newsletter

One email a month, packed with the latest tutorials, delivered straight to your inbox.
We'll never send any spam or promotional emails.

Hey, I'm Md Obydullah. I build open-source projects and write article on Laravel, Linux server, modern JavaScript and more on web development.