Issue Type: Bug
Code marks <%= %> and <% %> expressions in .ejs files as wrong and marks them red with the hint "[js] Expression expected". But this should be allowed in ejs files. Brackets for example has no problems with it.
VS Code version: Code 1.23.1 (d0182c3417d225529c6d5ad24b7572815d0de9ac, 2018-05-10T17:11:17.614Z)
OS version: Windows_NT x64 10.0.17134
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (4 x 2594)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: enabled
video_encode: enabled
vpx_decode: unavailable_software
webgl: enabled
webgl2: enabled|
|Memory (System)|7.82GB (4.14GB free)|
|Process Argv|C:Program Files\Microsoft VS Code\Code.exe|
|Screen Reader|no|
|VM|0%|
Extensions (2)
Extension|Author (truncated)|Version
---|---|---
vsc-material-theme|Equ|2.1.0
vscode-language-pack-de|MS-|1.23.3
We open ejs files with the HTML language mode without understanding the ejs syntax.
Ideally, there will be a real EJS exension that can properly handle the EJS syntax. From our side we have no support planned.
As a workaround, you can disable the scripts validation for HTML:
"html.validate.scripts": false
Ok, thank you. Would be nice if there was support in future.
really great help, thanks
Proper EJS support would ideally come from an extension. The HTML language support does't know of the many templating languages, and it really shouldn't.
We have #49210 to come up with a simpler way of using the HTML mode for templating languages.
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding and happy coding!
Most helpful comment
We open ejs files with the HTML language mode without understanding the ejs syntax.
Ideally, there will be a real EJS exension that can properly handle the EJS syntax. From our side we have no support planned.
As a workaround, you can disable the scripts validation for HTML:
"html.validate.scripts": false