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

New formatter #2560

Closed
rizowski opened this issue May 18, 2015 · 3 comments
Closed

New formatter #2560

rizowski opened this issue May 18, 2015 · 3 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion

Comments

@rizowski
Copy link

Would you guys be up to having a new formatter that only prints out the file name count of errors / warnings and leave out the details?

Use case:
I have built eslint-watch so I can quickly watch a directory without needing to pull in dependencies of webpack or grunt. I have a bunch of files that need to be linted over time and cannot be addressed all at once. It would be nice to have a formatter that will just print out the name of the file and the count of errors/warnings in the file so I at least get the list of files that need addressing for a full directory lint.

I can have a pull request up in a day or so.

@xjamundx
Copy link
Contributor

Is there any precedence for this in other linters of what something like this should look like?

@rizowski
Copy link
Author

It would just be a simple output of something like this:

./some/path/to/file.js (35)Errors | (0)Warnings
./some/path/to/this-file.js (4)Errors | (0)Warnings
./some/path/to/js-file.js (0)Errors | (12)Warnings
./some/path/to/and-file.js (2)Errors | (3)Warnings

As for precedence, it is just a formatter. However the webpack eslint plugin does lint all files on load, so I could see the benefit of having a formatter that doesn't spit out all the details on a file. As it makes a rather large log output if there are a lot of errors/warnings in each file.

@nzakas
Copy link
Member

nzakas commented May 18, 2015

I'd suggest making that as a custom formatter. You can pass any npm/JS name to -f and it will work.

@nzakas nzakas closed this as completed May 18, 2015
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

No branches or pull requests

3 participants