The previous post detailed a way to simply run JsLint from TextMate. I put together this shell script that can be run as a command on the selected files in the project drawer and on the current document not in a project window, which is more robust than the previous script. I will try to upload a bundle for this later, but for now, you can create the command in the bundle editor yourself. Make sure that the input is none and that the output is set to the HTML option. Also, *very important*, make sure that you add the unix path to jsl to your shell variables in TextMate using the variable name “JSLINT”.
If you would like to see which files were skipped due to no error or warning, you can remove the “-nofilelisting” portion of the else statement in the for loop. I especially like the way that you can specify a URL in the html output in TextMate that will allow you to link back to documents that can be opened in TextMate, even down to the line. I’m not sure where that is referenced specifically, but its a pretty cool trick; I found that litte tidbit somewhere out there – I lost it in my browser. Anyway, the above script dumps your jslint output in the HTML output window, and clicking the links for the errors will take you to the document and line where the error was found.