What does "extend react/jsx-runtime in your eslint config to disable the relevant rules" mean?
See original GitHub issueI can’t tell if I’m missing something or those instructions are unclear. To me that means:
- go to your eslintrc.js file
- find the
extends
array - add the string
"react/jsx-runtime"
to that array
But I tried that and I got
ESLint: 7.32.0
ESLint couldn't find the config "react/jsx-runtime" to extend from. Please check that the name of the config is correct.
Tried “plugin:react/jsx-runtime” and it worked, but the docs don’t say anything about it being a plugin. Docs are a little confusing here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
eslintrc.js for React 17 and JSX without import 'react'
To make it work, you should add those rules to your eslint config, see Extending or replacing the default ESLint config for Create-React-App ......
Read more >12 essential ESLint rules for React - LogRocket Blog
Most rules cover general React practices, and others cover issues related to JSX syntax. Let's take a look at some of the more...
Read more >eslint-plugin-react - npm
Start using eslint-plugin-react in your project by running `npm i ... (add "plugin:react/jsx-runtime" to "extends" ) to disable the relevant ...
Read more >Eslint-plugin-react NPM
If you are using the new JSX transform from React 17, extend react/jsx-runtime in your eslint config (add "plugin:react/jsx-runtime" to "extends" ) to ......
Read more >eslint-plugin-react/README.md - UNPKG
... your eslint config (add `"plugin:react/jsx-runtime"` to `"extends"`) to disable the relevant rules. 35. 36, You should also specify settings that will ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just want to leave a note for other people.
If you are encountering that adding
plugin:react/jsx-runtime
doesn’t work. Make sure it is added afterplugin:react/recommended
in the extends array.Thanks for this. I would like also to add that if you are using ‘airbnb-typescript’, you need to make sure to add it after this one too.