I have a JS file where no matter what is placed on the first line (comment or code), PHPStorm generates a syntax error. When I hang over the error, the description says "Expected Expression." What does it look like:
Is this a bug with the IDE or something that can be disabled?
EDIT
File example here
You have a signature of the UTF-8 specification ( EF BB BF ) immediately before the line var myApp= (first line of code in this file)
EF BB BF
var myApp=
If you delete it, the IDE will stop complaining.
PSYes. In this case, the IDE should be smarter and should provide a better error message and error location. Feel free to send your new ticket to Tracker Issue at http://youtrack.jetbrains.com/issues/WI
In most cases, this problem occurs due to copying. There may be some characters / line that may need to be rewritten in your IDE.
In such cases, just copy your code into notepad and copy it back into your IDE again.