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
Add tally of fixable problems to string
and verbose
formatters
#7539
Conversation
🦋 Changeset detectedLatest commit: ef51335 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@m-allanson Thanks for the pull request.
That sounds good to me. But I am concerned about a case of 0 errors and some warnings, e.g.
In this case, using |
string
and verbose
formatters
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Thanks for the review @ybiquitous 👍 This is updated and ready for another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. This PR is almost okay. But I just commented on a refactoring, so can you take a look?
cf9992e
to
84ba4d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM 👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests look good to me.
Closes #7338
This PR adds a count of potentially fixable problems to the string formatter's output. e.g.
The line
1 error and 1 warning potentially fixable with the "--fix" option.
is new.In adddition, I've adjusted the formatting slighty, to ensure that the most important line (the problem count) is still visually distinct. This new formatting imitates eslint's default output.
The formatting changes are:
×
in front of the problem count, to highlight that lineFormatting examples
Here are examples of the formatting changes, excluding the new fixable counts.
Old formatting:
New formatting: