[STICKY] JSlint - The JavaScript Verifier

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

JSlint - The JavaScript Verifier

Post 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 =)
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

An alternative "lint", which may give different results:
JavaScript Lint
-= Ho Eyo He Hum =-
Post Reply