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

Why only the top 5? #5

Open
peritus opened this issue Feb 14, 2017 · 5 comments
Open

Why only the top 5? #5

peritus opened this issue Feb 14, 2017 · 5 comments

Comments

@peritus
Copy link

peritus commented Feb 14, 2017

Here's what I do in my package.json:

{
  "private": true,
  "scripts": {
    "lint-report": "cat node_modules/eslint-detailed-reporter/lib/detailed.js|sed s/take(5)/take(10000)/ > node_modules/eslint-detailed-reporter/lib/detailed.js.fixed;mv node_modules/eslint-detailed-reporter/lib/detailed.js{.fixed,};./node_modules/eslint/bin/eslint.js src/ test/ -f node_modules/eslint-detailed-reporter/lib/detailed.js -o eslintreport.html"

to see more than the top 5 rule violations.

Reason for that is that I want to switch as many as possible from warning to error and starting at the bottom just works best for that.

Can you make the number of top violations to show configurable (yes, maybe 100 is a better default then 100000) ?

Also, would it be possible to also report the rules that do have 0 violations ?

@mportuga
Copy link
Owner

mportuga commented Mar 6, 2017

I originally chose 5, because in my own usage, I usually chose to tackle the worst case first. So I though any more than 5 would be too much.
I will see if I can make it configurable though, and just keep 5 as the default.
And what is the use case for wanting to see the rules that have no violations?

@peritus
Copy link
Author

peritus commented Mar 6, 2017

Thanks for making it configurable!

I have an eslintrc with some rules configured as err, some as warn. The moment the codebase has 0 violations for a rule configured as warn I want to switch it to err. That is easy if I fix the code in the same commit, but seing on the report which rules I could switch would.be great.

@davityavryan
Copy link

Hi guys,

Is this done already? can I configure to show all errors/warnings?

p.s. IMO it would be better to show all errors by default. could be configured to show top N though, but show all of them by default.

@mportuga
Copy link
Owner

You can still view all errors in the body of the files on the list bellow.

@CodySchneider
Copy link

ESLint doesn't seem to support passing arguments to formatters via command line other than through ENV vars: https://eslint.org/docs/latest/developer-guide/working-with-custom-formatters#using-environment-variables

Submitted PR to allow configuring the number of summary results.
#49

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

4 participants