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

Incorrect vendor prefix identification #26

Closed
crstauf opened this issue Dec 20, 2023 · 16 comments
Closed

Incorrect vendor prefix identification #26

crstauf opened this issue Dec 20, 2023 · 16 comments
Labels
bug Something isn't working

Comments

@crstauf
Copy link

crstauf commented Dec 20, 2023

Describe the bug
Error Separate different vendor prefixes into their own rules. is showing on SASS that has no vendor prefixes:

.menu-item {

	&.menu-item-has-children::after,
	&.menu-item-has-grandchildren::after {
		content: '';
		position: absolute;
		top: 24px;
		right: 30px;
		width: 18px;
		height: 18px;
		background-size: contain;
	}
	
}

To Reproduce
Steps to reproduce the behavior:

  1. Add the SASS code above into a sass/scss file
  2. Run Stylelint with use-defensive-css plugin
  3. Notice errors

Expected behavior
No vendor error(s).

Desktop (please complete the following information):

  • OS: macOS
  • Browser: NA
  • Version: Sonoma 14.2

Additional context

package.json

{
  "devDependencies": {
    "stylelint": "^15.10.2",
    "stylelint-config-standard": "^34.0.0",
    "stylelint-config-standard-scss": "^11.1.0",
    "stylelint-high-performance-animation": "^1.9.0",
    "stylelint-order": "^6.0.3",
    "stylelint-plugin-defensive-css": "^0.9.1",
    "stylelint-stylistic": "^0.4.3"
  }
@yuschick
Copy link
Owner

Thank you for reporting this. I will dig into it as soon as I can 🤘

@yuschick
Copy link
Owner

@crstauf Could you share your full package file? I want to set up a project in the same way as yours to make sure I am testing correctly.

@crstauf
Copy link
Author

crstauf commented Dec 22, 2023

@yuschick The package.json I shared above is the pertinent info (only other thing is a custom command).

@yuschick
Copy link
Owner

I'm interested in seeing how you're bringing in SCSS. I don't work with it often, so I'd like to see your project setup there, so I can make sure I am testing correctly.

@crstauf
Copy link
Author

crstauf commented Dec 22, 2023

Oh. I have Dart Sass installed globally. That shouldn't impact Stylelint's review of files though, correct?

@yuschick
Copy link
Owner

I'm not sure off hand, but that at least gives me a place to start. From what it seems, I may need to write tests specific to SCSS. This is a bit new for me, so bare with me as I try to figure out what is needed.

@yuschick
Copy link
Owner

@crstauf Okay. I can recreate the error. Seems like I just need to update the RegExp I am using. Will get an update out soon.

@yuschick
Copy link
Owner

This has been fixed and deployed in v0.10.3.

#27

@crstauf
Copy link
Author

crstauf commented Dec 28, 2023

Will check it out ASAP to confirm.

@crstauf
Copy link
Author

crstauf commented Dec 29, 2023

@yuschick I ran npm update stylelint-plugin-defensive-css, and now I get some output that is not correct:

2023-12-29T000647

package.json

{
  "devDependencies": {
    "stylelint": "^15.10.2",
    "stylelint-config-standard": "^34.0.0",
    "stylelint-config-standard-scss": "^11.1.0",
    "stylelint-high-performance-animation": "^1.9.0",
    "stylelint-order": "^6.0.3",
    "stylelint-plugin-defensive-css": "0.10.3",
    "stylelint-stylistic": "^0.4.5"
  }
}

@yuschick
Copy link
Owner

@crstauf sorry for that! I have an idea and will update today.

@yuschick yuschick added the bug Something isn't working label Dec 29, 2023
@yuschick
Copy link
Owner

@crstauf Thanks for catching this and reporting it so quickly. I have published 0.10.4 which will no longer have those logs.

@crstauf
Copy link
Author

crstauf commented Dec 29, 2023

Thanks, @yuschick! Will try it in the morning.

@crstauf
Copy link
Author

crstauf commented Dec 29, 2023

Ugh, I completely forgot about this until now. Will test and report back latest by Monday.

@crstauf
Copy link
Author

crstauf commented Dec 29, 2023

Managed to get to my desk tonight. Looks like it requires Stylelint 16, which not all my dependencies support yet, so I'll come back 'round once that happens.

@crstauf
Copy link
Author

crstauf commented Jan 1, 2024

Updated to Stylelint 16 and v1.0.0 today: works well. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants