webpack/jshint-loader — pull request #7 by Dashed (2014-07-04 06:21:16+00:00)
Title: Support custom reporters

Wondering about this after looking at
- https://github.com/sindresorhus/jshint-stylish
- http://www.jshint.com/docs/reporters/

As far as I can tell, `reporter` isn't defined via jshint options in node.js (wouldn't really make sense).

Input to a custom report would be similar to input to jshint reporters except like this:
```js
[
{
id: [string, usually '(error)'],
code: [string, error/warning code],
reason: [string, error/warning message],
evidence: [string, a piece of code that generated this error]
line: [number]
character: [number]
scope: [string, message scope;
usually '(main)' unless the code was eval'ed]

[+ a few other legacy fields that you don't need to worry about.]
},
//...
]
```

The array structure differ since all errors/warnings/info are associated to *only one* file, for every file the js-loader processes. Thus, traditional jshint reporters aren't compatible.

- If there is no custom defined reporter, the default one will be provided.
- Custom reporters are executed with the loader's context as `this`. This provides emit functions.

-------

Would this be a good idea? Let me know otherwise.

At the moment, I'm using this in my project.