{"id":19806,"library":"eslint-plugin-jest-react","title":"eslint-plugin-jest-react","description":"An ESLint plugin providing linting rules for Jest tests in React projects. Current stable version is 0.1.0, with low release cadence (last update likely stale). Key differentiator: combines Jest and React specific rules. However, the official community ESLint Jest plugin (eslint-plugin-jest) is more actively maintained and recommended; this plugin may have niche value only for the `no-mocking-react` rule.","status":"maintenance","version":"0.1.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/Codecademy/eslint-plugin-jest-react","tags":["javascript","eslint","jest","react","dev"],"install":[{"cmd":"npm install eslint-plugin-jest-react","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-jest-react","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-jest-react","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required as the plugin integrates with ESLint","package":"eslint","optional":false}],"imports":[{"note":"Use the recommended config to enable all rules with sensible defaults.","wrong":"plugins: ['jest-react'] without extends","symbol":"plugin:jest-react/recommended","correct":"extends: ['plugin:jest-react/recommended']"},{"note":"Rules are prefixed with 'jest-react/' in ESLint configs.","wrong":"plugins: ['jest-react'] but not adding rules","symbol":"Rules (e.g., jest-react/no-mocking-react)","correct":"{\n  \"rules\": {\n    \"jest-react/no-mocking-react\": \"warn\"\n  }\n}"},{"note":"ESLint automatically shortens the plugin name; you only need 'jest-react'.","wrong":"plugins: ['eslint-plugin-jest-react']","symbol":"Plugin declaration","correct":"plugins: ['jest-react']"}],"quickstart":{"code":"// Install: yarn add --dev eslint eslint-plugin-jest-react\n// .eslintrc.js\nmodule.exports = {\n  plugins: ['jest-react'],\n  extends: ['plugin:jest-react/recommended'],\n  rules: {\n    'jest-react/no-mocking-react': 'error'\n  }\n};","lang":"javascript","chars":300,"description":"Shows how to install and configure the plugin in ESLint to lint Jest tests in React projects."},"warnings":[{"fix":"Switch to eslint-plugin-jest and eslint-plugin-testing-library for React testing patterns.","message":"Plugin is not maintained; last update over 2 years ago. Consider using active alternatives like eslint-plugin-jest.","severity":"breaking","affected_versions":"all"},{"fix":"Use ESLint 8 with .eslintrc format, or migrate to flat config with compatible plugins.","message":"eslint-plugin-jest-react may not work with ESLint >= 9 due to config changes (flat config).","severity":"deprecated","affected_versions":"0.1.0"},{"fix":"Review each rule after extending the recommended config, and disable/override as needed.","message":"The recommended config 'plugin:jest-react/recommended' may enable rules that conflict with Jest's environment or other ESLint rules.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: yarn add --dev eslint eslint-plugin-jest-react","cause":"Missing peer dependency 'eslint' or plugin not installed.","error":"Error: Failed to load plugin 'jest-react'"},{"fix":"Use standard severity: 'off', 'warn', or 'error'.","cause":"Rule configured with wrong severity or extra options.","error":"Configuration for rule 'jest-react/no-mocking-react' is invalid"},{"fix":"Add 'parserOptions: { sourceType: 'module' }' in ESLint config.","cause":"ESLint parser does not support ES modules by default.","error":"Parsing error: 'import' and 'export' may only appear at the top level"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}