Tuesday, November 1, 2011

Eclipse, WTP JavaScript Validator useless

WTP comes with JS Validator which is by default configured to
"Enable JavaScript semantic validation".

Defaults are set somehow but soon
you will have to turn OFF "the whole thing" because:

Optional Semicolon: Ignore
because of Dojo and other framework authors do not care

Local Variable is never read: Ignore
because it does not work, local.member is not considered reading local by WTP

Uninitialized local variables: Ignore
This is just JS style of me and many others

And after turning this all OFF, you will end up with
Type mismatch: cannot convert from any[] to any ItemFileWriteStore.js /dojo/data JavaScript Problem line 581
on simple lines like: var serializableArray = [];

Since this warning cannot be turned off (no UI item for this),
you must modify the plugin
or just turn WHOLE "SEMANTICS VALIDATOR" OFF.

Another piece of code that is useless, thanx for wasting my time again.

see also:
http://stackoverflow.com/questions/5765955/javascript-array-why-is-this-not-valid


Update:
Eclipse IDE for JavaScript Web Developers
eclipse-javascript-indigo-SR1-macosx-cocoa-x86_64.tar.gz
contains quite old version of the plugin:
plugin version org.eclipse.wst.jsdt.core_1.1.101.v201108151912.jar

No comments:

Post a Comment