yuschick/stylelint-plugin-defensive-css

vendor-prefix-grouping also reports pseudo-elements in CSS

aakashgill opened this issue · 7 comments

Hi
I tried this plugin with vendor-prefix-grouping rule, but it turns out it's giving warning even for pseudo-elements in CSS.
Shouldn't it only report where vendor-prefixes are being used?

Attaching screenshots:

new-styles-code

new-styles

Stylelintrc
image

Thanks for the screenshots. I will take a look at getting this fixed this week.

@aakashgill

Testing this now, and a selector with multiple pseudo-elements passes as expected.

What line is throwing the initial error in the file you showed, line 237? I wonder if there may be an issue stemming from there, because I don't see any linting underlines in the pseudo-selector screen shot.

Look at line number 634 in the screenshot.
I tried again with ::before, ::after
It still gives an error.

Did you try combining two pseudo elements with a comma and with no space between the two?

I have added a couple tests and they are passing as expected.

image

Since I cannot recreate an issue here, I would need a sample repo with the error happening. I would take a look around line 237 to see if there's an issue stemming from there, but hard to say what it could be at this point.

I replicated the error in this sample repo https://github.com/aakashgill/stylelint-plugin-defensive-css/
I'm still getting the error in this. Still not sure what I'm doing wrong.

image

Thanks for the repo. It looks like the RegEx was matching -type-. But I've got an update coming shortly.

Appreciate the help in catching this 👍

This has been closed in #5 and released in version 0.2.0.