Tag Archives: error: Unexpected console statement (no-console)

How to Solve error: Unexpected console statement (no-console)

Solution: modify “rules”: {} in eslintconfig: {} in package.json and add a line of code: “no console”: “off”

NPM install after saving

"eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "rules": {
      "no-console": "off"
    },
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },

or:

window.console.log(“…”)