{"id":19566,"library":"eslint-config-react","title":"eslint-config-react (deprecated ESLint shareable config)","description":"An opinionated ESLint shareable config for React projects (v1.1.7). Last released in 2016, it is unmaintained and superseded by eslint-config-react-app and other modern configs. It bundles a set of ESLint rules plus recommended React plugin rules, but requires manual installation of babel-eslint and eslint-plugin-react. Key differentiators: opinionated, includes rules like arrow-parens and prefer-reflect; however, it does not support ESLint 3+ and actively removed env and certain rules. Not recommended for new projects.","status":"deprecated","version":"1.1.7","language":"javascript","source_language":"en","source_url":"https://github.com/patrio/eslint-config-react","tags":["javascript","eslint","eslintconfig"],"install":[{"cmd":"npm install eslint-config-react","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-react","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-react","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Needed for parsing JSX and ES6 features (peer dependency)","package":"babel-eslint","optional":false},{"reason":"Provides React-specific linting rules (peer dependency)","package":"eslint-plugin-react","optional":false}],"imports":[{"note":"The config is referred to by the string 'react' in the extends field, not by npm package path. This is a shareable config pattern.","wrong":"// Incorrect: extending 'react' from a scoped package\n{\n  \"extends\": \"@patrio/react\"\n}","symbol":"config (extend name 'react')","correct":"// .eslintrc\n{\n  \"extends\": \"react\"\n}"},{"note":"The package exports a plain object. Both ESM and CJS are supported, but CJS is more common for config files.","wrong":"// CJS require - works, but ESM is preferred\nconst config = require('eslint-config-react');","symbol":"ESLint config object","correct":"import config from 'eslint-config-react'; // if using programmatic API"},{"note":"The config expects babel-eslint as parser. Not setting it will cause parsing errors on JSX.","wrong":"// Missing babel-eslint parser\n{\n  \"extends\": \"react\",\n  \"parserOptions\": {\n    \"ecmaFeatures\": {\n      \"jsx\": true\n    }\n  }\n}","symbol":"Plugins usage","correct":"// .eslintrc\n{\n  \"extends\": \"react\",\n  \"plugins\": [\"react\"] // optional, config includes it\n}"}],"quickstart":{"code":"// Install dependencies\nnpm install --save-dev eslint eslint-config-react babel-eslint eslint-plugin-react\n\n// Create .eslintrc\n{\n  \"extends\": \"react\",\n  \"env\": {\n    \"browser\": true,\n    \"es6\": true\n  },\n  \"parser\": \"babel-eslint\",\n  \"parserOptions\": {\n    \"ecmaFeatures\": {\n      \"jsx\": true\n    },\n    \"ecmaVersion\": 6,\n    \"sourceType\": \"module\"\n  },\n  \"rules\": {\n    // Your overrides\n  }\n}\n\n// Then run ESLint\nnpx eslint src/","lang":"javascript","description":"Example of installing and configuring eslint-config-react with required dependencies and ESLint config file."},"warnings":[{"fix":"Migrate to eslint-config-react-app: npm install eslint-config-react-app and extend 'react-app'.","message":"Package is unmaintained since 2016. Use modern alternatives like eslint-config-react-app or @eslint-react/eslint-plugin.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Add env (e.g., 'browser: true') in your .eslintrc file.","message":"v1.1.1 removed 'env' from config. You must set env in your project's .eslintrc.","severity":"breaking","affected_versions":">=1.1.1"},{"fix":"Use 'jsx-quotes' rule instead of 'react/jsx-quotes'.","message":"v1.0.2 deprecated 'react/jsx-quotes' in favor of 'jsx-quotes'. The config was updated accordingly.","severity":"breaking","affected_versions":">=1.0.2"},{"fix":"Set 'parser': 'babel-eslint' in your .eslintrc.","message":"The config does not set a parser. You must manually set parser to 'babel-eslint' in your project's .eslintrc.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Install eslint-plugin-react: npm install --save-dev eslint-plugin-react","message":"The config requires eslint-plugin-react as a peer dependency. Missing it will cause runtime errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Remove or replace 'prefer-reflect' rule with alternatives; upgrade to a modern config.","message":"The config uses deprecated ESLint rules like prefer-reflect (removed in ESLint 3+).","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install --save-dev eslint-plugin-react","cause":"Missing peer dependency eslint-plugin-react.","error":"Error: Cannot find module 'eslint-plugin-react'"},{"fix":"npm install --save-dev babel-eslint","cause":"Missing peer dependency babel-eslint.","error":"Error: Cannot find module 'babel-eslint'"},{"fix":"Ensure eslint-plugin-react is installed and remove any typo in the extends field.","cause":"Missing plugin dependency or incorrect extends path.","error":"Error: Failed to load plugin 'react' declared in .eslintrc: Cannot find module 'eslint-plugin-react'"},{"fix":"Add 'parser': 'babel-eslint' to .eslintrc.","cause":"JSX not parsed because parser is not set to babel-eslint.","error":"Parsing error: Unexpected token <"},{"fix":"Upgrade eslint-plugin-react to latest compatible version or remove the rule.","cause":"Version mismatch between config and plugin; config may expect a rule that does not exist in installed eslint-plugin-react version.","error":"Definition for rule 'react/jsx-no-target-blank' was not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}