Registry / testing / eslint-plugin-jest-extended

eslint-plugin-jest-extended

JSON →
library3.0.1jsnpmunverified

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.

npm install eslint-plugin-jest-extended
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-JEST
E
eslint-plugin-jest-extended
testingjavascriptv3.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
const jestExtended = require('eslint-plugin-jest-extended');
import jestExtended from 'eslint-plugin-jest-extended';
The package is CommonJS-only; ESM import may fail without a bundler that handles CJS interop.
configs
jestExtended.configs['flat/all']
jestExtended.configs.all
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.
rules
"jest-extended/prefer-to-be-true": "warn"
"jest-extended/prefer-to-be-true": "error"
Rule names are prefixed with 'jest-extended/' when configuring in .eslintrc under rules section.

Shows both .eslintrc and flat config usage to enable plugin and configure rules.

// .eslintrc.json { "plugins": ["jest-extended"], "rules": { "jest-extended/prefer-to-be-true": "warn", "jest-extended/prefer-to-be-false": "error" } } // eslint.config.js const jestExtended = require('eslint-plugin-jest-extended'); module.exports = [ { files: ['**/*.test.js', '**/*.spec.js'], ...jestExtended.configs['flat/all'], rules: { 'jest-extended/prefer-to-be-true': 'warn', }, }, ];
Debug
Known issues
breakingv3.0.0 drops support for Node v14 and Node v18 versions below 18.12.0
fix
Upgrade Node to ^16.10.0 || ^18.12.0 || >=20.0.0
affects: >=3.0.0
breakingv3.0.0 raises minimum peer dependency for @typescript-eslint/utils to v6; v7 and v8 also supported.
fix
If using TypeScript-related ESLint configs, ensure @typescript-eslint/utils is at least v6.
affects: >=3.0.0
gotchaThe 'all' config may change in any release and is not suitable for long-term consistency.
fix
Pin to specific rules instead of using 'all' configuration for stable behavior.
affects: >=2.0.0
deprecatedv2.x is no longer maintained; upgrades to v3 are recommended.
fix
Upgrade to v3.0.1 with `npm install eslint-plugin-jest-extended@latest`.
affects: >=2.0.0 <3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-jest-extended'
Package not installed or missing from node_modules
fix
Run `npm install --save-dev eslint-plugin-jest-extended`
Configuration for rule "jest-extended/prefer-to-be-true" is invalid
Typo in rule name or using 'jest-extended' as a rule without proper plugin declaration
fix
Ensure plugin is listed in 'plugins': ['jest-extended'] and rule names are correct (e.g., 'jest-extended/prefer-to-be-true')
ESLint couldn't find the plugin "eslint-plugin-jest-extended".
Plugin not installed, or ESLint is global and plugin is local
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`
TypeError: Cannot read properties of undefined (reading 'flat/all')
Using an older version before flat config support was added (v2.3.0)
fix
Upgrade to v2.3.0 or later, or use .eslintrc syntax
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
eslintrequiredpeer dependency for ESLint plugin functionality
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-jest-extended — npm install eslint-plugin-jest-extended · libregistry