{"id":19889,"library":"eslint-plugin-react-app","title":"eslint-plugin-react-app","description":"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.","status":"active","version":"6.2.2","language":"javascript","source_language":"en","source_url":"https://github.com/mmazzarolo/eslint-plugin-react-app","tags":["javascript"],"install":[{"cmd":"npm install eslint-plugin-react-app","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-react-app","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-react-app","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency - must be installed separately","package":"eslint","optional":false}],"imports":[{"note":"Main exported config; use as a string in ESLint extends array.","wrong":"extends: ['eslint:recommended', 'plugin:react-app/recommended'] (double extends, but not wrong per se; common mistake is omitting 'plugin:' prefix)","symbol":"plugin:react-app/recommended","correct":"extends: ['plugin:react-app/recommended'] in .eslintrc"},{"note":"All rules from included plugins must be namespaced with 'react-app/' to avoid collisions.","wrong":"'react/react-in-jsx-scope': ['warn'] (missing 'react-app/' prefix) leads to 'Definition for rule 'react/react-in-jsx-scope' was not found'","symbol":"react-app/react/react-in-jsx-scope","correct":"'react-app/react/react-in-jsx-scope': ['warn'] in rules"},{"note":"Both 'react-app' and 'plugin:react-app/recommended' are valid. The latter is recommended for clarity.","wrong":"extends: 'react-app' (missing array brackets - ESLint accepts string, but common mistake is using wrong key 'plugins' instead of 'extends')","symbol":"react-app","correct":"extends: ['react-app'] (also works without 'plugin:' prefix for the base config)"}],"quickstart":{"code":"// Install\nnpm install --save-dev eslint eslint-plugin-react-app@6.2.2\n\n// .eslintrc.json\n{\n  \"extends\": [\"plugin:react-app/recommended\"],\n  \"rules\": {\n    \"react-app/react/react-in-jsx-scope\": [\"warn\"]\n  }\n}\n\n// Then lint:\nnpx eslint src/","lang":"json","description":"Installs eslint and the plugin, then configures ESLint to use the CRA recommended rules and override one rule."},"warnings":[{"fix":"Prefix any rule from eslint-plugin-import, eslint-plugin-react, etc. with 'react-app/', e.g., 'react-app/react/jsx-uses-react'.","message":"All rules from sub-plugins must be prefixed with 'react-app/' to avoid 'Definition for rule not found' errors.","severity":"gotcha","affected_versions":">=5.0.0"},{"fix":"Review changelog of eslint-config-react-app for rule changes; adjust your overrides.","message":"Version 6.0.0 updated eslint-config-react-app to 5.0.0, which may include breaking rule changes (e.g., new TypeScript rules).","severity":"breaking","affected_versions":">=6.0.0 <7.0.0"},{"fix":"Consider using @rushstack/eslint-config or direct eslint-config-react-app with all peer deps for official support.","message":"This plugin is not maintained by the CRA team; it may lag behind upstream eslint-config-react-app updates.","severity":"deprecated","affected_versions":"*"},{"fix":"Stay on ESLint 6.x or use later version of eslint-plugin-react-app if available (currently none). Check peerDependencies.","message":"Requires ESLint 6.x; incompatible with ESLint 7+.","severity":"gotcha","affected_versions":">=6.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev eslint-plugin-react-app` and ensure it's in package.json.","cause":"Plugin package not installed or not in node_modules.","error":"Error: Failed to load plugin 'react-app' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-react-app'"},{"fix":"Use 'react-app/react/react-in-jsx-scope' instead.","cause":"Rule name without 'react-app/' prefix.","error":"Error: Definition for rule 'react/react-in-jsx-scope' was not found"},{"fix":"Delete node_modules and package-lock.json, then reinstall.","cause":"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.","error":"ESLint couldn't find the plugin \"eslint-plugin-import\"."},{"fix":"Downgrade ESLint to 6.x: `npm install --save-dev eslint@6`.","cause":"Incompatible ESLint version (e.g., ESLint 7).","error":"TypeError: Cannot read property 'some' of undefined (eslint-plugin-import)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}