question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What does "extend react/jsx-runtime in your eslint config to disable the relevant rules" mean?

See original GitHub issue

I can’t tell if I’m missing something or those instructions are unclear. To me that means:

  1. go to your eslintrc.js file
  2. find the extends array
  3. 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

30reactions
pgarciacamoucommented, Oct 22, 2021

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 after plugin:react/recommended in the extends array.

9reactions
dcherinocommented, Jan 20, 2022

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 after plugin: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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found