Registry / testing / eslint-config-react

eslint-config-react

JSON →
library1.1.7jsnpmunverified

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.

npm install eslint-config-react
INSTALL
IMPORT
SIG · ESLINT-CONFIG-REAC
E
eslint-config-react
testingjavascriptv1.1.7
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

config (extend name 'react')
✓ // .eslintrc { "extends": "react" }
✗ // Incorrect: extending 'react' from a scoped package { "extends": "@patrio/react" }
The config is referred to by the string 'react' in the extends field, not by npm package path. This is a shareable config pattern.
ESLint config object
✓ import config from 'eslint-config-react'; // if using programmatic API
✗ // CJS require - works, but ESM is preferred const config = require('eslint-config-react');
The package exports a plain object. Both ESM and CJS are supported, but CJS is more common for config files.
Plugins usage
✓ // .eslintrc { "extends": "react", "plugins": ["react"] // optional, config includes it }
✗ // Missing babel-eslint parser { "extends": "react", "parserOptions": { "ecmaFeatures": { "jsx": true } } }
The config expects babel-eslint as parser. Not setting it will cause parsing errors on JSX.

Example of installing and configuring eslint-config-react with required dependencies and ESLint config file.

// Install dependencies npm install --save-dev eslint eslint-config-react babel-eslint eslint-plugin-react // Create .eslintrc { "extends": "react", "env": { "browser": true, "es6": true }, "parser": "babel-eslint", "parserOptions": { "ecmaFeatures": { "jsx": true }, "ecmaVersion": 6, "sourceType": "module" }, "rules": { // Your overrides } } // Then run ESLint npx eslint src/
Debug
Known issues
deprecatedPackage is unmaintained since 2016. Use modern alternatives like eslint-config-react-app or @eslint-react/eslint-plugin.
fix
Migrate to eslint-config-react-app: npm install eslint-config-react-app and extend 'react-app'.
affects: >=1.0.0
breakingv1.1.1 removed 'env' from config. You must set env in your project's .eslintrc.
fix
Add env (e.g., 'browser: true') in your .eslintrc file.
affects: >=1.1.1
breakingv1.0.2 deprecated 'react/jsx-quotes' in favor of 'jsx-quotes'. The config was updated accordingly.
fix
Use 'jsx-quotes' rule instead of 'react/jsx-quotes'.
affects: >=1.0.2
gotchaThe config does not set a parser. You must manually set parser to 'babel-eslint' in your project's .eslintrc.
fix
Set 'parser': 'babel-eslint' in your .eslintrc.
affects: >=1.0.0
gotchaThe config requires eslint-plugin-react as a peer dependency. Missing it will cause runtime errors.
fix
Install eslint-plugin-react: npm install --save-dev eslint-plugin-react
affects: >=1.0.0
deprecatedThe config uses deprecated ESLint rules like prefer-reflect (removed in ESLint 3+).
fix
Remove or replace 'prefer-reflect' rule with alternatives; upgrade to a modern config.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-react'
Missing peer dependency eslint-plugin-react.
fix
npm install --save-dev eslint-plugin-react
Error: Cannot find module 'babel-eslint'
Missing peer dependency babel-eslint.
fix
npm install --save-dev babel-eslint
Error: Failed to load plugin 'react' declared in .eslintrc: Cannot find module 'eslint-plugin-react'
Missing plugin dependency or incorrect extends path.
fix
Ensure eslint-plugin-react is installed and remove any typo in the extends field.
Parsing error: Unexpected token <
JSX not parsed because parser is not set to babel-eslint.
fix
Add 'parser': 'babel-eslint' to .eslintrc.
Definition for rule 'react/jsx-no-target-blank' was not found
Version mismatch between config and plugin; config may expect a rule that does not exist in installed eslint-plugin-react version.
fix
Upgrade eslint-plugin-react to latest compatible version or remove the rule.
Upgrade
Version history
1.1.7latest on npm
Audit
Dependencies
babel-eslintrequiredNeeded for parsing JSX and ES6 features (peer dependency)
eslint-plugin-reactrequiredProvides React-specific linting rules (peer dependency)
Agent activity
4 hits · last 30 days
node
4
Resources