close

[Solved] Eslint: How to disable “unexpected console statement” in Node.js?

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Eslint: How to disable “unexpected console statement” in Node.js? in javascript. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Eslint: How to disable “unexpected console statement” in Node.js? Error Occurs?

Today I get the following error Eslint: How to disable “unexpected console statement” in Node.js? in javascript.

How To Solve Eslint: How to disable “unexpected console statement” in Node.js? Error ?

  1. How To Solve Eslint: How to disable “unexpected console statement” in Node.js? Error ?

    To Solve Eslint: How to disable “unexpected console statement” in Node.js? Error For vue-cli 3 open package.json and under section eslintConfig put no-console under rules and restart dev server (npm run serve or yarn serve)

  2. Eslint: How to disable “unexpected console statement” in Node.js?

    To Solve Eslint: How to disable “unexpected console statement” in Node.js? Error For vue-cli 3 open package.json and under section eslintConfig put no-console under rules and restart dev server (npm run serve or yarn serve)

Solution 1

You should update eslint config file to fix this permanently. Else you can temporarily enable or disable eslint check for console like below

/* eslint-disable no-console */
console.log(someThing);
/* eslint-enable no-console */

Solution 2

For vue-cli 3 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"
    },
    ...

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment