Programmer’s Notepad and JSLint
I’ve been using Programmer’s Notepad for some time now as my go-to text editor for code. It’s simple to use and really robust and over all just a really great tool. As the Javascript I write has gotten more and more complicated, I’ve found myself often hitting up Douglas Crockford’s JS Lint to sanity check what I’m doing. When I found out that Textmate offered JSLint integration via a bundle I have to say I was pretty jealous.
Then I stumbled across a post from Simon Steele, the developer of Programmer’s Notepad.
Tools I Rely On – Those I Use From PN
So now I knew that you could use JSLint from within Programmer’s Notepad, and had a starting point in the link he provides to the Windows Scripting Host compatible version. I began stumbling around the tools menu in PN, trying to figure out how to get the jslint.js file I had downloaded to be usable as a tool. I figured it out with some help from Simon on the PN forums, Issues with using JSLint as a tool.
With that in place, I was able to get JSLint working as a easily-called tool within PN. With a simple keystroke I can sanity check my JS for all sorts of nasty behaviors, it’s totally awesome. Here’s a quick walkthrough I wrote up after mentioning this on a Yahoo! internal mailing list and getting a question about it.
- Downloaded the WSH version of JSLint from http://jslint.com/wsh/index.html and copied it into a tools subdirectory in the Programmer’s Notepad directory (just for ease of referencing).
- Added a new tool for Javascript files:
Tools -> Add Tools -> Scheme: Javascript -> Add - Settings are as follows:

Those settings allow for double-clicking the JSLint output line and having PN jump to it, which is really handy. Unfortunately it stops after every error and always complains about a null character at the end of files, but those are minor annoyances. It works really well and is pretty quick to get started, which I appreciate.
I’d love to get it so that it’ll run JSLint every time I save a .js file, but I don’t think PN supports that for tools yet. Something to ask about on their forums, I suppose.
February 5th, 2008 Comments Off



