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 ignore: ["rules"] / ["at-rules"] to block-opening-brace-*-after #5262
Comments
@SandwichTech Thanks for the request. To confirm, you'd like:
Is that correct? If so, we can add
You'd then be able to configure the rules like so: {
"rules": {
"block-opening-brace-newline-after": ["always", { "ignore": ["rules"] } ],
"block-opening-brace-space-after": ["always", { "ignore": ["at-rules"] } ],
}
} |
@jeddy3 I appreciate the quick response.
|
Those options should be what you need then. It should just be the case of wrapping this line in a conditional:
Like so: if (!optionsMatches(options, 'ignore', 'rules') {
root.walkRules(check);
} And updating the options validator (see a similar rule to how this is done). Then doing the same for the other rule, but ignoring at-rules instead of rules. I've labelled the issue as ready to implement. Please consider contributing if you have time. There are steps on how to add a new option in the Developer guide. |
I would like to take this one. |
When using single-line formatting, it would helpful if the selectors for at-rules could pushed to a new line. For example:
A proposed solution would be to add at-rule exceptions for the block-opening-brace-newline-after rule. Or a separate at-rule-opening-brace-newline-after rule might be simpler.
The text was updated successfully, but these errors were encountered: