{"id":19803,"library":"eslint-plugin-jest-extended","title":"eslint-plugin-jest-extended","description":"ESLint plugin providing rules for Jest Extended matchers, version 3.0.1 (latest stable). Released under the jest-community organization, this plugin offers rules like prefer-to-be-true, prefer-to-be-false, prefer-to-be-array, prefer-to-be-object, and prefer-to-have-been-called-once, all auto-fixable. It supports ESLint 7/8/9, Node >=16.10, and flat config. Differentiates from eslint-plugin-jest by focusing on jest-extended matchers rather than general Jest best practices. Release cadence: occasional major/minor updates with breaking changes tied to Node and ESLint version support.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/jest-community/eslint-plugin-jest-extended","tags":["javascript","jest","eslint","eslintplugin","eslint-plugin","eslint-plugin-jest"],"install":[{"cmd":"npm install eslint-plugin-jest-extended","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-jest-extended","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-jest-extended","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for ESLint plugin functionality","package":"eslint","optional":false}],"imports":[{"note":"The package is CommonJS-only; ESM import may fail without a bundler that handles CJS interop.","wrong":"import jestExtended from 'eslint-plugin-jest-extended';","symbol":"plugin","correct":"const jestExtended = require('eslint-plugin-jest-extended');"},{"note":"Flat configs are accessed via string keys like 'flat/all'; the 'flat/all' key is used in eslint.config.js. The 'all' key exists but is for .eslintrc extended syntax.","wrong":"jestExtended.configs.all","symbol":"configs","correct":"jestExtended.configs['flat/all']"},{"note":"Rule names are prefixed with 'jest-extended/' when configuring in .eslintrc under rules section.","wrong":"\"jest-extended/prefer-to-be-true\": \"error\"","symbol":"rules","correct":"\"jest-extended/prefer-to-be-true\": \"warn\""}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"plugins\": [\"jest-extended\"],\n  \"rules\": {\n    \"jest-extended/prefer-to-be-true\": \"warn\",\n    \"jest-extended/prefer-to-be-false\": \"error\"\n  }\n}\n\n// eslint.config.js\nconst jestExtended = require('eslint-plugin-jest-extended');\n\nmodule.exports = [\n  {\n    files: ['**/*.test.js', '**/*.spec.js'],\n    ...jestExtended.configs['flat/all'],\n    rules: {\n      'jest-extended/prefer-to-be-true': 'warn',\n    },\n  },\n];","lang":"javascript","description":"Shows both .eslintrc and flat config usage to enable plugin and configure rules."},"warnings":[{"fix":"Upgrade Node to ^16.10.0 || ^18.12.0 || >=20.0.0","message":"v3.0.0 drops support for Node v14 and Node v18 versions below 18.12.0","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"If using TypeScript-related ESLint configs, ensure @typescript-eslint/utils is at least v6.","message":"v3.0.0 raises minimum peer dependency for @typescript-eslint/utils to v6; v7 and v8 also supported.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Pin to specific rules instead of using 'all' configuration for stable behavior.","message":"The 'all' config may change in any release and is not suitable for long-term consistency.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Upgrade to v3.0.1 with `npm install eslint-plugin-jest-extended@latest`.","message":"v2.x is no longer maintained; upgrades to v3 are recommended.","severity":"deprecated","affected_versions":">=2.0.0 <3.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-jest-extended`","cause":"Package not installed or missing from node_modules","error":"Error: Cannot find module 'eslint-plugin-jest-extended'"},{"fix":"Ensure plugin is listed in 'plugins': ['jest-extended'] and rule names are correct (e.g., 'jest-extended/prefer-to-be-true')","cause":"Typo in rule name or using 'jest-extended' as a rule without proper plugin declaration","error":"Configuration for rule \"jest-extended/prefer-to-be-true\" is invalid"},{"fix":"Install plugin locally or globally to match ESLint installation: `npm install --save-dev eslint-plugin-jest-extended` or `npm install -g eslint-plugin-jest-extended`","cause":"Plugin not installed, or ESLint is global and plugin is local","error":"ESLint couldn't find the plugin \"eslint-plugin-jest-extended\"."},{"fix":"Upgrade to v2.3.0 or later, or use .eslintrc syntax","cause":"Using an older version before flat config support was added (v2.3.0)","error":"TypeError: Cannot read properties of undefined (reading 'flat/all')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}