Skip to content

Stylelint Fails to Recognize Empty Sources #2

Description

@blyedev

While Stylelint generally works as expected (e.g., linting a minimal valid rule like .sample {}), it fails to treat sources that are logically equivalent to an empty string "" as empty. This happens despite Stylelint's straightforward check of if (rootString.trim()), which should detect and handle empty sources correctly. The root cause is unclear, but it is suspected that the parser may be misconstructing the AST in a way that prevents Stylelint from correctly recognizing the source as empty. Further investigation into how the AST is constructed and passed to Stylelint is needed to identify the exact issue.

A matching issue is submitted in the stylelint repo. See stylelint/stylelint#8135

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions