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

@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.0.4 to 0.1.0

18

lib/ast-converter/node-converter.js

@@ -16,8 +16,14 @@ const utils = require("./utils");

...utils.toESLocation(sourceCodeLocation, childNodes),
startTag: (sourceCodeLocation && sourceCodeLocation.startTag) ? {
...utils.toESLocation(sourceCodeLocation.startTag),
} : null,
endTag: (sourceCodeLocation && sourceCodeLocation.endTag) ? {
...utils.toESLocation(sourceCodeLocation.endTag),
}: null,
startTag:
sourceCodeLocation && sourceCodeLocation.startTag
? {
...utils.toESLocation(sourceCodeLocation.startTag),
}
: null,
endTag:
sourceCodeLocation && sourceCodeLocation.endTag
? {
...utils.toESLocation(sourceCodeLocation.endTag),
}
: null,
...(type === "Program"

@@ -24,0 +30,0 @@ ? {

@@ -47,3 +47,5 @@ function getLocFromChildNodes(childNodes) {

toType(nodeName) {
return nodeName === "#document" ? "Program" : nodeName;
let type = nodeName[0].toUpperCase() + nodeName.slice(1);
type = type.replace("#", "");
return type === "document" ? "Program" : type;
},

@@ -50,0 +52,0 @@ toESLocation(sourceCodeLocation, childNodes = []) {

const visitorKeys = {
Program: ["childNodes"],
'#document': ["childNodes"],
"#document": ["childNodes"],
html: ["childNodes"],
head: ["childNodes"],
body: ["childNodes"],
documentType: ["childNodes"],
};

@@ -9,0 +8,0 @@

{
"name": "@html-eslint/parser",
"version": "0.0.4",
"description": "> TODO: description",
"version": "0.1.0",
"description": "Parser for @html-eslint/eslint-plugin",
"author": "yeonjuan",
"homepage": "https://github.com/yeonjuan/html5-eslint#readme",
"homepage": "https://github.com/yeonjuan/html-eslint#readme",
"license": "MIT",

@@ -21,3 +21,3 @@ "main": "lib/index.js",

"type": "git",
"url": "git+https://github.com/yeonjuan/html5-eslint.git"
"url": "git+https://github.com/yeonjuan/html-eslint.git"
},

@@ -28,3 +28,3 @@ "scripts": {

"bugs": {
"url": "https://github.com/yeonjuan/html5-eslint/issues"
"url": "https://github.com/yeonjuan/html-eslint/issues"
},

@@ -34,3 +34,3 @@ "dependencies": {

},
"gitHead": "9e2b5aca74ef2b3a347d09b2bc0f06d8d2cc4050"
"gitHead": "a3fc97c0e25cffef20b3c1295998bbbab635fe5d"
}
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