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.
Add useBuiltIns option to helper-builder-react-jsx (babel#4655)
- Loading branch information
1 parent
d82681b
commit f3fa66f
Showing
6 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
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
1 change: 1 addition & 0 deletions
1
...-plugin-transform-react-jsx/test/fixtures/useBuiltIns/assignment-invalid-option/actual.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 @@ | ||
var div = <Component {...props} foo="bar" /> |
4 changes: 4 additions & 0 deletions
4
...ugin-transform-react-jsx/test/fixtures/useBuiltIns/assignment-invalid-option/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 @@ | ||
{ | ||
"plugins": [["transform-react-jsx", { "useBuiltIns": "invalidOption" }]], | ||
"throws": "transform-react-jsx currently only accepts a boolean option for useBuiltIns (defaults to false)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-react-jsx/test/fixtures/useBuiltIns/assignment/actual.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 @@ | ||
var div = <Component {...props} foo="bar" /> |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-react-jsx/test/fixtures/useBuiltIns/assignment/expected.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 @@ | ||
var div = React.createElement(Component, Object.assign({}, props, { foo: "bar" })); |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-transform-react-jsx/test/fixtures/useBuiltIns/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,3 @@ | ||
{ | ||
"plugins": [["transform-react-jsx", { "useBuiltIns": true }]] | ||
} |