Disabling "Unknown class name" error message in styleName
Hello.
I have a code like this:
<div styleName="field-title">
And in the respective SCSS:
&-title
line-height: 30px
So Webstorm can't resolve class name in this case (because of ampersand notation) and show me an error "Unknown class name". As I know, it's a bug: https://youtrack.jetbrains.com/issue/WEB-12958 . But can I at least disable this message? I have no idea what inspection I should switch off. Owing to this all my project is marked as erroneous. It's very disappointing.
Please sign in to leave a comment.
https://youtrack.jetbrains.com/issue/WEB-12958 is fixed more than 2 years ago... And WebStorm doesn't normally show errors on unresolved CSS selectors. What IDE build do you use? What file type is it (styleName is not a standard HTML attribute)?
It's not fixed yet. I'm using CSS Modules, that's why you see 'styleName' attribute. There is your comment there: "You're using CSS Modules, right? Please report a separate issue for this case and provide code samples. This one was fixed for HTML and doesn't cover CSS Modules."
I'm using v2019.2.4, build 192.7142.35.
Please can you share a complete code snippet the error can be reproduced with? styleName attribute is not yet supported (https://youtrack.jetbrains.com/issue/WEB-30178), and the IDE doesn't try resolving its value to any known selector, so I'm still not sure what error you refer to
I'm so sorry, I've forgot that I'm using React CSS Modules plugin. So it is its issue.