Menu

Do not lint imports (Jquery)?

2015-08-21
2015-08-22
  • Paul D Smith

    Paul D Smith - 2015-08-21

    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?

     
  • Matthias Miller

    Matthias Miller - 2015-08-21

    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.

     
  • Paul D Smith

    Paul D Smith - 2015-08-22

    Matthias, thanks for that.
    Paul DS.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.