Skip to content

Bug: Parsing error: Identifier is expected for :global #64

Open
@crabvk

Description

@crabvk

Environment

ESLint version: 9.21.0
@eslint/css version: 0.4.0
Node version: 22.14.0
npm version: 10.9.2
Operating System: Artix Linux 6.13.4.zen1-1

Which language are you using?

stylesheet

What did you do?

Hi. I'm using CSS modules in React application with Vite. A lot of my <Component>.module.css files has :global selectors like:

:global(.some-class) {
    color: yellow;
}

When I run npx eslint . I've got a lot of

Parsing error: Identifier is expected

errors pointing to the :global selectors.

What did you expect to happen?

No error should be shown for :globals.

What actually happened?

Parsing error: Identifier is expected

Link to Minimal Reproducible Example

https://stackblitz.com/edit/vitejs-vite-opheq2hk?file=src%2Fstyle.css

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

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

    bugSomething isn't working

    Type

    No type

    Projects

    • Status

      Blocked

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions