Attribute jsx not allowed here warning - styled JSX in WebStorm

Viewed 422

enter image description here

I cannot figure out how to stop showing warnings in WebStorm about styled JSX attributes.

I have added styled-jsx to babel and ESLint config.

JavaScript language version is set to ECMAScript 6 (supports JSX). Other JSX attributes like className are not showing warnings.


Edit: I've already installed the react template plugin and it doesn't fix the issue here.

How to have inspection not show warnings for these JSX style attributes?

2 Answers

I fixed the issue by adding styled-jsx as a library under Languages and Frameworks > Javascript > Libraries > Download

Now the attributes are no longer showing warnings.

enter image description here

Have you tried by installing React-Template plugin?

enter image description here

Related