uɐʎɹ ррoʇ uɐʎɹ bio photo

uɐʎɹ ррoʇ uɐʎɹ

Hello. Is is me you're looking for?
robotic life signs.
makes noise, hears sounds, intafon.
affe auf deux roues.

Email Twitter Github Github Gist Last.fm Soundcloud Flickr

So for some reason before I had looked for jslint for doing error checking for javascript and found the one at jslint.com, which requires the installation of Rhino (which is actually also handy for other things); this version for some reason didn’t work out so well for me and was throwing some errors that weren’t really errors. Today I looked again and realized that http://www.javascriptlint.com/ actually has an OSX executable version of jslint. In terms of ease of use, I would recommend this version since it requires no installation. Of course, this also means that I had to start working on integrating it into TextMate. I just gave it a first run, so this is still completely limited, and only works with the selected *files* in the project drawer:

eval arr=("$TM_SELECTED_FILES")
for (( i = 0; i < ${#arr[@]}; i++ )); do
    $JSLINT -process ${arr[$i]}
    echo "<br/><br/>"

The variable $JSLINT I have defined in the TextMate preferences in the “Shell Variables” tab of the “Advanced” preferences. Right now, all this does is run jslint on the selected files and adds a blank line in between the output for the different files. Hopefully I can put together something a bit smarter. Ideally, it would be great to be able to click a link that takes you to the document and specific line where the error is found.