{"id":20152,"library":"jest-runner-eslint","title":"Jest Runner ESLint","description":"An ESLint runner for Jest v2.3.0 that integrates ESLint linting as a Jest test runner. It supports ESLint 7/8 and Jest 27-30, with flat config support since v2.1.0. Released under the jest-community organization, it is actively maintained with a release cadence of several times per year. Key differentiators include watch mode with fix toggling via a watch plugin, multi-project support, and cosmiconfig configuration.","status":"active","version":"2.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/jest-community/jest-runner-eslint","tags":["javascript"],"install":[{"cmd":"npm install jest-runner-eslint","lang":"bash","label":"npm"},{"cmd":"yarn add jest-runner-eslint","lang":"bash","label":"yarn"},{"cmd":"pnpm add jest-runner-eslint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, required to lint files","package":"eslint","optional":false},{"reason":"peer dependency, required as the test framework","package":"jest","optional":false}],"imports":[{"note":"Configure as a Jest runner, not imported directly.","wrong":"const JestRunnerEslint = require('jest-runner-eslint'); // Not a direct import","symbol":"jest-runner-eslint","correct":"// In Jest config: runner: 'jest-runner-eslint'"},{"note":"Watch plugin to toggle --fix in watch mode.","wrong":"","symbol":"jest-runner-eslint/watch-fix","correct":"watchPlugins: ['jest-runner-eslint/watch-fix']"},{"note":"Configuration via cosmiconfig, not programmatic import.","wrong":"require('jest-runner-eslint').config(...) // No such export","symbol":"default (cosmiconfig)","correct":"// In jest-runner-eslint.config.js: module.exports = { cliOptions: { fix: true } }"}],"quickstart":{"code":"// jest-eslint.config.js\nmodule.exports = {\n  runner: 'jest-runner-eslint',\n  displayName: 'lint',\n  testMatch: ['<rootDir>/src/**/*.js'],\n  // Optional: add watch plugin\n  watchPlugins: ['jest-runner-eslint/watch-fix'],\n};\n\n// jest.config.js (or package.json)\nmodule.exports = {\n  projects: [\n    { displayName: 'test' },\n    '<rootDir>/jest-eslint.config.js',\n  ],\n};","lang":"javascript","description":"Sets up jest-runner-eslint as a project alongside Jest tests, with watch fix plugin."},"warnings":[{"fix":"Upgrade Node to >=12.13.0, ESLint to >=7, Jest to >=27","message":"Dropped support for Node 10, ESLint 6, Jest 25/26 in v2.0.0","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use eslint.config.js and ensure ESLint version is compatible","message":"Flat config support requires ESLint >=8.57.0 or ESLint 9 with flat config","severity":"breaking","affected_versions":">=2.1.0"},{"fix":"Upgrade Jest to version 27 or later","message":"Jest 27-30 supported; older Jest versions are not supported","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Use projects array in Jest config, or set testMatch to only lint files","message":"Use projects configuration to run alongside other Jest runners; otherwise testMatch must be scoped","severity":"gotcha","affected_versions":">=0"},{"fix":"Upgrade to v2.1.1 or later","message":"cliOptions.fix was ignored until v2.1.1","severity":"gotcha","affected_versions":"<2.1.1"},{"fix":"Upgrade to v2.1.2 or later","message":"Quiet mode may not suppress warnings correctly before v2.1.2","severity":"gotcha","affected_versions":"<2.1.2"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Create jest-runner-eslint.config.js or add jest-runner-eslint key in package.json","cause":"Missing cosmiconfig configuration file","error":"Could not locate jest-runner-eslint config file"},{"fix":"Set testMatch to only include source files you want linted, e.g., '<rootDir>/src/**/*.js'","cause":"testMatch includes test files or includes all files","error":"Jest: Test match is not scoped correctly"},{"fix":"Ensure ESLint is installed and config file is correct; for flat config, use v2.1.0+","cause":"ESLint config not found or incompatible","error":"ESLint: Failed to load config 'eslint:recommended'"},{"fix":"Run npm install --save-dev jest-runner-eslint","cause":"Package not installed or not in correct node_modules","error":"Cannot find module 'jest-runner-eslint'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}