eslint-mdx
Advanced tools
Comparing version 0.9.6-beta.8 to 0.9.6-beta.9
@@ -137,3 +137,16 @@ "use strict"; | ||
// wrap into single Fragment, so that it won't break on adjacent JSX nodes | ||
var program = this._eslintParse("<>" + value + "</>").ast; | ||
var program; | ||
try { | ||
program = this._eslintParse("<>" + value + "</>").ast; | ||
} | ||
catch (e) { | ||
if (helper_1.hasProperties(e, exports.LOC_ERROR_PROPERTIES)) { | ||
var start = node.position.start; | ||
e.index += start.offset - 3; | ||
e.column = e.lineNumber > 1 ? e.column : e.column + start.column - 3; | ||
e.lineNumber += start.line - 1; | ||
throw e; | ||
} | ||
return node; | ||
} | ||
var expression = program.body[0].expression; | ||
@@ -193,3 +206,3 @@ if (!helper_1.isJsxNode(expression) || expression.children.length <= 1) { | ||
e.index += start; | ||
e.column += loc.start.column; | ||
e.column = e.lineNumber > 1 ? e.column : e.column + loc.start.column; | ||
e.lineNumber += startLine; | ||
@@ -196,0 +209,0 @@ } |
{ | ||
"name": "eslint-mdx", | ||
"version": "0.9.6-beta.8+207f96a", | ||
"version": "0.9.6-beta.9+51d8089", | ||
"description": "ESLint Parser for MDX", | ||
@@ -23,3 +23,3 @@ "repository": "git@github.com:rx-ts/eslint-mdx.git", | ||
}, | ||
"gitHead": "207f96a80bf883d1e37f7158c17cc8d07562f285" | ||
"gitHead": "51d808917b8c7911718c37dbe384e885dbf611b1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
52071
631