Even after checking a lot of EJS + VSCode related SO posts, I am unable to solve this problem. VSCode works fine with some EJS code but it shows problems with some others, I don't understand the reason behind this weird behavior.
In the image below VSCode seems to recognize the line const mbxToken = "<%= process.env.MAPBOX_TOKEN %>"
but VSCode doesn't recognize the line below it i.e. const campground = <%- JSON.stringify(campground) %>
.
How can I fix this problem OR stop VSCode from checking this particular file / line.
You will solve the problem in the following ways.
This would have solved the problem.
source link: https://github.com/microsoft/vscode/issues/51118