0

In the pydev liclipse editor how do add javascript folders so that it doesn't show errors in javascript files, such as $ is undefined (doesn't know jquery is also loaded when file is run).

I have tagged it with eclipse but this is a fork built around pydev "liclipse" so i don't see "javascript" as a project type.

TIA

2 Answers 2

1

Well, the LiClipse validator currently integrates JSHint internally (with Rhino), and there's no option to disable it...

Still, you can add a comment to the top of the file so that it knows that some symbols are expected to be undefined.

I.e.: if you add:

/*global $:false,alert:false*/

to the top of your file, the $ and alert symbols won't be triggered as not-defined.

1

I don't know anything about liclipse, so can't be certain my answer is correct. But I'd guess you will need to install some Javascript tooling in order to properly handle javascript code and projects. The options for Eclipse are not great, but there are JSDT and VJet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.