Disable specific JavaScript error checking in Eclipse

I am trying to use Eclipse for JavaScript (Eclipse IDE package for Java EE Developers).

My project uses Bluebird (an implementation of promises), and therefore it has many lines, for example:

somePromise.catch(function(err){... 

Eclipse considers the error to be an error, probably because it believes that "catch" is a reserved keyword that cannot be used as the name of a method. The same goes for the promise. Perhaps this is correct, but I would prefer not to switch to another library just because of this.

Is there a way to make it ignore these specific errors (but keep reporting other errors in the same files)?

+8
javascript eclipse validation
source share
1 answer

This has been reported and fixed not so long ago in this error: https://bugs.eclipse.org/bugs/show_bug.cgi?id=443876

Go to Preferences-> Javascript-> Validator-> Errors / Warnings and uncheck the new option "Strict check on the use of JavaScript keywords." That should fix it.

I had the same problem and before that a plugin was implemented that controlled the JSDT bytecode at boot time to disable this error. Now these hacks are not needed.

+7
source share

All Articles