Unknown property 'jsx' found react/no-unknown-property #40269
-
In my project, I created some components using the next-js styled-jsx For clarity, I have reproduced this on - stackblitz - run I don't understand the error and why it is so, anyways I'd appreciate any help on solving the issue. PS: I could ignore the error by disabling some ESLint rules. but I don't think it's best. Below is an example of my package.json
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 13 replies
-
Do you think you can reproduce this in stackblitz? I cannot reproduce it on a testing project. |
Beta Was this translation helpful? Give feedback.
-
Having the same issue for hours now |
Beta Was this translation helpful? Give feedback.
-
Alright, this is a dependency issue, The releases page for this plugin: https://github.com/jsx-eslint/eslint-plugin-react/releases, shows a bunch of related issues being fixed over the past 5 versions, up to I am not sure if this is an upstream issue, meaning that it has to be fixed on the I'd say open a bug on this repository, and perhaps we can resolve there |
Beta Was this translation helpful? Give feedback.
-
This is a workaround to ignore the invalid/nonstandard jsx property on a style tag. Just posting for those who might get confused or lost in the thread. Create a
Remember, other custom property names must be prefixed with |
Beta Was this translation helpful? Give feedback.
-
You can also add this to the top of the file in question
|
Beta Was this translation helpful? Give feedback.
This is a workaround to ignore the invalid/nonstandard jsx property on a style tag. Just posting for those who might get confused or lost in the thread.
Create a
.eslintrc.json
file if it's not existing on your project already, then add this rule.Remember, other custom property names must be prefixed with
data-
to be valid.