Attribute class is not allowed here when using class property with stencil
已回答
When Using IntelliJ Ultimate with Stencil which itself user JSX syntax i get the class is not allowed here warning. But class is the proper way to style in Stencil, which can be seen here
https://stenciljs.com/docs/templating-jsx
请先登录再写评论。
You can disable the inspection “Unknown attribute” in `Settings/Preferences | Editor | Inspections > HTML` or add “class” to the list of custom attributes in the inspection settings.
I have tried creating a sample project in WebStorm 2023.2, and I don't get any warnings on `class` attributes. Which IDE version do you use?
Please note that the IDE doesn't provide any StencilJS-specific support: https://youtrack.jetbrains.com/issue/WEB-44918/Stencil-Support.
I have the same issue, using StencilJs in IntelliJ IDEA 2022.2.4 (Ultimate Edition). I tells me I can't use class on basic HTML elements live div and h2. I dont need specific stencil support, but I would like to turn off these warnings as they are very annoying