JSLint is a browser application developed by Mr Douglas Crockford as JavaScript code quality test tool.
Let's get right on it
This is the error shown if we didn't declare the global variable option.
Undeclared '$'.
The list of options can be found on the bottom of the JSLint's user interface.
Find the Global variables... part, then type
Find the Global variables... part, then type
$
.Test your jQuery coding once more...
Fix some things...
repeat...
...And have yourself a neat progrum
External script
This option is also useful for declaring a (custom) global variable from your own (custom) external script, which is not "there" on that particular application-depended-on-that-external-script you check.
Intended for browser
Remember to tick the a browser option if your script uses the
document
object keyword.
Window, console, and others
There are few object keywords which aren't "included" in JSLint, like:
window
console
- And maybe others...
BAM!
No comments
Post a Comment