Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Commit

Permalink
fix flow unused supressing comment [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Oct 28, 2017
1 parent a1125b2 commit c6d369b
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/plugins/jsx/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,33 +423,21 @@ export default (superClass: Class<Parser>): Class<Parser> =>
}
}

if (
// $FlowIgnore
isFragment(openingElement) &&
!isFragment(closingElement)
) {
if (isFragment(openingElement) && !isFragment(closingElement)) {
this.raise(
// $FlowIgnore
closingElement.start,
"Expected corresponding JSX closing tag for <>",
);
} else if (
// $FlowIgnore
!isFragment(openingElement) &&
isFragment(closingElement)
) {
} else if (!isFragment(openingElement) && isFragment(closingElement)) {
this.raise(
// $FlowIgnore
closingElement.start,
"Expected corresponding JSX closing tag for <" +
getQualifiedJSXName(openingElement.name) +
">",
);
} else if (
// $FlowIgnore
!isFragment(openingElement) &&
!isFragment(closingElement)
) {
} else if (!isFragment(openingElement) && !isFragment(closingElement)) {
if (
// $FlowIgnore
getQualifiedJSXName(closingElement.name) !==
Expand All @@ -466,7 +454,6 @@ export default (superClass: Class<Parser>): Class<Parser> =>
}
}

// $FlowIgnore
if (isFragment(openingElement)) {
node.openingFragment = openingElement;
node.closingFragment = closingElement;
Expand All @@ -482,7 +469,6 @@ export default (superClass: Class<Parser>): Class<Parser> =>
);
}

// $FlowIgnore
return isFragment(openingElement)
? this.finishNode(node, "JSXFragment")
: this.finishNode(node, "JSXElement");
Expand Down

0 comments on commit c6d369b

Please sign in to comment.