Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configurations/standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@
"no-unknown-custom-media": [
true,
{
"severity": "error",
"severity": "warning",
"message": "Unknown custom media query \u201c%s\u201d"
}
],
"no-unknown-custom-properties": [
true,
{
"severity": "error",
"severity": "warning",
"message": "Unknown custom property \u201c%s\u201d"
}
],
Expand Down
8 changes: 8 additions & 0 deletions tools/update_stylelint.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ def update_stylelint_rules():
break

if 'no-unknown' in rule_name:
# Unknown custom properties/media reference values that are
# frequently defined where static analysis can't see them (set at
# runtime via JS, in inline style attributes, on a page that wasn't
# crawled, or built at compile time by PostCSS). A missing one
# degrades gracefully to the initial/inherited value rather than
# producing invalid CSS, so report it as a warning, not an error.
if rule_name in ('no-unknown-custom-properties', 'no-unknown-custom-media'):
rule_config["severity"] = "warning"
rules[rule_name] = [rule_enable, rule_config]
elif 'no-deprecated' in rule_name:
rule_config["severity"] = "warning"
Expand Down