Skip to content
jamespadolsey edited this page Sep 13, 2010 · 8 revisions

The reporting level can be set to anywhere between zero (everything off) to three (everything on), via jQuery.LINT.level.

Level 0 reports:

  • Nothing.

Level 1 reports:

  • Incorrect argument signatures. The correct argument signatures are defined by the API — jQuery Lint includes a skinny version of the API which it references to determine whether or not you’re passing the correct arguments.
  • Errors thrown by calls to jQuery methods — usually as a result of incorrect argument signatures.

Level 2 reports:

  • Everything above.
  • Using the same selector twice, and the returned collection being the same both times. If you use the same selector more than once, and the returned collection is the same both times then you should probably be caching the first selection, instead of making subsequent identical selections.
  • Using selectors that don’t return anything. jQuery operates fine with empty collections, but Lint will still bring up a warning if this happens.

Level 3 reports:

  • Everything above.
  • Not taking advantage of combined property definitions, via css({...}) or attr({...}) or even bind({...}) (in 1.4).

You can add your own custom checks too: API

Clone this wiki locally