Unknown property 'jsx' in diferents files using styled-jsx

1.3k views Asked by At

I am doing a deployment in aws amplify of my application but I get an error when doing the deployment on an unknown jsx property in the files in which I use styled-jsx

screenshot 1:enter image description here screenshot 2:enter image description here

2

There are 2 answers

0
Jing Pei On BEST ANSWER

Based on this https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options

You need to add the jsx/global properties to be ignored in your eslint rules

0
Frankie On

Add ignore rule on .eslintrc.js, like this:

module.exports = {
  // ...
  rules: {
    'react/no-unknown-property': [
      2,
      {
        ignore: ['jsx', 'global'],
      },
    ],
  },
}

Related Link: Unknown property 'jsx' found react/no-unknown-property