You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes when writing many short blocks where there is a single property (/ mixin / extend) per block it is useful to group them close to each other as they are often inherently related. For instance a set of width classes can be densely packed instead of having a blank line between each class:
Scss-lint's empty-line-between-blocks rule allows these single-line rule sets to sit next to each other as it has a configuration option allow_single_line_rule_sets that defaults to true. The configuration option may be set to off to disallow this exception.
Sass-lint should mimic this behaviour so that I may write the above without raising warnings.
The text was updated successfully, but these errors were encountered:
How about ignore-single-line-rulesets as the option? Since I feel you're instructing the rule to ignore them from having to be potentially followed by a newline.
No strong opinion about if we go with ignore-single-line-rulesets over allow-single-line-rule-sets, (I'm just the guy coming up with requests and doing no work :)) though think that rules with this sort of option should be either always positive or always negative across the whole project for the sake of consistency, i.e. all options that are this sort of boolean toggle should be allow-thingor ignore-thing.
Having a quick flick through the docs, no-qualifying-elements has allow-element-with-attribute, allow-element-with-class and allow-element-with-id but that seems to be the only piece of prior-art.
Personally I think naming these toggle options as positive terms (e.g. allow-thing, enable-thing) is clearer as allow: true is easier to parse than the double negative of ignore: false despite both having the same effect.
Agreed. We have made many rules fully negative in the sense they are named no-* so any exceptions to our rules should be positive. I think consistently having allow also makes it clearer for people scanning through the config file.
Nice catch, I'll put it to @bgriffith and possibly add some documentation on this going forward.
Sometimes when writing many short blocks where there is a single property (/ mixin / extend) per block it is useful to group them close to each other as they are often inherently related. For instance a set of width classes can be densely packed instead of having a blank line between each class:
Scss-lint's empty-line-between-blocks rule allows these single-line rule sets to sit next to each other as it has a configuration option
allow_single_line_rule_sets
that defaults totrue
. The configuration option may be set to off to disallow this exception.Sass-lint should mimic this behaviour so that I may write the above without raising warnings.
The text was updated successfully, but these errors were encountered: