I have the following template in bootstrap.js file:
As you can see, WebStorm shows errors because it can't parse the source correctly.
I'm wondering if there is any way:
- to completely disable inspection on that particular region in the file
- wrap it in the comments and specify for the template engine to remove these comments when rendering template.
WebStorm provides no support for UnderscoreJS (WEB-679). But, as the syntax looks similar to EJS, you can try the following:
- associate the .js files with embedded template syntax with EJS file type, by adding
<file_name>.js
as a pattern there
- when associating, choose 'javascript' as template data language for these files