Registry / testing / eslint-plugin-react-app

eslint-plugin-react-app

JSON →
library6.2.2jsnpmunverified

ESLint configuration and rules bundle based on Create React App's eslint-config-react-app. Version 6.2.2 wraps eslint-config-react-app 5.2.1 and includes plugins for import, flowtype, JSX-a11y, React, React Hooks, and TypeScript. Designed as a single-dependency drop-in for CRA-style linting without manually installing each sub-plugin. Works in React Native. Requires ESLint 6.x peer dependency. Release cadence is sporadic, tied to upstream CRA config updates.

npm install eslint-plugin-react-app
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-REAC
E
eslint-plugin-react-app
testingjavascriptv6.2.2
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.

plugin:react-app/recommended
✓ extends: ['plugin:react-app/recommended'] in .eslintrc
✗ extends: ['eslint:recommended', 'plugin:react-app/recommended'] (double extends, but not wrong per se; common mistake is omitting 'plugin:' prefix)
Main exported config; use as a string in ESLint extends array.
react-app/react/react-in-jsx-scope
✓ 'react-app/react/react-in-jsx-scope': ['warn'] in rules
✗ 'react/react-in-jsx-scope': ['warn'] (missing 'react-app/' prefix) leads to 'Definition for rule 'react/react-in-jsx-scope' was not found'
All rules from included plugins must be namespaced with 'react-app/' to avoid collisions.
react-app
✓ extends: ['react-app'] (also works without 'plugin:' prefix for the base config)
✗ extends: 'react-app' (missing array brackets - ESLint accepts string, but common mistake is using wrong key 'plugins' instead of 'extends')
Both 'react-app' and 'plugin:react-app/recommended' are valid. The latter is recommended for clarity.

Installs eslint and the plugin, then configures ESLint to use the CRA recommended rules and override one rule.

// Install npm install --save-dev eslint eslint-plugin-react-app@6.2.2 // .eslintrc.json { "extends": ["plugin:react-app/recommended"], "rules": { "react-app/react/react-in-jsx-scope": ["warn"] } } // Then lint: npx eslint src/
Debug
Known issues
gotchaAll rules from sub-plugins must be prefixed with 'react-app/' to avoid 'Definition for rule not found' errors.
fix
Prefix any rule from eslint-plugin-import, eslint-plugin-react, etc. with 'react-app/', e.g., 'react-app/react/jsx-uses-react'.
affects: >=5.0.0
breakingVersion 6.0.0 updated eslint-config-react-app to 5.0.0, which may include breaking rule changes (e.g., new TypeScript rules).
fix
Review changelog of eslint-config-react-app for rule changes; adjust your overrides.
affects: >=6.0.0 <7.0.0
deprecatedThis plugin is not maintained by the CRA team; it may lag behind upstream eslint-config-react-app updates.
fix
Consider using @rushstack/eslint-config or direct eslint-config-react-app with all peer deps for official support.
affects: *
gotchaRequires ESLint 6.x; incompatible with ESLint 7+.
fix
Stay on ESLint 6.x or use later version of eslint-plugin-react-app if available (currently none). Check peerDependencies.
affects: >=6.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'react-app' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-react-app'
Plugin package not installed or not in node_modules.
fix
Run `npm install --save-dev eslint-plugin-react-app` and ensure it's in package.json.
Error: Definition for rule 'react/react-in-jsx-scope' was not found
Rule name without 'react-app/' prefix.
fix
Use 'react-app/react/react-in-jsx-scope' instead.
ESLint couldn't find the plugin "eslint-plugin-import".
The plugin only includes eslint-config-react-app but not its sub-plugins as direct deps? Actually they are bundled. This error appears if eslint cache is stale or install corrupted.
fix
Delete node_modules and package-lock.json, then reinstall.
TypeError: Cannot read property 'some' of undefined (eslint-plugin-import)
Incompatible ESLint version (e.g., ESLint 7).
fix
Downgrade ESLint to 6.x: `npm install --save-dev eslint@6`.
Upgrade
Version history
6.2.2latest on npm
Audit
Dependencies
eslintrequiredpeer dependency - must be installed separately
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-react-app — npm install eslint-plugin-react-app · libregistry