imfivebyfive
imfivebyfive

Reputation: 13

WebStorm HTML formatting error - Expecting newline or semicolon

I am editing an HTML page in WebStorm. For some reason it's treating regular text like a JavaScript statement and throwing errors on code check 'Expecting newline or semicolon'. If the text is within an anchor tag it does not give an error.

Is this a bug? My JavaScript version is set to ES6.

HTML text showing an error:

enter image description here

WebStorm code check error:

enter image description here

Upvotes: 0

Views: 3819

Answers (1)

LazyOne
LazyOne

Reputation: 165088

  1. Go to Settings/Preferences | Editor | Language Injections
  2. Please remove 3rd rule from the bottom (the one that has "IDE" in Scope column)

You somehow (accidentally) created such wrong injection rule and now every <li> tag is treated as AngularJS hence the warnings.

Upvotes: 2

Related Questions