@html-eslint/parser
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -8,2 +8,3 @@ const utils = require("./utils"); | ||
nodeName, | ||
attrs, | ||
sourceCodeLocation, | ||
@@ -17,2 +18,3 @@ ...extra | ||
...utils.toESLocation(sourceCodeLocation, childNodes), | ||
// start tag | ||
startTag: | ||
@@ -24,2 +26,3 @@ sourceCodeLocation && sourceCodeLocation.startTag | ||
: null, | ||
// end tag | ||
endTag: | ||
@@ -31,2 +34,11 @@ sourceCodeLocation && sourceCodeLocation.endTag | ||
: null, | ||
// attributes | ||
attrs: attrs | ||
? attrs.map((attr) => ({ | ||
...attr, | ||
...(sourceCodeLocation && sourceCodeLocation.attrs | ||
? utils.getAttrLocation(sourceCodeLocation, attr.name) | ||
: null), | ||
})) | ||
: [], | ||
...(type === "Program" | ||
@@ -33,0 +45,0 @@ ? { |
@@ -71,2 +71,8 @@ function getLocFromChildNodes(childNodes) { | ||
}, | ||
getAttrLocation(sourceCodeLocation, attrName) { | ||
if (sourceCodeLocation && sourceCodeLocation.attrs) { | ||
return this.toESLocation(sourceCodeLocation.attrs[attrName]); | ||
} | ||
return null; | ||
}, | ||
}; |
{ | ||
"name": "@html-eslint/parser", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Parser for @html-eslint/eslint-plugin", | ||
@@ -32,3 +32,3 @@ "author": "yeonjuan", | ||
}, | ||
"gitHead": "a3fc97c0e25cffef20b3c1295998bbbab635fe5d" | ||
"gitHead": "1bac029775d06cac9f8f4a3c1d606295ef13913d" | ||
} |
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
9625
13
313