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

[feature request]: `selector-nest-combinators` option `least` #390

Open
JounQin opened this issue Nov 1, 2019 · 2 comments
Open

[feature request]: `selector-nest-combinators` option `least` #390

JounQin opened this issue Nov 1, 2019 · 2 comments

Comments

@JounQin
Copy link

@JounQin JounQin commented Nov 1, 2019

First case which should emit error:

.a {
  &.b {
    color: red;
  }
}

Second case which should be allowed:

.a {
  &.b {
    color: red;
  }

  .c {
    font-size: 16px;
  }
}

@kristerkari What do you think?

@kristerkari

This comment has been minimized.

Copy link
Owner

@kristerkari kristerkari commented Nov 15, 2019

Hi @JounQin and sorry for the late reply.

I'm not totally sure what's the use case for having such option, could you provide another example that would maybe be related to some issue that you are having with the rule?

Also, why is the option called least? Is that a good name to describe it?

I'm totally ok with adding the option, but I just need to understand it properly first.

@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Nov 15, 2019

@kristerkari We don't want to add redundant nested block in our team, so current option always | never is both too strict and unreasonable for us.

// input
.a {
  &.b {
    color: red;
  }
}

// expected output
.a.b {
  color: red;
}

Also, why is the option called least? Is that a good name to describe it?

Maybe as-needed be better or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.