jucamilo340
jucamilo340

Reputation: 3

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

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

Upvotes: 0

Views: 1626

Answers (2)

Frankie
Frankie

Reputation: 121

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

Upvotes: 0

Jing Pei
Jing Pei

Reputation: 26

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

Upvotes: 1

Related Questions