Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-testing-library

Package Overview
Dependencies
Maintainers
3
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-testing-library - npm Package Compare versions

Comparing version 5.7.2 to 5.7.3

2

package.json
{
"name": "eslint-plugin-testing-library",
"version": "5.7.2",
"version": "5.7.3",
"description": "ESLint rules for Testing Library",

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

@@ -75,2 +75,17 @@ "use strict";

}
function isSideEffectInVariableDeclaration(node) {
return node.declarations.some((declaration) => {
if ((0, node_utils_1.isCallExpression)(declaration.init)) {
const test = (0, node_utils_1.getPropertyIdentifierNode)(declaration.init);
if (!test) {
return false;
}
return (helpers.isFireEventUtil(test) ||
helpers.isUserEventUtil(test) ||
helpers.isRenderUtil(test));
}
return false;
});
return false;
}
function getSideEffectNodes(body) {

@@ -85,2 +100,6 @@ return body.filter((node) => {

}
if ((0, node_utils_1.isVariableDeclaration)(node) &&
isSideEffectInVariableDeclaration(node)) {
return true;
}
const expressionIdentifier = (0, node_utils_1.getPropertyIdentifierNode)(node);

@@ -87,0 +106,0 @@ if (!expressionIdentifier) {

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