@html-eslint/parser
Advanced tools
Comparing version 0.0.4 to 0.1.0
@@ -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" | ||
} |
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
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
8033
295