Skip to content

Commit

Permalink
Suggest JSX fragment syntax in adjacent tag error
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiebits committed Jan 4, 2018
1 parent 82c6ca2 commit e00b0d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/babylon/src/plugins/jsx/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ export default (superClass: Class<Parser>): Class<Parser> =>
if (this.match(tt.relational) && this.state.value === "<") {
this.raise(
this.state.start,
"Adjacent JSX elements must be wrapped in an enclosing tag",
"Adjacent JSX elements must be wrapped in an enclosing tag. " +
"Did you want a JSX fragment <>...</>?",
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"throws": "Adjacent JSX elements must be wrapped in an enclosing tag (1:22)"
"throws": "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (1:22)"
}

0 comments on commit e00b0d2

Please sign in to comment.