javascript: Release 18 breaks running eslint-plugin-react
After updating to v18, the linter fails with the following warnings for every file in both javascript and typescript
1:1 error Definition for rule 'react/jsx-curly-newline' was not found react/jsx-curly-newline
1:1 error Definition for rule 'react/state-in-constructor' was not found react/state-in-constructor
1:1 error Definition for rule 'react/static-property-placement' was not found react/static-property-placement
1:1 error Definition for rule 'react/jsx-props-no-spreading' was not found react/jsx-props-no-spreading
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 20
- Comments: 21
Hi guys, I get around this problem too! I added these line on rules of eslintrc.js ‘react / state-in-constructor’: ‘off’, ‘react / static-property-placement’: ‘off’, ‘react / jsx-props-no-spreading’: ‘off’,
Now, I don’t have these errors boding me anymore
CRA is definitely compatible with airbnb config without ejecting, I have been using it that way for over a year now with no problems
I had exactly the same problem, and solved it by add “plugin:react/recommended” in extends.
package.json:
Hi guys,
In my case, a need to added these lines on rules:
@ljharb , The issue is resolved After updating the
eslint-plugin-react
package to `7.16.0 . So do I need to create an issue?Create-React-App V3.1.1 now have ESLint 6 support, updating it worked for me.