Expecting newline or semicolon in AngularJS PUG/HTML templates

Hello, I'm having this issue for so much time already and am always looking for a solution and never found it.

I have a project which part of it is AngularJS. All HTML is made in PUG/Jade and all the times I have a specific syntax I have this error coming on IDE (I use PHPStorm 2020.1.2 - but have this problem maybe since 2017.*).

So on all ng-repeat or all ng-options where I use "x as y for z in []" I have this problem

How do I disable it? It freaks me out! haha

I tried disabling all javascript and html inspections and it just keeps there. And those are the only options it shows me when I open the issues menu:

Thank you :)

3 comments
Comment actions Permalink

Please follow https://youtrack.jetbrains.com/issue/WEB-28294 for updates

For now, I can only suggest turning the syntax highlighting off for such files to avoid errors: open your file in editor, click the Hector icon in the lower right corner and then move the slider to change the Highlighting level to None. See https://www.jetbrains.com/help/phpstorm/disabling-and-enabling-inspections.html#change-highlighting-level-for-file.

0
Comment actions Permalink

Thank you for your response, Elena.

The problem of that is that real errors won't be reported. It will be an issue even bigger in our case. As we have this so often and in some massive files. If it was possible to turn off only this specific inspection type it would be amazing.

0
Comment actions Permalink

This is not an inspection but a low-level parser error. Such errors can't (and shouldn't) be suppressed.

0

Please sign in to leave a comment.