jshint/node-jshint — pull request #64 by hallettj (2011-12-15 04:06:47+00:00)
Title: Fix issue #63, accepts input via stdin

To read files from stdin, give a dash (-) in place of a file path. For example:

cat some_file.js | jshint -

This matches the conventions of established Unix tools like grep.

The implementation in this changeset is platform dependent, since the only way that I know of to read from stdin synchronously is to call `fs.readFileSync('/dev/stdin', 'utf-8')`. I also put together an async refactor that might allow reading from stdin to work on platforms that do not have a /dev/stdin file (i.e. Windows). But that would be a much bigger change.