Eslint: How to disable "unexpected console statement" in Node.js? Eslint: How to disable "unexpected console statement" in Node.js? javascript javascript

Eslint: How to disable "unexpected console statement" in Node.js?


Create a .eslintrc.js in the directory of your file, and put the following contents in it:

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


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 */


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"    },    ...