New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eslint-react/ast

Package Overview
Dependencies
Maintainers
0
Versions
1054
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eslint-react/ast - npm Package Compare versions

Comparing version 1.30.1 to 1.30.2-next.0

6

dist/index.d.ts

@@ -143,5 +143,5 @@ import { _ } from '@eslint-react/eff';

/**
* Gets the ECMAScript expression from a TS expression.
* @param node The TS expression.
* @returns The ECMAScript expression within the TS expression.
* Recursively get the inner expression until it's not a TSOnlyExpression
* @param node - The node to get the expression from
* @returns The inner expression
*/

@@ -148,0 +148,0 @@ declare function getEcmaExpression(node: TSESTree.Node): Exclude<TSESTree.Node, TSESTreeTSOnlyExpression>;

@@ -22,55 +22,20 @@ 'use strict';

function getFunctionInitPath(node) {
const { parent } = node;
if (node.type === types.AST_NODE_TYPES.FunctionDeclaration) {
return [node];
}
if (parent.type === types.AST_NODE_TYPES.VariableDeclarator) {
return [
parent.parent,
parent,
node
];
const { parent } = node;
switch (true) {
case parent.type === types.AST_NODE_TYPES.VariableDeclarator:
return [parent.parent, parent, node];
case (parent.type === types.AST_NODE_TYPES.CallExpression && parent.parent.type === types.AST_NODE_TYPES.VariableDeclarator):
return [parent.parent.parent, parent.parent, parent, node];
case (parent.type === types.AST_NODE_TYPES.CallExpression && parent.parent.type === types.AST_NODE_TYPES.CallExpression && parent.parent.parent.type === types.AST_NODE_TYPES.VariableDeclarator):
return [parent.parent.parent.parent, parent.parent.parent, parent.parent, parent, node];
case (parent.type === types.AST_NODE_TYPES.Property && parent.parent.type === types.AST_NODE_TYPES.ObjectExpression && parent.parent.parent.type === types.AST_NODE_TYPES.VariableDeclarator):
return [parent.parent.parent.parent, parent.parent.parent, parent.parent, parent, node];
case (parent.type === types.AST_NODE_TYPES.MethodDefinition && parent.parent.parent.type === types.AST_NODE_TYPES.ClassDeclaration):
return [parent.parent.parent, parent.parent, parent, node];
case (parent.type === types.AST_NODE_TYPES.PropertyDefinition && parent.parent.parent.type === types.AST_NODE_TYPES.ClassDeclaration):
return [parent.parent.parent, parent.parent, parent, node];
}
if (parent.type === types.AST_NODE_TYPES.CallExpression && parent.parent.type === types.AST_NODE_TYPES.VariableDeclarator) {
return [
parent.parent.parent,
parent.parent,
parent,
node
];
}
if (parent.type === types.AST_NODE_TYPES.CallExpression && parent.parent.type === types.AST_NODE_TYPES.CallExpression && parent.parent.parent.type === types.AST_NODE_TYPES.VariableDeclarator) {
return [
parent.parent.parent.parent,
parent.parent.parent,
parent.parent,
parent,
node
];
}
if (parent.type === types.AST_NODE_TYPES.Property && parent.parent.type === types.AST_NODE_TYPES.ObjectExpression && parent.parent.parent.type === types.AST_NODE_TYPES.VariableDeclarator) {
return [
parent.parent.parent.parent,
parent.parent.parent,
parent.parent,
parent,
node
];
}
if (parent.type === types.AST_NODE_TYPES.MethodDefinition && parent.parent.parent.type === types.AST_NODE_TYPES.ClassDeclaration) {
return [
parent.parent.parent,
parent.parent,
parent,
node
];
}
if (parent.type === types.AST_NODE_TYPES.PropertyDefinition && parent.parent.parent.type === types.AST_NODE_TYPES.ClassDeclaration) {
return [
parent.parent.parent,
parent.parent,
parent,
node
];
}
return eff._;

@@ -77,0 +42,0 @@ }

{
"name": "@eslint-react/ast",
"version": "1.30.1",
"version": "1.30.2-next.0",
"description": "ESLint React's TSESTree AST utility module.",

@@ -43,3 +43,3 @@ "homepage": "https://github.com/Rel1cx/eslint-react",

"ts-pattern": "^5.6.2",
"@eslint-react/eff": "1.30.1"
"@eslint-react/eff": "1.30.2-next.0"
},

@@ -46,0 +46,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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