@html-eslint/parser
Advanced tools
Comparing version 0.13.2 to 0.14.0
@@ -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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41419
5215
1
7
110
1
+ Addedes-html-parser@^0.0.7
+ Addedes-html-parser@0.0.7(transitive)