noInvalidPositionAtImportRule
Ce contenu n’est pas encore disponible dans votre langue.
Diagnostic Category: lint/correctness/noInvalidPositionAtImportRule
Since: v1.8.0
Sources:
Disallow the use of @import
at-rules in invalid positions.
Any @import
rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset
and @layer
), or else the @import
rule is invalid.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.css:2:2 lint/correctness/noInvalidPositionAtImportRule ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ This @import is in the wrong position.
1 │ a {}
> 2 │ @import ‘foo.css’;
│ ^^^^^^^^^^^^^^^^^
3 │
ℹ Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid.
ℹ Consider moving import position.