Closed maxf closed 12 years ago
Hey @maxf,
Instead of inventing a new output format, I'd propose using the --json
option for getting machine-readable output like this:
["lib/jslint.js",[{"id":"(error)","raw":"Unexpected /*property*/ '{a}'.","evidence":"module.exports = JSLINT;","line":6924,"character":8,"a":"exports","reason":"Unexpected /*property*/ 'exports'."}]]
Additional files would appear as additional JSON arrays separated by \n
— so one file per line.
But unfortunately, the JSON output in node-jslint is broken. I'll fix it.
Fixed in v0.1.3.
Additionally:
You should be able to use --json
now. Enjoy!
The current format for errors is something like:
Which doesn't work well within editors that try and parse it. Could you add an option to report one error per line, eg:
See http://lapin-bleu.net/riviera/?p=191 for details on how this causes issues with on-the-fly jslint validation in emacs