Hi Guys, a +1 from me for better tools for JS development. It's a big challenge for us at the OU and it's set to grow. Either that or we're unable to implement major improvements that the rest of the web are implementing.
Just installed and used jshint for MDL-32750 on andrews suggestion. Was really simple to install and use. Thought I'd record the steps. Tim suggested here.
These instructions are for Windows 7 64 bit.
install node js
with an open node.js command line from above type npm install jshint -g
navigate in command line to the root directory of your moodle install.
Call jshint with the config options and path to the file to check.
Andrew has a jshint config file that sets the desired moodle code standards for jshint to use
I first used the line below and got the error "unexpected token".
Wrapped configs in double quotes to fix it e.g. "evil":false (Yep, jshint can be configured to be evil
Now you're ready. Check your code by typing...
jshint --config pathtoandrewsconfigfile pathtofiletocheck e.g.git\lib\editor\tinymce\yui\collapse\collapse.js