forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* No {jsx,flow,typescript} plugin * Type parameter * Valid JS Code
- Loading branch information
1 parent
fd3c769
commit a74a52f
Showing
6 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-no-jsx/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"use strict" | ||
<div |
36 changes: 36 additions & 0 deletions
36
packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-no-jsx/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":17,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":4}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":17,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":4}}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":17,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":4}}, | ||
"expression": { | ||
"type": "BinaryExpression", | ||
"start":0,"end":17,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":4}}, | ||
"left": { | ||
"type": "StringLiteral", | ||
"start":0,"end":12,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}}, | ||
"extra": { | ||
"rawValue": "use strict", | ||
"raw": "\"use strict\"" | ||
}, | ||
"value": "use strict" | ||
}, | ||
"operator": "<", | ||
"right": { | ||
"type": "Identifier", | ||
"start":14,"end":17,"loc":{"start":{"line":2,"column":1},"end":{"line":2,"column":4},"identifierName":"div"}, | ||
"name": "div" | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>() => {} |
43 changes: 43 additions & 0 deletions
43
packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-ts-type-param/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"expression": { | ||
"type": "ArrowFunctionExpression", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"id": null, | ||
"generator": false, | ||
"async": false, | ||
"params": [], | ||
"body": { | ||
"type": "BlockStatement", | ||
"start":11,"end":13,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":13}}, | ||
"body": [], | ||
"directives": [] | ||
}, | ||
"typeParameters": { | ||
"type": "TypeParameterDeclaration", | ||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}}, | ||
"params": [ | ||
{ | ||
"type": "TypeParameter", | ||
"start":1,"end":4,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":4}}, | ||
"name": "div", | ||
"variance": null | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/jsx/errors/_no_plugin/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div></div> |
4 changes: 4 additions & 0 deletions
4
packages/babel-parser/test/fixtures/jsx/errors/_no_plugin/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'jsx, flow, typescript' (1:0)", | ||
"plugins": [] | ||
} |