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

Fix incorrect output by all formatters except for json #6480

Merged
merged 3 commits into from Nov 18, 2022

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Nov 16, 2022

Which issue, if any, is this issue related to?

Ref: #6444 (comment)

Is there anything in the PR that needs further explanation?

In this pull request, I try fixing a few bugs over all the formatters except for jsonFormatter:

  • Add missing output by parseErrors
  • Fix output of warnings without rule and severity
  • Fix error Unknown severity: "undefined" with stringFormatter
  • Add missing output with unixFormatter summary line (consistency with string and verbose)

In line-oriented formatters, I think it’s necessary to preprocess lint warnings (problems) before outputting them to the console:

  • convert parse errors to warnings (only string did it)
  • normalize severity (warnings sometimes have no severity)
  • sort warnings by source location

- Add missing output by `parseErrors`
- Fix output of warnings without rule and severity
- Fix error `Unknown severity: "undefined"` with `stringFormatter`
- Add missing output with `unixFormatter` summary line
@changeset-bot
Copy link

changeset-bot bot commented Nov 16, 2022

🦋 Changeset detected

Latest commit: 80d8ded

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Patch

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

@ybiquitous ybiquitous changed the title Fix incorrect output by all formatters Fix incorrect output by all formatters except for json Nov 16, 2022
@ybiquitous ybiquitous marked this pull request as ready for review November 16, 2022 18:37
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fantastic clean up and series of fixes, thank you!

@ybiquitous ybiquitous merged commit 6683e1e into main Nov 18, 2022
@ybiquitous ybiquitous deleted the fix-all-formatters branch November 18, 2022 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants