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 report flags not reporting on subsequent runs when cache is used #7483

Merged
merged 1 commit into from Jan 22, 2024

Conversation

ybiquitous
Copy link
Member

The bug's reason is that the stylelintError/stylelintWarning properties in a lint result object are not set when styelint-disable comment problems are reported.

Also, this change refactors the code around styelint-disable comments to make it more readable and prevent possible bugs.

The new code uses Result#warn() in PostCSS for a comment node, like reporting a normal rule problem.

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

Closes #5049

Is there anything in the PR that needs further explanation?

No, it's self-explanatory.

The bug's reason is that the `stylelintError`/`stylelintWarning` properties
in a lint result object are not set when `styelint-disable` comment problems are reported.

Also, this change refactors the code around `styelint-disable` comments
to make it more readable and prevent possible bugs.

The new code uses [`Result#warn()`](https://postcss.org/api/#result-warn) in PostCSS for a comment node,
like reporting a normal rule problem.
Copy link

changeset-bot bot commented Jan 21, 2024

🦋 Changeset detected

Latest commit: eff7f9d

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

@Mouvedia
Copy link
Member

Mouvedia commented Jan 21, 2024

Also, this change refactors the code around styelint-disable comments to make it more readable and prevent possible bugs.

I think keeping these refactors in a separate commit would help the reviewers.

@ybiquitous
Copy link
Member Author

I think keeping these refactors in a separate commit would help the reviewers.

Sorry. I forgot to do that at this time. 🙏🏼

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.

LGTM, thank you!

@ybiquitous ybiquitous merged commit 382961f into main Jan 22, 2024
15 of 16 checks passed
@ybiquitous ybiquitous deleted the issue-5049 branch January 22, 2024 14:49
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.

Fix report flags not reporting on subsequent runs when cache is used
3 participants