Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-undef-class dismisses classes within :global(.class) { #97

Open
juanporley opened this issue Jun 7, 2024 · 0 comments
Open

no-undef-class dismisses classes within :global(.class) { #97

juanporley opened this issue Jun 7, 2024 · 0 comments

Comments

@juanporley
Copy link

For "css-modules/no-undef-class" I'm facing an issue similar to others that have been fixed in the past.
Sometimes css module classes can be namespaced with globals as such:

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

    .reject {
        color: red;
    }
}

Both accept and reject are valid classes, however the plugin drops them and they show up as errors in my repo:
46:65 error Class or exported property 'accept' not found css-modules/no-undef-class

I think it should be possible to disregard the global wrapper but still evaluate its contents to find valid classes within it.

Environment

I'm running:

  • eslint 7.32.0
  • eslint-plugin-css-modules 2.12.0
  • sass 1.75.0
  • node 18.16.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant