Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to run JSLint as commandline in windows with help of node.js?

I mean to run it like this:

node.exe lint.js my_js_file.js

And then get output to a console.

What do I need to download ? Do I need just to save http://www.jslint.com/ to disk and then grab some attached js file or I need to look for special version for node.js ?

like image 881
rsk82 Avatar asked Feb 05 '14 00:02

rsk82


1 Answers

Install jshint globally then you can use it from the command line.

npm install -g jshint
jshint testfile.js

All this is assuming that you already have node and npm running on you windows machine.

Edit
I just noticed that I responded with an answer for jshint instead of jslint, the as the other answer points out, they are similar but not the same. My answer holds true for both though.
For jslint:

npm install -g jslint
jslint testfile.js
like image 61
makenova Avatar answered Oct 16 '22 08:10

makenova