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

ember-eslint-parser

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-eslint-parser - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

package.json
{
"name": "ember-eslint-parser",
"version": "0.2.1",
"version": "0.2.2",
"description": "",

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

@@ -270,8 +270,8 @@ const ContentTag = require('content-tag');

for (const part of n.tag.split('.')) {
const regex = new RegExp(`\\b${part}\\b`);
let pattern = `\\b${part}\\b`;
if (part.startsWith(':')) {
pattern = `${part}\\b`;
}
const regex = new RegExp(pattern);
const match = codeSlice.match(regex);
// named-blocks are not ElementNodes
if (!match && part.startsWith(':')) continue;
const range = [start + match.index, 0];

@@ -430,17 +430,19 @@ range[1] = range[0] + part.length;

// the whole tag + children
//
// However, with plain <footer> type nodes, there will be no "parts"
const n = node.parts?.[0] ?? node;
const name = n?.name ?? n.tag;
if (htmlTags.includes(name)) {
return null;
}
const n = node.parts[0];
const { scope, variable } = findVarInParentScopes(result.scopeManager, path, n.name) || {};
/*
register a node in scope if we found a variable
we ignore named-blocks as we know that it doesn't reference anything in current scope
if we do not find a variable we register it with a missing variable if
* it starts with upper case, it should be a component with a reference
* it includes a dot, it's a path which should have a reference
* it's NOT a standard html tag, it should have a referenced variable
*/
if (
!n.name.startsWith(':') &&
scope &&
!name.startsWith(':') &&
(variable || isUpperCase(n.name[0]) || name.includes('.') || !htmlTags.includes(name))
(variable ||
isUpperCase(n.name[0]) ||
node.name.includes('.') ||
!htmlTags.includes(node.name))
) {

@@ -447,0 +449,0 @@ registerNodeInScope(n, scope, variable);

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