Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A more interactive result list? #112

Open
moniuch opened this issue Aug 24, 2023 · 2 comments
Open

A more interactive result list? #112

moniuch opened this issue Aug 24, 2023 · 2 comments

Comments

@moniuch
Copy link

moniuch commented Aug 24, 2023

What a life saver it is! Thank you that you have ever decided to publish this sweet little package that allows to target one specific rule in a way that I couldn't get eslint to, and get focused results. It made my day!

If there could be a way (a flag) to display the results in even more interactive way?

Level 1 - results grouped by rule

> rule1:      10
  rule2:       8
  rule3:       1

enter the selected rule at level 2

Level 2 - a configuration screen for the subsequent screen:

About to display the problem files for rule1. Sort:
> by path
  by number of problems

Level 3 - a list of clickable paths for selected rule, configured

rule1 (total: 10) - sorted by path:

another/path.ts    3
path/to/file1.ts   1
some/component.ts  6

that would be awesome.

Sort by name would allow to distribute work by owning teams.
Sort by number of problems would allow to prioritize work.

Currently I am getting short code snippets from eslint-formatter-friendly (from what I am reading in the README file) - which are not always a priority when doing some high-level overview. This could be a detail level 4. WDYT?

@IanVS
Copy link
Owner

IanVS commented Aug 24, 2023

Hi, I'm glad you find this useful. I'll need to think about your suggestion, it seems like it will require a lot more clicks and decisions for people who may not need the customization that you're looking for, so I wonder if there's another way to accomplish it, like exporting to a json or csv that you could then slice-and-dice however you wanted. Would something like that be useful? Or, perhaps the default order could be adjusted, or a summary provided at the end with paths and counts, as you show for level 3, similar to TypeScript. I think that last idea is my favorite, though it could be annoying to have to scroll up past a big list of paths to get to the actual errors...

@moniuch
Copy link
Author

moniuch commented Aug 24, 2023

I understand your concerns. But they could be easily solved. :)
In order to retain the current out-of-the-box experience, we could just add a cli flag that would allow user to opt-in for this more treeview-ish design that I am proposing.

Speaking of slicing-and-dicing - been there, done that, had to put up a simple tab-delimited formatter to feed the output later into Excel pivot table, it worked, but it was so tedious anyway. I was really thrilled to see today that someone took these administrative chores one level up, and so I wouldn't like to talk about workarounds here, but instead about extending this great Dx (or Hx => Human Experience) that I got from your library.

I think this sort of administrative tasks belongs to a different "persona" that might be trying to use your package.
Not sure how I could help, but I'd be glad to share some insights if you care.

though it could be annoying to have to scroll up past a big list of paths to get to the actual errors...

Looking again at my Level 3 proposal, I think I might have been imprecise. The list of the issues summary would also be interactive. Hitting enter would show the running scrolling list of snippets, so it should have been instead:

rule1 (total: 10) - sorted by path:

  another/path.ts    3
> path/to/file1.ts   1
  some/component.ts  6

to indicate it better. I believe that for the administrative persona, seeing the snippets is not as important as seeing the scale of problems, so the Level 3 would most often be the last level they reach (just my guess).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants