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.

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. šŸ™‚

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

Hey, I'm Md Obydullah. I build open-source projects and write on Laravel, Linux server, modern JavaScript and more on web development. If you enjoy my content, please consider supporting what I do!

Follow Buy me a coffeeBuy me a coffee

Leave a Reply

Your email address will not be published. Required fields are marked *