unexpected console statement no-console javascript [Solve]

featured Image

In this short post, we will see how we can fix the “unexpected console statement” error from node and vue.

In Nodejs:

If you are using NodeJs, then to fix this error, follow these steps:

  1. Create .eslintrc.js file in the project directory, and
  2. And set 'no-console': 'off' in the rules section.
module.exports = {
    rules: {
        'no-console': 'off',
    },
};

In Vue:

To fix the “unexpected error statement” error in your Vue project, follow these steps:

  1. open your package.json file.
  2. And now under the eslintConfig section, put "no-console": "off" under rules.
  3. Next, restart your development server using npm run serve or yarn serve .
...
"eslintConfig": {
  ...
  "rules": {
    "no-console": "off"
  },
}
...

Related Posts

git commands with example

Top 40 Git commands with Examples

GitHub has become an essential tool for developers to manage, store, and collaborate with other developers on software projects. With its simple powerful git-based version control system, GitHub allows users…

Read more
Check GitHub Account in the Terminal

Check GitHub Account in the Terminal

GitHub is an integral tool for developers to store, manage, and collaborate on software projects with other developers. And as we work more and more in the command line it…

Read more
featured Image

How to make list of objects in Netlify CMS using list and object Widget

Here in this Netlify CMS tutorial we will how easily we can make a list of objects using list and object widgets. This will allow us to add multiple objects…

Read more

Leave a Reply

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