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

support sort rules by error count #298

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

support sort rules by error count #298

tjx666 opened this issue Aug 24, 2023 · 2 comments
Labels
Type: Feature New Feature

Comments

@tjx666
Copy link

tjx666 commented Aug 24, 2023

Expect:

I wany to sort the rules by error count instead of rule name.

image

Why:

  1. I want to fix the rule with many errors one by one. And then fix the all rule with few errors one time.
  2. By sort the rules with error count, I can see which rule annoy user most

Solution

provide option --order which support enum string:

  • 'error'
  • 'warning'
  • 'fixable'
  • 'suggestion'
@mizdra
Copy link
Owner

mizdra commented Sep 23, 2023

I understand your needs. However, I am concerned that the UI for sorting will be complex and difficult for users to use.

Some users may want to specify multiple columns to sort (e.g. --sort="error, fixable"). They may also want to specify the order to sort (e.g. --sort="error DESC, fixable ASC").

In addition to sorting records, some users may want to filter records (like #296). Or some users may want to search for matching records by entering keywords. And it is difficult to build such a complex UI on the console.

In the first place, with the command line option sorting mechanism, if you want to change the sorting method, you will have to restart eslint-interactive. This makes users uncomfortable.

While the sorting feature is certainly useful, I feel that it is difficult to achieve a user-friendly UI. Therefore, I am reluctant to implement this feature. Of course, I welcome any good ideas you may have!

@mizdra mizdra added the Type: Feature New Feature label Sep 23, 2023
@mizdra
Copy link
Owner

mizdra commented Sep 23, 2023

Fortunately, eslint-interactive provides Programmable API. It allows users to implement their favorite eslint-interactive GUI client.

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

No branches or pull requests

2 participants