Socket
Socket
Sign inDemoInstall

@html-eslint/parser

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@html-eslint/parser - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

34

lib/postprocessor/postprocessor.js

@@ -19,16 +19,11 @@ const {

process(node) {
if (node.type === "#document") {
this.processOnDocument(node);
if (typeof this[node.type] === "function") {
this[node.type](node);
}
if (node.type === "#text") {
this.processOnText(node);
}
if (node.type === "#comment") {
this.processOnComment(node);
}
if (node.type === "#documentType") {
this.processOnDocumentType(node);
}
this.processOnCommonNode(node);
return node;
}
processOnCommonNode(node) {
if (Array.isArray(node.childNodes)) {

@@ -46,6 +41,5 @@ node.childNodes.forEach((child) => {

delete node.parentNode;
return node;
}
processOnDocument(node) {
["#document"](node) {
const locNode = getLocFromChildNodes(node.childNodes);

@@ -60,3 +54,3 @@ node.type = "Program";

processOnText(node) {
["#text"](node) {
this.skipCommonProcess = true;

@@ -67,3 +61,3 @@ node.type = "text";

processOnComment(node) {
["#comment"](node) {
this.skipCommonProcess = true;

@@ -93,3 +87,3 @@ node.type = "comment";

processOnDocumentType(node) {
["#documentType"](node) {
node.type = "documentType";

@@ -99,2 +93,10 @@ this.skipCommonProcess = true;

["template"](node) {
if (!Array.isArray(node.childNodes)) {
node.childNodes = [];
}
node.childNodes.push(...node.content.childNodes);
delete node.content;
}
processOnNode(node) {

@@ -101,0 +103,0 @@ if (node.type[0] === "#") {

{
"name": "@html-eslint/parser",
"version": "0.10.0",
"version": "0.10.1",
"description": "Parser for @html-eslint/eslint-plugin",

@@ -32,3 +32,3 @@ "author": "yeonjuan",

},
"gitHead": "27a9558d936c67cb9e11df1b40a84d7b96bbbb43"
"gitHead": "827103223429c0a629d2823512df21fdf511edb5"
}
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