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.13.2 to 0.14.0

lib/parser.js

16

lib/index.js

@@ -1,15 +0,5 @@

const Parser = require("./parser");
const { visitorKeys } = require("./visitor-keys");
const PostProcessor = require("./postprocessor/postprocessor");
const { parseForESLint } = require("./parser");
exports.parseForESLint = function parseForESLint(code) {
const parser = new Parser({ sourceCodeLocationInfo: true });
const postProcessor = new PostProcessor();
const ast = parser.parse(code);
const after = postProcessor.process(ast);
return {
ast: after,
scopeManager: null,
visitorKeys,
};
module.exports = {
parseForESLint,
};

@@ -0,11 +1,51 @@

const { NodeTypes } = require("es-html-parser");
const visitorKeys = {
Program: ["childNodes"],
"#document": ["childNodes"],
html: ["childNodes"],
head: ["childNodes"],
body: ["childNodes"],
Program: ["body"],
[NodeTypes.Attribute]: ["key", "startWrapper", "endWrapper", "value"],
[NodeTypes.AttributeKey]: [],
[NodeTypes.AttributeValue]: [],
[NodeTypes.AttributeValueWrapperEnd]: [],
[NodeTypes.AttributeValueWrapperStart]: [],
[NodeTypes.CloseScriptTag]: [],
[NodeTypes.CloseStyleTag]: [],
[NodeTypes.CloseTag]: [],
[NodeTypes.Comment]: ["open", "close", "value"],
[NodeTypes.CommentContent]: [],
[NodeTypes.CommentOpen]: [],
[NodeTypes.CommentClose]: [],
[NodeTypes.Doctype]: ["open", "close", "attributes"],
[NodeTypes.DoctypeAttribute]: ["startWrapper", "value", "endWrapper"],
[NodeTypes.DoctypeAttributeValue]: [],
[NodeTypes.DoctypeAttributeWrapperEnd]: [],
[NodeTypes.DoctypeAttributeWrapperStart]: [],
[NodeTypes.DoctypeOpen]: [],
[NodeTypes.DoctypeClose]: [],
[NodeTypes.Document]: [],
[NodeTypes.OpenScriptTagEnd]: [],
[NodeTypes.OpenScriptTagStart]: [],
[NodeTypes.OpenStyleTagEnd]: [],
[NodeTypes.OpenStyleTagStart]: [],
[NodeTypes.OpenTagEnd]: [],
[NodeTypes.OpenTagStart]: [],
[NodeTypes.ScriptTag]: [
"attributes",
"openStart",
"openEnd",
"close",
"value",
],
[NodeTypes.ScriptTagContent]: [],
[NodeTypes.StyleTag]: [
"attributes",
"openStart",
"openEnd",
"close",
"value",
],
[NodeTypes.StyleTagContent]: [],
[NodeTypes.Tag]: ["openStart", "openEnd", "close", "children", "attributes"],
[NodeTypes.Text]: [],
};
module.exports = {
visitorKeys,
};
module.exports = { visitorKeys };
{
"name": "@html-eslint/parser",
"version": "0.13.2",
"version": "0.14.0",
"description": "Parser for @html-eslint/eslint-plugin",

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

"scripts": {
"test": "jest --coverage --updateSnapshot"
"test": "jest --coverage --updateSnapshot --passWithNoTests"
},

@@ -33,3 +33,6 @@ "engines": {

},
"gitHead": "3f1599284d5725db38e0984ecdcd283a76a530fa"
"dependencies": {
"es-html-parser": "^0.0.7"
},
"gitHead": "3b5398af6d9432407296dd3b20806c6142ac3d1a"
}
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