I am using Jquery and JSLint reports many undefined variables, all of which come from JQuery. But if I try using jsl:import to bring in JQuery, JSLint reports many 'exciting' errors in JQuery. How do I import JQuery, but have JSLint not also 'lint' it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using Jquery and JSLint reports many undefined variables, all of which come from JQuery. But if I try using jsl:import to bring in JQuery, JSLint reports many 'exciting' errors in JQuery. How do I import JQuery, but have JSLint not also 'lint' it?
The best way is to either add this to your file:
/jsl:declare jQuery/
/jsl:declare $/
or to your config:
+declare jQuery
+declare $
If you're linting .htm files, you may have to edit your jQuery script to this:
/jsl:ignore/
(jquery contents)
/jsl:end/
Let me know how this works for you.
Matthias, thanks for that.
Paul DS.