Skip to content

New Rule: no-invalid-import-position #151

Open
@thecalamiity

Description

@thecalamiity

Rule details

Disallow invalid placement of @import rules.

What type of rule is this?

Warns about a potential problem

Example code

a {}
@import 'foo.css';

Participation

  • I am willing to submit a pull request to implement this rule.

Additional comments

@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.

Prior Art:
https://stylelint.io/user-guide/rules/no-invalid-position-at-import-rule/

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionfeature

Type

No type

Projects

Status

Implementing

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions