Closed mcandre closed 9 years ago
node-jslint
supports the double-star glob, so you can probably get what you want with
jslint /Users/andrew/Desktop/src/regenboog/**/*.js
or even
jslint /Users/andrew/Desktop/src/regenboog/**/*
If all you have in that hierarchy are javascript files.
I'm not familiar with node-jslint-all
. It looks like it hasn't been updated in a while (it still uses edition 2011-04-21
), but if there's specific behavior from it that you'd like to see included, can you file an issue and point out the relevant functionality?
Recursive globs are good, but in a large project, npm has trouble handling them.
$ npm run exec -- jslint **/*.js
bash: /Users/andrew/.nvm/v0.10.36/bin/npm: Argument list too long
Could we add a check for directory names, and have jslint explicitly glob them when present?
How about this --
$ find . -name *.js | xargs npm run exec -- jslint
Yes, I can write a unix find
command as well. But I would like for jslint to behave like this automatically, without requiring me to do that.
Since you are using grunt
you may wish to check out https://github.com/stephenmathieson/grunt-jslint which may provide traversal of the filesystem for you.
Closing, for reasons documented here: https://github.com/reid/node-jslint/issues/122#issuecomment-76546643
Thank you for making this feature request.
As a former JSHint user, I would appreciate the ability to JSLint all of my code at once, with
jslint .
But when I try this, I get an error:
As a workaround, I can use https://github.com/davybrion/node-jslint-all
Could we merge jslint-all into official jslint, so that recursive directory scanning happens out of the box?