Christophe Ross - 2012-11-18


Thank you so much for this very useful program.
I already had an HTML validator and a CSS validator: I just discovered this too.

But I am lazy and don't like typing command lines!
And the file I want to check isn't usually in an open folder window (so the context menu method doesn't help).
So I use my own program 'setFileArg' to run JavaScript lint.

I have created a batch file which contains

C:\usr\bin\setFileArg.exe C:\usr\bin\JSlint\jsl.exe -fin -filetype "js" >%temp%\jsl.log -conf C:\usr\bin\JSlint\jsl.conf -process
C:\PROGRA~1\NOTEPA~1\NOTEPA~1.EXE %temp%\jsl.log

and a '.pif' file in my Start menu to run the batch.
(Change all the paths etc for your own configuration.)

Now when I click, my program runs JavaScript lint with the arguments in the batch file.
But first it starts by opening a WIndows file selector to pick the file to validate, then it adds its pathname to the end of the command line (after "-process") - that is because of the  option (otherwise the file name would be put at the start of the command line).
The  option tells the file selector to only show '*.js' files (it is '*.*' by default).
The output is redirected to a log file, and when lint has finished the log is opened in my text editor.

The Windows Common Dialog file selector remembers the last directory used, so when I am working on a project the '.js' files are immediately available for selection each time.

The program 'setFileArg' is available for download (free, public license) from my site - Menu "Programmes" -> section "Utilitaires bitwyse".
There are more detailed explanations and I have now added JavaScript lint as an ideal example of how to use it.

If you have any questions or suggestions there is a contact form - and I will come back here also.

(Computer engineer, programmer in 'C', HTML, CSS and JavaScript