Skip to content

New Rule: no-invalid-charset-placement #163

@thecalamiity

Description

@thecalamiity

Rule details

Disallow invalid placement of @charset rule.

What type of rule is this?

Warns about a potential problem

Example code

a {}
@charset "utf-8";

Prior Art

I couldn't find a Stylelint equivalent, but VS Code's built-in linter reports this.

Participation

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

Additional comments

@charset can only be placed at the very beginning of a stylesheet. No other characters, except the Unicode byte-order mark, are allowed before it.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions