macklinu / danger-plugin-tslint

Danger plugin for TSLint
MIT License
10 stars 3 forks source link

Feature Request: tslint() can accept JSON #38

Open wintermuted opened 5 years ago

wintermuted commented 5 years ago

Hi there macklinu,

First off, thank you for writing this plugin. It's pretty great. In using it, I discovered something that I think might be helpful for other users, and I'd love to help implement it.

I'm finding that I would like to be able to send the plugin the results JSON model after I've done some minor transforms on it. In this case, I'd want to only have it process the model after I have excluded non-modified files. An alternative to this is parsing this info in handleResults, but I find that I like the default behavior provided and do not want to reimplement it.

Right now, the implementation only accepts passing it a file path, but I believe we could support both scenarios, and perhaps even a scenario where an intermediary transform is allowed.

I think this would be pretty easy to support, and was curious if you'd be willing to review and accept a PR after I've had a chance to implement it. Thank you for taking the time to read this.

macklinu commented 5 years ago

Thanks for this issue, @wintermuted! A PR for accepting JSON input would be great - whatever helps make this plugin for useful for you and the community. I have not used this plugin in a while (hence all of the open Greenkeeper PRs), but I'd happily review a PR that would support your use case and/or make the API simpler for handling different sources of input (a file path, JSON data, etc.). 😄

wintermuted commented 5 years ago

Thank you for the response @macklinu ! I will get to work on it this week.

wintermuted commented 5 years ago

Hi @macklinu I opened a PR to help address this issue in #39. Hoping that you can take a look when you have a moment. CI is currently failing due to what seems like a dependency being out of date. I'll dig into this next.