noUnknownAtRule
Summary
Section titled Summary- Diagnostic Category:
lint/nursery/noUnknownAtRule
- This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
- Same as
stylelint/at-rule-no-unknown
- Same as
Description
Section titled DescriptionDisallow unknown at-rules.
For details on known at-rules, see the MDN web docs.
Examples
Section titled ExamplesInvalid
Section titled Invalid@uNkNoWn {}
code-block.css:1:2 lint/nursery/noUnknownAtRule ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Unexpected unknown at-rule: uNkNoWn
> 1 │ @uNkNoWn {}
│ ^^^^^^^
2 │
ℹ uNkNoWn is not a standard CSS at-rule, which may lead to unexpected styling results or failure to interpret the styles as intended.
ℹ See MDN web docs for a known list of at-rules.
ℹ To fix this issue, consider removing the unknown at-rule.
@unknown-at-rule { font-size: 14px;}
code-block.css:1:2 lint/nursery/noUnknownAtRule ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Unexpected unknown at-rule: unknown-at-rule
> 1 │ @unknown-at-rule {
│ ^^^^^^^^^^^^^^^
2 │ font-size: 14px;
3 │ }
ℹ unknown-at-rule is not a standard CSS at-rule, which may lead to unexpected styling results or failure to interpret the styles as intended.
ℹ See MDN web docs for a known list of at-rules.
ℹ To fix this issue, consider removing the unknown at-rule.
Valid
Section titled Valid@charset 'UTF-8';
@media (max-width: 960px) { body { font-size: 13px; }}
How to configure
Section titled How to configure{ "linter": { "rules": { "nursery": { "noUnknownAtRule": "error" } } }}