Skip to content

Commit

Permalink
Fix FP S4662 (at-rule-no-unknown): Ignore "@contain" by default
Browse files Browse the repository at this point in the history
  • Loading branch information
yassin-kammoun-sonarsource committed Oct 26, 2023
1 parent f600f32 commit aeebfa2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class AtRuleNoUnknown implements CssRule {

private static final String DEFAULT_IGNORED_AT_RULES =
"value,at-root,content,debug,each,else,error,for,function,if,include,mixin,return,warn,while,extend,use,forward,tailwind,apply,layer,/^@.*/";
"value,at-root,content,debug,each,else,error,for,function,if,include,mixin,return,warn,while,extend,use,forward,tailwind,apply,layer,container,/^@.*/";

@RuleProperty(
key = "ignoreAtRules",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void at_rule_unknown_default() {
String optionsAsJson = new Gson().toJson(new AtRuleNoUnknown().stylelintOptions());
assertThat(optionsAsJson)
.isEqualTo(
"[true,{\"ignoreAtRules\":[\"value\",\"at-root\",\"content\",\"debug\",\"each\",\"else\",\"error\",\"for\",\"function\",\"if\",\"include\",\"mixin\",\"return\",\"warn\",\"while\",\"extend\",\"use\",\"forward\",\"tailwind\",\"apply\",\"layer\",\"/^@.*/\"]}]"
"[true,{\"ignoreAtRules\":[\"value\",\"at-root\",\"content\",\"debug\",\"each\",\"else\",\"error\",\"for\",\"function\",\"if\",\"include\",\"mixin\",\"return\",\"warn\",\"while\",\"extend\",\"use\",\"forward\",\"tailwind\",\"apply\",\"layer\",\"container\",\"/^@.*/\"]}]"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void test() throws Exception {
" \"key\": \"ignoreAtRules\",\n" +
" \"name\": \"ignoreAtRules\",\n" +
" \"description\": \"Comma-separated list of \\\"at-rules\\\" to consider as valid.\",\n" +
" \"defaultValue\": \"value,at-root,content,debug,each,else,error,for,function,if,include,mixin,return,warn,while,extend,use,forward,tailwind,apply,layer,/^@.*/\",\n" +
" \"defaultValue\": \"value,at-root,content,debug,each,else,error,for,function,if,include,mixin,return,warn,while,extend,use,forward,tailwind,apply,layer,container,/^@.*/\",\n" +
" \"type\": {\n" +
" \"type\": \"STRING\",\n" +
" \"values\": [],\n" +
Expand Down Expand Up @@ -143,6 +143,7 @@ void test() throws Exception {
" \"tailwind\",\n" +
" \"apply\",\n" +
" \"layer\",\n" +
" \"container\",\n" +
" \"/^@.*/\"\n" +
" ]\n" +
" }\n" +
Expand Down

0 comments on commit aeebfa2

Please sign in to comment.