eslint-plugin-css-modules
eslint-plugin-css-modules copied to clipboard
Why do you support classes only, no IDs?
Because ids are global, they aren't converted to hashed names like classes.
@atfzl, IDs on my project are converted to hashed names:

I use ids as well in css module to ensure scoped hashed ids sometimes and the linter complains the "class" doesn't exist, but it's an id not a class
As stated in the CSS Modules documentation, only class and animation names used by at-rules like @keyframe should be supported:
A CSS Module is a CSS file in which all class names and animation names are scoped locally by default.
ids are global and does not belong to any specific CSS module, therefore it wouldn't make sense to support unused/undefined id in a plugin made for CSS modules.