jshint / jshint

JSHint is a tool that helps to detect errors and potential problems in your JavaScript code
http://jshint.com
MIT License
8.99k stars 1.65k forks source link

Provide built-in JSON reporter #3550

Open ybiquitous opened 3 years ago

ybiquitous commented 3 years ago

Hi there,

I‘m wondering why JSHint has not provided a built-in JSON reporter. Currently, 3 reporters are provided:

https://github.com/jshint/jshint/blob/7c36c8102bf4a0490820c824f5f01ad1acece36f/src/cli.js#L17

I can use a 3rd-party JSON reporter jshint-json, but I think it would be wonderful if we could use a JSON reporter more easily without any extra installation.

For example, I have just written a custom reporter to output a JSON report:

https://github.com/sider/runners/blob/83b73bf27552cffb63906feb757b2e23161c73a3/images/jshint/custom-json-reporter.js

What do you think about this suggestion? I would appreciate your feedback. Thank you.

jugglinmike commented 3 years ago

Hi there! JSHint's "custom reporter" feature is how we give consumers fine-grained control of JSHint's output without the formal approval of the maitenance team. It's also a benefit to the maitenance team because it helps us limit the amount of code that we're responsible for.

I'd be happy to offer another built-in reporter, but I would like some indication that folks would use it. Honestly, at this stage in JSHint's lifetime, it seems unlikely that there's enough demand to warrant even a small feature like this, but I'm happy to be proven wrong! So if anyone would be interested, leave a positive "reaction" on @ybiquitous's original feature request above.