-
Notifications
You must be signed in to change notification settings - Fork 529
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/property count #407
base: develop
Are you sure you want to change the base?
Conversation
I see that any node type that interrupts the |
With at-root definitely because it's about making sure you're using the cascade correctly and at-root removes that consideration anyway. As for media queries, that's a question really, do we want to handle that? I ran this implementation as well as |
Additionally, until we upgrade Gozales, suffix extensions are being included in nested property counts, even though they aren't nested within their parent when compiled. However, suffix extensions are nested within their grandparent. Perhaps this exception doesn't fall within the "spirit" of this rule. What do you think? Example: .foo {
.bar {
. color: green;
&-baz {
color: blue;
}
}
} With |
It's not about how many properties are on the rule after compilation though its about how many properties are within each block in the source. When the nested option is on with the above code the nested count should always be 2 and the unnested counts should be 0, 1, 1. |
Will update this to work correctly with mixins etc which will be an improvement over the scss lint version |
Gonzales scuppers the Part of me thinks release this for scss, output a warning for sass users and wait for the gonzales update... @sasstools/sass-lint-contributors any ideas? so except for the properties in .bar below everything else is on the same level apparently.. |
Ugh. GONZALES! Yah, I'm OK with that for the moment as long as that's documented. Maybe we should start adding what syntaxes are supported for each rule if it differs from "all" |
I'll be moving forward with this for the latest version of gonzales-pe as I believe the issue I was encountering with the Sass syntax should be fixed! |
I'll be reviving this for the new 1.6 update now once I've verified that sass blocks are indented correctly |
Adds the rule
property-count
which enforces the maximum number of properties per ruleset. This can be configured to be per ruleset or inclusive of nested rulesets.Warning Message:
Includes the options:
max-properties
include-nested
Closes #406
DCO 1.1 Signed-off-by: Dan Purdy [email protected]