How to Solve “unexpected console statement” in Node.js & Vue.js
In this short tutorial, I’m going to show how to solve “unexpected console statement” in Node.js and Vue.js.
Node.js
Create a .eslintrc.js in the directory of the project and put the following contents in it:
.eslintrc.js
module.exports = {
rules: {
'no-console': 'off',
},
};
Vue.js
Open package.json
and under section eslintConfig
put no-console
under rules
and restart dev server (npm run serve
or yarn serve
).
package.json
...
"eslintConfig": {
...
"rules": {
"no-console": "off"
},
}
...
The article is over. Thanks for reading. ?Md Obydullah
Software Engineer | Ethical Hacker & Cybersecurity...
Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.