Closed jaydenseric closed 3 years ago
Ah, that's because it's not checking if classes and such are used in the CSS module. I'll see if I can fix this over the weekend. Thanks for the bug report!
Sorry again that's I've been so slow to get to these! I haven't looked into this issue specifically yet, but I'm pretty sure it'll be the easiest of the three to solve. I know exactly what I need to do - should only be, like, a dozen lines of code at most. Should have some time this weekend.
Thanks for being patient! Sorry to keep you waiting!
Thanks for your hard work! Once all of these related issues are fixed we can test it in our codebase :)
Alright, @jaydenseric, I think I've got keyframes working correctly! And with that, I've got fixes for all of the open issues. Could you give it a try, using the master branch? I want to make sure all the changes don't cause other bugs before I cut an official npm release.
package.json:
{
"devDependencies": {
"eslint-plugin-postcss-modules": "bmatcuk/eslint-plugin-postcss-modules"
}
}
Thanks!
I'll give it a try now…
Well done! It seems to work ok, it's picking up some legit problems in our codebase.
Awesome! I've officially published v1.2.0 to npm so you can update your package.json. Lemme know if you find any other issues.
If a CSS module has animation keyframes named for example
fadeIn
, and in the same module the keyframes are used viaanimation-name: fadeIn;
, thepostcss-modules/no-unused-class
rule incorrectly reports the keyframes name as an unused class: