nzakas/eslint — pull request #122 by Bartvds (2013-07-23 19:17:05+00:00)
Title: added source-map support, 'path' reporter and fixtures for cli tests (again :)

Properly rebased as per #109 (thanks for bearing with me, I will master git one day :)

It is a lot of code but most of it are fixtures for testing of the added functionality, and the new `path` reporter (still called that by lack of alternative name).

But the action happens in /lib/cli:

1. You'll see how I have to pass the options through from cli.execute() to the point where it is needed.
1. Then after the regular validation I update the messages so they have their individual filePaths.
1. Then we check if the `-m` option was set and call the function to update the messages with the source paths and position.
1. Then regular flow commences and the formatters will just naïvely the updated position info.

Interesting is [this fixture](https://github.com/Bartvds/eslint/blob/7510abf62d5c78a56794829a526371075e23d85b/tests/fixtures/source-map-typescript/enabled-path.txt) as it tests how one javascript file generated paths to the 2 different source files (in this case TypeScript).

Here is a real world use-case of this in [a project](https://github.com/geraintluff/tv4) collaborate on: see these [split-up javascript source files](https://github.com/geraintluff/tv4/tree/master/source) (this was an old decision by the owner). It was not fun to lint these fragments (undef-hell :), or their concatenated output (annoying in looking up sources). With source-map support in the concatenator and my custom JSHint reporter it is peanuts.