yuschick / stylelint-plugin-defensive-css

A Stylelint plugin for enforcing defensive CSS best practices.
https://defensivecss.dev/
MIT License
138 stars 4 forks source link

Grouping Selector Rule #38

Closed coliff closed 2 months ago

coliff commented 2 months ago

Describe the bug With the following CSS

input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

image

I don't expect this to generate a warning about grouped selectors since they are both webkit.

Expected behavior I think This plugin should ignore grouped vendor prefixed selectors in this case.

Details

I am using an older version of this plugin (v0.10.4) as I need to use Stylelint v15. Sorry if this was fixed in a newer update and I didn't realize. :-) It would be good to have a changelog / release notes somewhere

yuschick commented 2 months ago

Thanks for reporting. This is still a bug in the latest version.

First, I will get this fixed up. Which I know doesn't help you at your version. I'm not sure how to support both v15 and v16 at the same time.

Also, I would like to look into auto generating changelogs, but haven't had a chance to. But you're very right, that would be beneficial to have.

Thanks again for reporting, I will post here when I get this bug resolved in the event you can upgrade. But I'll continue looking at how to support both versions. Sorry for making this dificult.

yuschick commented 2 months ago

Okay, this was fixed in 1.0.2. https://github.com/yuschick/stylelint-plugin-defensive-css/commit/37b4ae6372f30ac28fbfc6d2f5526b52572e5d1a

So I will close this, but have a note here:

Thanks again for reporting.

coliff commented 2 months ago

thanks for the quick fix. Don't worry about supporting Stylelint v15 :-) I'm sure nearly everyone can use Stylelint v16 which has been available for a while now. I just needed Stylelint 15 because my project was on an old unsupported Node version which Stylelint 16 no longer works with. Thanks again for your work on this project 👍

For the automated release notes, you could use a GitHub Action like I have here: https://github.com/coliff/bootstrap-forced-colors-css/blob/main/.github/workflows/release-notes.yml

Then have a config which categorizes the changes like this: https://github.com/coliff/bootstrap-forced-colors-css/blob/main/.github/release-drafter.yml

Works great, and then the releases page will be something like this: https://github.com/coliff/bootstrap-forced-colors-css/releases

yuschick commented 2 months ago

Well, I now know what I am looking at this weekend. Thank you for sharing!