With this article, I wanted to do something completely different from my previous two. If you've read them, you saw that they are detailed descriptions of respective topics – somewhat like guides that arm you with complete knowledge on a subject.
The problem with that is – you leave the reader without something solid. You just can't write "Guide to .NET Reporting" that'll design reports that the reader needs. So, this time, I wanted to provide you with something you can use on a daily basis, without needing to chew on knowledge presented here or tailor it to fit your needs. I wanted to do something short, sweet, and immediately useful.
Show Me What You've Got
Here is the JSLint.VS in action on a file:
And, here it is validating a code statement:
Finally, here is JSLint.VS in action when the programmer decides to Build Solution:
How it Works?
JSLint.VS is a pretty standard Visual Studio add-in. I won't go into the basics, so if you lack knowledge about add-ins, you'll probably want to read an article like this to catch on the concepts.
As in any Visual Studio add-in,
Connect is the main class that handles the events of Visual Studio and executes the commands. In this project, it is used to register
OptionsForm is the interface with the user, enabling the configuration of JSLint.VS. You can see it in action in the image below:
To sum up everything said, here is the class diagram showing the main parts of the previously mentioned classes. You can also notice the additional, less important, helper classes – for holding data (
JSLintOptionsItem) and serializing
JSLint options to hard disk (
I left lots of comments in the code, so I'm sure that you'll manage on your own if you are into further extending this add-in. Requesting features through comments that I'll implement for you is always an option.