Page 1 of 1

JSlint - The JavaScript Verifier

Posted: Mon Jun 05, 2006 6:08 am
by Xuri
JSLint is a nice tool for anyone trying their hand at JavaScripting for UOX3. It's purpose: To look for and identify problems in JavaScripts.
Quote from JSlint website::
JSLint takes a JavaScript source and scans it. If it finds a problem, it returns a message describing the problem and an approximate location within the source. The problem is not necessarily an error, although it often is. JSLint looks at some style conventions as well as structural problems. It does not prove that your program is correct. It just provides another set of eyes to help spot problems.
It found a missing ; in one of my scripts, some cases of multiple variable definitions, and also suggested a bunch of syntax-related changes, which didn't fix any actual "errors" in my scripts, but still made the script more understandable. One thing I didn't quite get though, was the fact that whenever == null test is done, it will suggest to use === null instead. (Anyone got any clarification on that?)

Anyway, as with anything, use with care - don't go making big changes to any working scripts without backing them up first =)

Posted: Thu Aug 17, 2006 2:48 am
by Xuri
An alternative "lint", which may give different results:
JavaScript Lint