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

firescript-linter

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firescript-linter - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

tests/integration/variable-exists/member-expression-as-property/index.fire

2

package.json
{
"name": "firescript-linter",
"version": "0.7.0",
"version": "0.8.0",
"description": "Linter for Firescript",

@@ -5,0 +5,0 @@ "main": "app.js",

const LinterNode = require('../LinterNode').LinterNode
const { VariableNotDeclared } = require('../exceptions/VariableNotDeclared')
class MemberExpression extends LinterNode {
lint (ast) {
this.lintNode(ast.object)
const obj = this.getObjectNode(ast.object)
if (obj.type === 'Identifier') {
if (!this.isScopeVar(obj.name)) {
this.lintException(new VariableNotDeclared(obj, obj.name))
}
} else {
this.debug('TODO: lint MemberExpression.object of type', obj.type)
}
this.lintNode(ast.property)
this.debug('TODO: check whether MemberExpression root is defined')
}
getObjectNode (ast) {
return ast.type === 'MemberExpression' ? this.getObjectNode(ast.object) : ast
}
}
module.exports.MemberExpression = MemberExpression

@@ -8,3 +8,2 @@ const { LinterNode } = require('../LinterNode')

if (ast.value.type === 'Identifier') {
// Right is a variable
if (!this.isScopeVar(ast.value.name)) {

@@ -11,0 +10,0 @@ this.lintException(new VariableNotDeclared(ast.value, ast.value.name))

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