Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 162451 - Perference page for javascript validation
Summary: Perference page for javascript validation
Status: RESOLVED DUPLICATE of bug 243886
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-26 13:15 EDT by John J. Barton CLA
Modified: 2010-03-03 11:17 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John J. Barton CLA 2006-10-26 13:15:06 EDT
Currently the ATF javascript validation reports errors for cross browser validation.  That makes it worthless and counter productive for XUL development. Simply being able to allow "const" would be a big improvement.  To avoid reducing function for existing users this should be a preference setting, possibly per project or resource.
Comment 1 Robert Goodman CLA 2006-11-27 12:01:30 EST
Could you attach a file where you are seeing this problem? This will help us better understand the problem. 
Comment 2 Adam Peller CLA 2006-11-27 13:21:48 EST
XUL supports a variety of language extensions which, I believe, are specific to the Mozilla Javascript implementation.  We deliberately wanted the validation to help with cross browser DHTML development, where allowing such conventions would be counter productive.

I agree, such a setting would be helpful.  I don't recall off-hand how well Rhino is configurable for these options.  JSLint likely would have to be turned off to avoid reporting such errors.

I've also wondered in the past whether some sort of convention for a "pragma" like directive would be helpful such that the IDE could apply the appropriate validation on a per-file basis.  Other pragmas might include jscript, actionscript, etc...
Comment 3 Robert Goodman CLA 2007-08-20 11:32:22 EDT
Moving this to the new JSDT component, since the validators in ATF are being dropped in favor of the validation done by JSDT.
Comment 4 Chris Jaun CLA 2009-09-15 10:11:35 EDT
JSDT now has an option to turn of semantic validation. That avoids the error messages on the "const" keyword.

Window > Preferences > JavaScript > Validator > Errors/Warnings

Uncheck "Enable semantic validation".

*** This bug has been marked as a duplicate of bug 243886 ***