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

scss/no-duplicate-mixins should only warn for duplication in the same scope #761

Closed
Farsad opened this issue Feb 17, 2023 · 1 comment · Fixed by #997
Closed

scss/no-duplicate-mixins should only warn for duplication in the same scope #761

Farsad opened this issue Feb 17, 2023 · 1 comment · Fixed by #997
Labels
Bug 🐛 Something isn't working Help wanted 🙋 Help is needed

Comments

@Farsad
Copy link

Farsad commented Feb 17, 2023

Stylelint should allow mixins with the same name that are in different scopes (inside different selectors). e.g:

.ComponentA {
  @mixin activeState() {
    background: #000;
  }
  .button {
      @include: activeState;
  }
}

.ComponentB {
  @mixin activeState() {
    background: #fff;
  }
  .button {
      @include: activeState;
  }
}

It's a valid SCSS and works as expected. But Stylelint gives "scss/no-duplicate-mixins" error for it.

@kristerkari kristerkari added Bug 🐛 Something isn't working Help wanted 🙋 Help is needed labels Feb 22, 2023
@kristerkari
Copy link
Collaborator

Sounds like a bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Something isn't working Help wanted 🙋 Help is needed
Development

Successfully merging a pull request may close this issue.

2 participants