@typescript-eslint/typescript-estree
Advanced tools
Comparing version 1.10.3-alpha.8 to 1.10.3-alpha.9
@@ -90,9 +90,20 @@ "use strict"; | ||
container = node_utils_1.getNodeContainer(ast, start, end); | ||
if (container && | ||
container.parent && | ||
container.parent.kind === ts.SyntaxKind.JsxOpeningElement && | ||
// Make sure this is the end of the opening element and not type parameter | ||
end === container.parent.end && | ||
if ((container.parent && | ||
container.parent.parent && | ||
container.parent.parent.kind === ts.SyntaxKind.JsxElement) { | ||
// Rescan after an opening element or fragment | ||
(container.parent.kind === ts.SyntaxKind.JsxOpeningElement && | ||
// Make sure this is the end of a tag like `<Component<number>>` | ||
container.parent.end === end)) || | ||
container.parent.kind === ts.SyntaxKind.JsxOpeningFragment || | ||
// Rescan after a self-closing element if it's inside another JSX element | ||
(container.parent.kind === ts.SyntaxKind.JsxSelfClosingElement && | ||
(container.parent.parent.kind === ts.SyntaxKind.JsxElement || | ||
container.parent.parent.kind === ts.SyntaxKind.JsxFragment)) || | ||
// Rescan after a closing element if it's inside another JSX element | ||
((container.parent.kind === ts.SyntaxKind.JsxClosingElement || | ||
container.parent.kind === ts.SyntaxKind.JsxClosingFragment) && | ||
container.parent.parent.parent && | ||
(container.parent.parent.parent.kind === ts.SyntaxKind.JsxElement || | ||
container.parent.parent.parent.kind === | ||
ts.SyntaxKind.JsxFragment))) { | ||
kind = triviaScanner.reScanJsxToken(); | ||
@@ -104,2 +115,8 @@ continue; | ||
container = node_utils_1.getNodeContainer(ast, start, end); | ||
// Rescan after a JSX expression | ||
if (container.parent && | ||
container.parent.kind === ts.SyntaxKind.JsxExpression) { | ||
kind = triviaScanner.reScanJsxToken(); | ||
continue; | ||
} | ||
if (container.kind === ts.SyntaxKind.TemplateMiddle || | ||
@@ -106,0 +123,0 @@ container.kind === ts.SyntaxKind.TemplateTail) { |
{ | ||
"name": "@typescript-eslint/typescript-estree", | ||
"version": "1.10.3-alpha.8+9a387b0", | ||
"version": "1.10.3-alpha.9+34cfa53", | ||
"description": "A parser that converts TypeScript source code into an ESTree compatible form", | ||
@@ -49,5 +49,5 @@ "main": "dist/parser.js", | ||
"@babel/types": "^7.3.2", | ||
"@typescript-eslint/shared-fixtures": "1.10.3-alpha.8+9a387b0" | ||
"@typescript-eslint/shared-fixtures": "1.10.3-alpha.9+34cfa53" | ||
}, | ||
"gitHead": "9a387b03e5f8b7d2ca9c0e373387c17a1a20b4a0" | ||
"gitHead": "34cfa53da623683bcf5e78eea746f73873a7a726" | ||
} |
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
394106
5248