rule-nesting-at-rule-required-list
Require rules to be nested in specific at-rules.
a { color: red; }/** ↑ * This rule */Use this rule to enforce a convention. For example, require every rule to be inside a layer at-rule, as unlayered normal declarations always beat layered ones.
This rule supports 1 message argument per configured at-rule pattern.
Options
Section titled “Options”Array<string | RegExp>
Section titled “Array<string | RegExp>”Given:
{ "rule-nesting-at-rule-required-list": ["layer", "/^--foo-/"]}The following patterns are considered problems:
a { color: red; }@media all { a { color: red; }}a { @layer { color: red; }}The following patterns are not considered problems:
@layer { a { color: red; }}@--foo-bar { a { color: red; }}@--foo-baz { a { color: red; }}@font-face { font-family: "foo";}