Snippets

Vuejs error - Unexpected console statement (no-console)

If you using Vue CLI and you are trying to print out something in the console, you might face this problem at the beginning of your project.

In your component, if you use console.log() you might face this issue that -

__ vuejs error: Unexpected console statement (no-console) __.

It's because the rules are not defined in the package.json file.

So, go to the package.json file in your project and add this line-

...
"rules": {
      "no-console": "off"
    }
...

Now run your project, it should be fine.

Thanks.