Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 415501

Summary: JavaScript problems in plugins/esprima/serializer.js
Product: [ECD] Orion Reporter: Anthony Hunter <ahunter.eclipse>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Screen shot of the problem none

Description Anthony Hunter CLA 2013-08-20 11:40:23 EDT
I have Eclipse Kepler with the web development tools loaded.

I am getting a JavaScript error in plugins/esprima/serializer.js , as well as other warnings about missing semi colons.

The error in Eclipse is somewhat annoying as it is the only error in my self hosting workspace. It would be nice if we could make it go away.

In the Orion editor there are different errors in the same file, but in the same method, as well as other warnings.
Comment 1 Anthony Hunter CLA 2013-08-20 11:43:59 EDT
Created attachment 234580 [details]
Screen shot of the problem

Here is a screen shot of the problem in Eclipse.
Comment 2 Mark Macdonald CLA 2013-08-20 12:44:46 EDT
ECMAScript 5 allows reserved words to be used as field names [1], so this code is valid ES5.
 
Unfortunately JSDT's validator does not understand ES5 -- only ES3 -- and that seems unlikely to change anytime soon (see bug 232836). I would recommend turning off the Eclipse JS validation entirely, although I've never been able to figure out how to do this (maybe [2] will help?).

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Reserved_Words#Reserved_word_usage

[2] http://www.eclipse.org/forums/index.php?t=msg&th=172311/
Comment 3 Anthony Hunter CLA 2013-08-20 13:40:12 EDT
(In reply to comment #2)
> ECMAScript 5 allows reserved words to be used as field names [1], so this
> code is valid ES5.