Socket
Socket
Sign inDemoInstall

eslint-plugin-jest

Package Overview
Dependencies
Maintainers
9
Versions
325
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jest - npm Package Compare versions

Comparing version 28.1.1 to 28.2.0

7

lib/rules/utils/parseJestFnCall.js

@@ -312,5 +312,6 @@ "use strict";

if (maybeImport) {
// the identifier is imported from @jest/globals,
// so return the original import name
if (maybeImport.source === '@jest/globals') {
const globalPackage = context.settings.jest?.globalPackage ?? '@jest/globals';
// the identifier is imported from our global package so return the original import name
if (maybeImport.source === globalPackage) {
return {

@@ -317,0 +318,0 @@ original: maybeImport.imported,

{
"name": "eslint-plugin-jest",
"version": "28.1.1",
"version": "28.2.0",
"description": "ESLint rules for Jest",

@@ -5,0 +5,0 @@ "keywords": [

@@ -90,2 +90,23 @@ <div align="center">

#### Aliased `@jest/globals`
You can tell this plugin to treat a different package as the source of Jest
globals using the `globalPackage` setting:
```json
{
"settings": {
"jest": {
"globalPackage": "bun:test"
}
}
}
```
> [!WARNING]
>
> While this can be used to apply rules when using alternative testing libraries
> and frameworks like `bun`, `vitest` and `node`, there's no guarantee the
> semantics this plugin assumes will hold outside of Jest
### Running rules only on test-related files

@@ -92,0 +113,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc