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 declaration-block-no-duplicate-properties reported ranges and refactor to use fix callback instead of context.fix #7758

Merged
merged 5 commits into from
Jun 14, 2024

Conversation

Mouvedia
Copy link
Member

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

#2643

Is there anything in the PR that needs further explanation?

Previously the rule always reported the last duplicate which wasn't the one being removed—if fixed—in the majority of cases.
An example of a case in which the rule did report correctly the duplicate that would be removed, was if the duplicate that remained was !important and placed before the last duplicate.
i.e. demo

Now it always reports the duplicate that will be removed.
It also helps for the diff between the range of the warning and the range returned by fix.

Copy link

changeset-bot bot commented Jun 13, 2024

🦋 Changeset detected

Latest commit: 3119006

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 Author

@ybiquitous previously I could re-run individual tests that failed due to cacheStrategy is "metadata".
Now the retry button is missing from the interface, did something change with the action?

@ybiquitous
Copy link
Member

@Mouvedia Sorry for the inconvenience. We (owners) are reconsidering and assessing the Contributors team's permissions for several reasons. I just granted you permission to write since you have been so active recently. Please let me know if you are still having any trouble. 🙏🏼

@Mouvedia
Copy link
Member Author

We (owners) are reconsidering and assessing the Contributors team's permissions for several reasons.

Is one of the reason the fallout of the xz backdoor? Did contributors had too many rights?

@Mouvedia Mouvedia requested a review from mattxwang June 14, 2024 02:24
@ybiquitous
Copy link
Member

Right, it's one reason.

@ybiquitous
Copy link
Member

Now it always reports the duplicate that will be removed.

Sounds good. Can you add a changelog item for this? I think it's a bug fix.

@Mouvedia
Copy link
Member Author

I think it's a bug fix.

I consider it a preference or laziness on our part.

Can you add a changelog item for this?

Ill add a changeset, sure.

@ybiquitous ybiquitous changed the title refactor declaration-block-no-duplicate-properties to use fix callback instead of context.fix Fix declaration-block-no-duplicate-properties reported ranges and refacto to use fix callback instead of context.fix Jun 14, 2024
@Mouvedia Mouvedia changed the title Fix declaration-block-no-duplicate-properties reported ranges and refacto to use fix callback instead of context.fix Fix declaration-block-no-duplicate-properties reported ranges and refactor to use fix callback instead of context.fix Jun 14, 2024
Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

Thank you. LGTM 👍🏼

@Mouvedia Mouvedia merged commit 2be7072 into stylelint:main Jun 14, 2024
17 checks passed
@Mouvedia Mouvedia deleted the dbndp-refactor branch June 14, 2024 06:32
@Mouvedia Mouvedia mentioned this pull request Jun 22, 2024
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