Socket
Socket
Sign inDemoInstall

hermes-eslint

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hermes-eslint - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

42

dist/scope-manager/referencer/PatternVisitor.js

@@ -35,4 +35,28 @@ /**

this._typeAnnotationCallback = typeAnnotationCallback;
} //
// Helpers
//
visitCallExpression(node) {
// arguments are right hand nodes.
node.arguments.forEach(a => {
this.rightHandNodes.push(a);
});
this.visit(node.callee);
}
visitMemberExpression(node) {
// Computed property's key is a right hand node.
if (node.computed === true) {
this.rightHandNodes.push(node.property);
} // the object is only read, write to its property.
this.rightHandNodes.push(node.object);
} //
// Visitors
//
ArrayExpression(node) {

@@ -71,7 +95,3 @@ this.visitArray(node.elements);

CallExpression(node) {
// arguments are right hand nodes.
node.arguments.forEach(a => {
this.rightHandNodes.push(a);
});
this.visit(node.callee);
this.visitCallExpression(node);
}

@@ -96,9 +116,11 @@

MemberExpression(node) {
// Computed property's key is a right hand node.
if (node.computed === true) {
this.rightHandNodes.push(node.property);
} // the object is only read, write to its property.
this.visitMemberExpression(node);
}
OptionalCallExpression(node) {
this.visitCallExpression(node);
}
this.rightHandNodes.push(node.object);
OptionalMemberExpression(node) {
this.visitMemberExpression(node);
}

@@ -105,0 +127,0 @@

@@ -128,2 +128,7 @@ /**

visitCallExpression(node) {
this.visitChildren(node, ['typeArguments']);
this.visitType(node.typeArguments);
}
visitClass(node) {

@@ -300,4 +305,3 @@ _ClassVisitor.ClassVisitor.visit(this, node);

CallExpression(node) {
this.visitChildren(node, ['typeArguments']);
this.visitType(node.typeArguments);
this.visitCallExpression(node);
}

@@ -465,2 +469,6 @@

OptionalCallExpression(node) {
this.visitCallExpression(node);
}
OptionalMemberExpression(node) {

@@ -578,2 +586,6 @@ this.visitMemberExpression(node);

DeclareModuleExports(node) {
this.visitType(node);
}
DeclareInterface(node) {

@@ -580,0 +592,0 @@ this.visitType(node);

@@ -121,2 +121,6 @@ /**

DeclareModuleExports(node) {
this.visit(node.typeAnnotation);
}
DeclareFunction(node) {

@@ -227,6 +231,14 @@ this._referencer.currentScope().defineIdentifier(node.id, new _definition.FunctionNameDefinition(node.id, node)); // the function type is stored as an annotation on the ID

currentNode = currentNode.qualification;
} // qualified names can only reference values!
} // qualified names *usually* only reference values like
// import * as Foo from 'foo';
// type T = Foo.Bar;
// however, it is possible for a module to do something like
// class Class { ... }
// export default { Class }
// meaning this is also valid
// import type Foo from 'foo';
// type T = Foo.Class;
this._referencer.currentScope().referenceValue(currentNode);
this._referencer.currentScope().referenceDualValueType(currentNode);
}

@@ -233,0 +245,0 @@

{
"name": "hermes-eslint",
"version": "0.6.0",
"version": "0.7.0",
"description": "A custom parser for ESLint using the Hermes parser",

@@ -16,5 +16,5 @@ "main": "dist/index.js",

"esrecurse": "^4.3.0",
"hermes-estree": "0.6.0",
"hermes-parser": "0.6.0"
"hermes-estree": "0.7.0",
"hermes-parser": "0.7.0"
}
}

Sorry, the diff of this file is not supported yet

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