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

Update linter to error on compound ampersand selectors #83

Open
marlonmarcello opened this issue Sep 21, 2023 · 2 comments
Open

Update linter to error on compound ampersand selectors #83

marlonmarcello opened this issue Sep 21, 2023 · 2 comments

Comments

@marlonmarcello
Copy link
Contributor

marlonmarcello commented Sep 21, 2023

Let's see if we can find or create a Stylelint rule which prevents things like this. The issue in this example being that you cannot do a project-wide search for .card__description.

.card {
  &__description {
    // some code
  }
}
@andrewrubin
Copy link
Member

#84 does half of the work here, but I think we may need to dig into some complex regex to achieve the ampersand request. I looked around but didn't find an existing Stylelint rule for it :(

@andrewrubin andrewrubin changed the title Update linter to error on: nested selectors that goes deeper than 3 levels and nested ampersand selectors Update linter to error on compound ampersand selectors Sep 27, 2023
@andrewrubin
Copy link
Member

Updated the description here since we've already solved half of what the original issue was asking for 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants