Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve transform-react-jsx typings (#13820)
* improve transform-react-jsx typings * rename test fixtures * remove unreachable sourceSelf check * update test fixtures * Update packages/babel-core/src/index.ts * Update packages/babel-plugin-transform-react-jsx/src/create-plugin.ts Co-authored-by: Henry Zhu <hi@henryzoo.com> * Update packages/babel-plugin-transform-react-jsx/src/create-plugin.ts Co-authored-by: Henry Zhu <hi@henryzoo.com>
- Loading branch information
Showing
7 changed files
with
136 additions
and
60 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
...ct-jsx-development/test/fixtures/cross-platform/disallow-__self-as-jsx-attribute/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 @@ | ||
var x = <div __self={self}></div>; |
4 changes: 4 additions & 0 deletions
4
...sx-development/test/fixtures/cross-platform/disallow-__self-as-jsx-attribute/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": "Duplicate __self prop found. You are most likely using the deprecated transform-react-jsx-self Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.", | ||
"plugins": ["transform-react-jsx-development"] | ||
} |
1 change: 1 addition & 0 deletions
1
...-jsx-development/test/fixtures/cross-platform/disallow-__source-as-jsx-attribute/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 @@ | ||
var x = <div __source={source}></div>; |
4 changes: 4 additions & 0 deletions
4
...-development/test/fixtures/cross-platform/disallow-__source-as-jsx-attribute/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": "Duplicate __source prop found. You are most likely using the deprecated transform-react-jsx-source Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.", | ||
"plugins": ["transform-react-jsx-development"] | ||
} |
Oops, something went wrong.