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
muslnode 18–226 runs
build_error
glibcnode 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/
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-react'
Missing peer dependency eslint-plugin-react.
fixnpm install --save-dev eslint-plugin-react
Error: Cannot find module 'babel-eslint'
Missing peer dependency babel-eslint.
fixnpm 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.
fixEnsure 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.
fixAdd '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.
fixUpgrade eslint-plugin-react to latest compatible version or remove the rule.
Audit
Dependencies
babel-eslintrequiredNeeded for parsing JSX and ES6 features (peer dependency)
eslint-plugin-reactrequiredProvides React-specific linting rules (peer dependency)