Some simple steps to check your JavaScript Code with JSLint:
- download and install JSRhino
- make it somehow available, e.g. create a js.bat (one line: java -jar "path/to/rhino/js.jar" %* )
- download JSLint and put it in some folder, e.g. /path/to/jslint.js
- Add an external tool configuration in Eclipse:
Location: path/to/js.bat
Working Directory: ${workspace_loc}
Arguments: path/to/jslint.js ${resource_loc}
- you can now check your JavaScript code with JSLint by calling this external tool.
Enjoy.
P.S.: There is a very interessting talk by Douglas Crockford (creator of JSON and JSLint) at google tech talk that highlights the good and bad aspects of JavaScript. I liked that a lot.