bmatcuk / eslint-plugin-postcss-modules

Checks that you are using the classes exported by your css modules using postcss.
MIT License
21 stars 7 forks source link

duplicate stylesheet names cause issues #3

Closed peter-mouland closed 4 years ago

peter-mouland commented 4 years ago

if componentA imports hero.css and componentB imports a completely separate hero.css then I get incorrect warnings.

This is in a monorepo.

Has anyone spotted this before? I can try to build a minimal test case on monday if needed.

peter-mouland commented 4 years ago

minimal repo with issue demo'd

https://github.com/peter-mouland/postcss-modules-eslint

bmatcuk commented 4 years ago

Oops, sounds like a bug... I'll take a look! Hopefully have time today or tomorrow. Thanks for the report, @peter-mouland!

bmatcuk commented 4 years ago

🎉 v1.1.2 released 🎉

@peter-mouland: Should solve your issue... seems to work in your test repo. Thank you very much for providing that, by the way! Made it much easier to track down and test!

Let me know if you run into any trouble with it. I'll leave this issue open until I get confirmation that it's working for you =)

peter-mouland commented 4 years ago

Amazing, thanks for that, i'll update our repo and let you know 👍 initial run looks good. down from 173 warnings to 90. will take a closer look in the morning

update: worked like a charm, thanks!

bmatcuk commented 4 years ago

You're welcome! Glad to help!