This is an update to my previous post, Programmer’s Notepad and JSLint. After a few dev versions where the tools didn’t work they’re back in fighting shape. There were a few annoyances with my previous version around the actual running of JSLint. The WSH build of JSLint on www.jslint.com is set to return after only a single error & reads from Standard Input.
I finally got fed up enough with these limitations to figure out how to fix them.
- Grab the fulljslint.js from the very bottom of http://www.jslint.com/lint.html
- Grab wsh.js
- Concatenate the files together, I saved mine as C:\Users\Pcavit\tools\jslint.js for easy referencing via the %USERPROFILE% environment variable
- Then I had to modify the wsh.js portion to read in the file from disk instead of Standard Input & output multiple errors. Here’s my version:
(function () {
var fso = new ActiveXObject("Scripting.FileSystemObject"),
f = fso.OpenTextFile(WScript.Arguments(0), 1),
contents = "";
while(!f.AtEndOfStream) {
contents += f.ReadAll();
}
if (!JSLINT(contents, { browser: true, css: true, onevar: true, bitwise: true, regexp: true, newcap: true, immed: true })) {
var e, i, l;
for(i = 0, l = JSLINT.errors.length; i < l; i++) {
e = JSLINT.errors[i];
WScript.StdErr.WriteLine('Lint at line ' + e.line + ' character ' + e.character + ': ' + e.reason);
WScript.StdErr.WriteLine((e.evidence || '').replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
WScript.StdErr.WriteLine("");
}
WScript.Quit(1);
}
}());
Once you’ve done that you’ll want to change a few tools settings.

And now you can get multiple error output, with clickable errors. It’s totally awesome.

May 11th, 2010 Comments Off
This is gonna be a long one, so watch out. I’ve been collecting feeds of people who I consider to have really worthwhile things to say about my chosen career (web development, for the people who don’t know that about me already). I’ve got quite a list, and since I’m of the opinion that sharing is caring I will be providing a huge list of links to sites that I think are awesome and deserve your attention.
I make no claims that this list is authoritative, in fact I’d love feedback pointing out really smart people I missed. I read a lot of feeds but none are more dear to me than the ones contained with my “development” folder. Adding new items to it is a joy each and every time.
-
Usability/Design
-
Roger Johansson does a great job of covering usability issues on the web.
-
Harry Brignull and Andy Baker cover usability design both on the web and in client apps.
-
Usability fascinates me, and this is one of the best usability blogs I’ve ever seen. Updates are infrequent, but always incredibly insightful.
-
Bill Scott left Yahoo! for Netflix but we won’t hold it against him. His UI design comments are fantastic.
-
Another really fantastic UI blog. I wish there were a lot more done this well.
-
Web Development
-
Great writers and a ton of content makes this a great resource. Doesn’t update that often, but always great content.
-
Tiny little nuggets of web knowledge, updates infrequently but with useful info.
-
Ajaxian’s great about updating with the newest and greatest javascript libraries and techniques.
-
Small Design firm based out of Austria that posts nice wallpapers and some decent articles every now and then.
-
Monster collection of CSS tips and tricks, always a nice reference to have around.
-
Browser quirks, CSS techniques, all sorts of stuff. Updated rarely.
-
Unofficial group dedicated to promoting good Javascript, I can get behind that goal.
-
Crockford discovered JSON and writes great articles about Javascript best practices. Also see javascript.crockford.com and JSLint.com.
-
A Googler (we won’t hold it against him) yet he still loves YUI (yay!). Produces a lot of really interesting code snippets.
-
Mike Papageorge runs this general web developer resource/weblog. Good stuff though getting a little stale.
-
Firebug development blog, updates almost never but good to have a subscription to in case it does.
-
Isaac Schlueter is a fellow Yahoo! and writes some fantastic pieces about web development.
-
Garrett Dimon’s weblog is wonderfully minimal, yet still provides really great insights into the development process.
-
I worked with Hedger last summer, he’s a true mad scientist in the world of web developers. Seriously, I have no idea how he comes up with most of this but it’s insane and amazing.
-
Only occasionally development related, but still a good read.
-
Joe created Firebug, so you know he’s pretty damn smart. Too bad his site appears to be unloved these days. Staying subscribed just in case!
-
Author of JQuery and an all-around Javascript genius, I love reading about John’s continuing adventures.
-
Interesting observations about the web, definitely worth checking out.
-
Julien’s the author of the YUI compressor and consistenly posts things you should be reading.
-
Matt Snider does a great job of breaking down JS and investigating all the 8 bajillion frameworks floating around these days.
-
One of the main YUI guys, Nate’s super smart and consistently posts interesting stuff. Not always web dev related, but always worth checking out.
-
Great articles, wish they’d start updating again a bit more regularly.
-
Pete’s a Cold Fusion guy but still posts things that apply to web dev in general.
-
I like WordPress an awful lot, so keeping tabs on its development is a good idea.
-
Scott Schiller is a web dev genius. I have no idea how he’s so good at what he does, I wish I did. He’s at Flickr now, before that he worked on the really impressive new Y! Photos that was canned.
-
Django co-creator, Simon also writes a lot about OpenID.
-
Lots of good articles to be found here.
-
Lots of PHP talk, it’s good stuff.
-
Features new websites that do things well. Good for keeping up with the current state of web dev.
-
Vitamin is kind of like A List Apart, another big group of contributors writing amazing articles.
-
Keeping tabs on WP development, even if I don’t have my hands into the guts as much as I used to.
-
General Development
-
Jeff Atwood’s posts are always well thought out and engaging, I love his blog.
-
Joel Spolsky writes about software development from a very pratical place, having done quite a lot of it himself.
-
Programmer’s Notepad rocks my world. I use it every day and love it to pieces. Keeping up with releases via a feed is tops.
-
Rasmus is really, really smart. Not surprising, given that he wrote a bunch of PHP (the language itself, not just PHP code). He’s another Yahoo! as well.
-
Lots of good development tips to be found, as well as general programming talk.
-
Programmer’s Notepad author’s personal blog. The feed is just for the PN category, because that’s the programming related stuff!
And just in case you made it to the end of that huge list, here’s a link to everything I read on a not-at-all daily basis. It’s a little ridiculous. My Feeds.
February 13th, 2008 Comments Off
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