Add this to your config in ESLint Config File, i.e. .eslintrc or eslint.config.js

{
  "settings": {
    "react": {
      "version": "detect"
    }
  }
}

See the config here: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/README.md#configuration

Docs

https://eslint.org/docs/

https://eslint.org/docs/latest/use/configure/migration-guide

https://eslint.org/docs/latest/use/configure/configuration-files

Answer from Mark on Stack Overflow
🌐
Sentry
sentry.io › sentry answers › react › warning: react version not specified in 'eslint-plugin-react settings' while running eslint on top of react 18.2.0
Warning: React version not specified in 'eslint-plugin-react settings' while running eslint on top of React 18.2.0 | Sentry
When the React version hasn’t been specified in your eslint-plugin-react settings, eslint-plugin-react defaults to using the latest React version for linting, which may lead to incorrect ESLint warnings or errors if you aren’t using the ...
🌐
GitHub
github.com › yannickcr › eslint-plugin-react › issues › 1955
Warning: React version not specified in eslint-plugin-react settings.
May 9, 2018 - Hello, Since I've updated this plugin, i've got a message like Warning: React version not specified in eslint-plugin-react settings.. This is true, I didn't specify the version of react, and this happens due to 8738e59#diff-4e51c5c91adee...
Author   kud
🌐
Sonar Community
community.sonarsource.com › sonarqube for ide
Warning: React version not specified in eslint-plugin-react - SonarQube for IDE - Sonar Community
September 19, 2024 - Operating system: Ubuntu 24.04 IDE name and flavor/env: N/A Since upgrading to eslint-plugin-sonarjs 2.x, I get this warning running eslint Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration .
🌐
GitHub
github.com › yannickcr › eslint-plugin-react › issues › 2157
[7.12.4]React version not specified in eslint-plugin-react settings ...
February 11, 2019 - { "name": "xxx", "version": "0.1.0", "private": true, "dependencies": { "@antv/data-set": "^0.10.1", "antd": "^3.13.2", "axios": "^0.18.0", "classnames": "^2.2.6", "decimal.js-light": "^2.5.0", "husky": "^1.3.1", "immutability-helper": "^3.0.0", "less": "^3.9.0", "lint-staged": "^8.1.3", "lodash": "^4.17.11", "moment": "^2.24.0", "node-sass-chokidar": "^1.3.4", "npm-run-all": "^4.1.5", "prop-types": "^15.7.1", "react": "^16.8.1", "react-data-grid": "^5.0.5", "react-data-grid-addons": "^5.0.5", "react-dnd": "^7.0.2", "react-dnd-html5-backend": "^7.0.2", "react-document-title": "^2.0.3", "react-
Author   flyingcrp
🌐
npm
npmjs.com › package › eslint-plugin-react
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 disable the relevant rules. You should also specify settings that will be shared across all ...
      » npm install eslint-plugin-react
    
Published   Apr 03, 2025
Version   7.37.5
Author   Yannick Croissant
🌐
GitHub
github.com › jsx-eslint › eslint-plugin-react › issues › 3862
[Bug]: React version not specified... even if it is · Issue #3862 · jsx-eslint/eslint-plugin-react
November 2, 2024 - See https://github.com/jsx-eslint/eslint-plugin-react#configuration . Warning: React version specified in eslint-plugin-react-settings must be a valid semver version, or "detect"; got “bunk”
Author   sheam
Find elsewhere
🌐
Lightrun
lightrun.com › answers › jsx-eslint-eslint-plugin-react-warning-react-version-not-specified-in-eslint-plugin-react-settings-part-2
Warning: React version not specified in eslint-plugin-react settings ...
module.exports = { root: true, env: { node: true, browser: true }, parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { jsx: true }, settings: { react: { version: 'detect' }, 'import/resolver': { node: { paths: ['src'], extensions: ['.js', '.jsx', '.ts', '.tsx'] } } } }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:import/recommended', 'plugin:import/typescript', 'plugin:@typescript-eslint/recommended', 'eslint-config-prettier' ], rules: { 'react/react-in-jsx-scope': 'off', semi: [2, 'always'] } }; Here is a repro repo where I’m currently having the issue: https://github.com/juliehchung/test-dash ... insert this code at at .eslintrc.json { … settings: { react: { version: ‘detect’ }, } … } Read more comments on GitHub > reactjs - Warning: React version not specified in 'eslint-plugin ...
🌐
GitHub
github.com › jsx-eslint › eslint-plugin-react › issues › 3802
[Bug]: Warning: React version not specified in eslint-plugin-react settings · Issue #3802 · jsx-eslint/eslint-plugin-react
June 20, 2024 - pnpm lint:fix  INT ✘ > react-ts-vite-template@1.2.6 lint:fix /media/Storage/Projects/Experiments/react-ts-vite-template > pnpm lint --fix > react-ts-vite-template@1.2.6 lint /media/Storage/Projects/Experiments/react-ts-vite-template > eslint src "--fix" Warning: React version not specified in eslint-plugin-react settings.
Author   SalahAdDin
🌐
GitHub
github.com › yannickcr › eslint-plugin-react › issues › 1963
Plugin Usage: Warning: React version not specified in eslint-p...
July 28, 2018 - I have the settings object in my eslintrc.json with the "settings": { "react": { "version" : "16.3.2" }}, along with rules: "rules": { "semi": ["error", "always"], "eqeqeq": "off", "react/jsx-no-bind": "off", "react/no-deprecated": "error", "no-console": "error" } If I put react (or "plugin:react/recommended" into extends I no longer receive the warning, but I don't want to extend the rules.
Author   bhardy
🌐
YouTube
youtube.com › watch
React version not specified in eslint plugin react - YouTube
AboutPressCopyrightContact usCreatorsAdvertiseDevelopersTermsPrivacyPolicy & SafetyHow YouTube worksTest new featuresNFL Sunday Ticket · © 2025 Google LLC
Published   February 5, 2024
🌐
GitHub
github.com › jsx-eslint › eslint-plugin-react › issues › 2218
Warning: React version not specified when used with monorepo · Issue #2218 · jsx-eslint/eslint-plugin-react
February 19, 2019 - ./ ├── package.json # react is not installed in this package ├── .eslintrc # root lint config ├── packages/ | └── react-foo/ | | ├── package.json # react installed | | ├── .eslintrc # react-specific lint overrides | | └── src/ | | └── ... | └── not-react-foo/ | ├── package.json | └── src/ | └── ... └── ... I believe this is due to this tools version.js using process.cwd() to check for react at the (cwd) directory where the command was ran, ie the root (./.eslintrc), instead of directory from where the eslint configuration for eslint-plugin-react is specified, ie ./packages/react-foo/.eslintrc.
Author   jagretz