Reputation: 387
I have a ejs variable inside a script tag which is just working fine but vscode throws error saying "Expression expected" Here is the code
<script type="text/javascript">
var currentUser= <%- JSON.stringify(currentUser) %>
console.log(currentUser);
</script>
but it is working im able to see the currentUser object in my browser console
Im not able to figure out what is causing this problem.Can please someone help me out with this?
Upvotes: 4
Views: 1762
Reputation: 779
update this setting in vs-code
"html.validate.scripts": false
source link: https://github.com/microsoft/vscode/issues/51118
Upvotes: 6