Software Archive
Read-only legacy content
17061 Discussions

JSHint not recognising Jquery in Intel XDK

Mike_M_4
Beginner
642 Views

When programming in Intel XDK, whenever I edit a javascript file JSHint alerts me about errors (see below)  relating to JQuery, but JQery is working fine. Is there a way to hide these errors.

$ is not defined

document is not defined

 

Thanks

 

0 Kudos
2 Replies
Ad
New Contributor III
642 Views

See StackOverflow (xmnboy):: http://stackoverflow.com/questions/25634565/intelxdk-is-generating-errors-on-simple-javascript-code

What you're seeing are jshint errors generated by the linter in the Brackets editor that's built into the XDK.

You can configure the jshint errors you get either by using a jshint resource file or by putting the jshint directives directly in your code (at the top of the page). Here's what I usually start out with to keep the list down to a manageable set of errors:

/*jslint browser:true, devel:true, white:true, vars:true */
/*global $:false, intel:false */

And see http://www.jshint.com/docs/ and http://jslinterrors.com/ for some documentation regarding these directives.

 

 

0 Kudos
Mike_M_4
Beginner
642 Views

Thanks ad d for getting back to me.

Your solution worked perfectly, thanks a lot :)

0 Kudos
Reply