-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add block-no-redundant-nesting
rule
#872
Add block-no-redundant-nesting
rule
#872
Conversation
.foo .bar { | ||
} | ||
.foo-bar-baz { | ||
color: red |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small thing, but it would nice if the autofix would indent the properties correctly :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if/how that's possible. Could you give me a hint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, actually, the core stylelint package has removed all styling related rules, so maybe the indentation is something that we want to leave to tools like prettier instead (check https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-15.md#deprecated-stylistic-rules)
Thanks! Looks good, just a couple of small things that I commented on :) |
block-no-unnecessary-nesting
ruleblock-no-redundant-nesting
rule
One probablem that I noticed when reviewing this rule is that the rule does not seem to take into account that Sass supports nesting CSS properties. This {
code: `
.foo {
font: {
size: 16px;
}
}
`,
description: "Sass' nested properties"
} ...as it compiles to: .foo {
font-size: 16px;
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks really good now 👍
I'll release this in the next release (currently missing only #867)
Fixes #679.