-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dacf85
commit 61c0bae
Showing
24 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...m-react-constant-elements/test/fixtures/allowMutablePropsOnTags/function-closure/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,3 @@ | ||
function Component({ increment }) { | ||
return () => <Counter onClick={value => value + increment} />; | ||
} |
9 changes: 9 additions & 0 deletions
9
...act-constant-elements/test/fixtures/allowMutablePropsOnTags/function-closure/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,9 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"transform-react-constant-elements", | ||
{ "allowMutablePropsOnTags": ["Counter"] } | ||
], | ||
"syntax-jsx" | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
...-react-constant-elements/test/fixtures/allowMutablePropsOnTags/function-closure/output.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,5 @@ | ||
function Component({ | ||
increment | ||
}) { | ||
return () => <Counter onClick={value => value + increment} />; | ||
} |
3 changes: 3 additions & 0 deletions
3
...act-constant-elements/test/fixtures/allowMutablePropsOnTags/function-impure-body/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,3 @@ | ||
function Component() { | ||
return () => <Counter onClick={value => value + prompt("Increment:")} />; | ||
} |
9 changes: 9 additions & 0 deletions
9
...constant-elements/test/fixtures/allowMutablePropsOnTags/function-impure-body/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,9 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"transform-react-constant-elements", | ||
{ "allowMutablePropsOnTags": ["Counter"] } | ||
], | ||
"syntax-jsx" | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
...ct-constant-elements/test/fixtures/allowMutablePropsOnTags/function-impure-body/output.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,3 @@ | ||
function Component() { | ||
return () => <Counter onClick={value => value + prompt("Increment:")} />; | ||
} |
3 changes: 3 additions & 0 deletions
3
...nstant-elements/test/fixtures/allowMutablePropsOnTags/function-same-binding-name/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,3 @@ | ||
function Component({ value }) { | ||
return () => <Counter onClick={value => value + 1} />; | ||
} |
9 changes: 9 additions & 0 deletions
9
...nt-elements/test/fixtures/allowMutablePropsOnTags/function-same-binding-name/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,9 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"transform-react-constant-elements", | ||
{ "allowMutablePropsOnTags": ["Counter"] } | ||
], | ||
"syntax-jsx" | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
...stant-elements/test/fixtures/allowMutablePropsOnTags/function-same-binding-name/output.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,5 @@ | ||
function Component({ | ||
value | ||
}) { | ||
return () => <Counter onClick={value => value + 1} />; | ||
} |
3 changes: 3 additions & 0 deletions
3
...transform-react-constant-elements/test/fixtures/allowMutablePropsOnTags/function/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,3 @@ | ||
function Component() { | ||
return () => <Counter onClick={value => value + 1} />; | ||
} |
9 changes: 9 additions & 0 deletions
9
...sform-react-constant-elements/test/fixtures/allowMutablePropsOnTags/function/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,9 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"transform-react-constant-elements", | ||
{ "allowMutablePropsOnTags": ["Counter"] } | ||
], | ||
"syntax-jsx" | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
...ransform-react-constant-elements/test/fixtures/allowMutablePropsOnTags/function/output.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,3 @@ | ||
function Component() { | ||
return () => <Counter onClick={value => value + 1} />; | ||
} |
3 changes: 3 additions & 0 deletions
3
...gin-transform-react-constant-elements/test/fixtures/allowMutablePropsOnTags/iife/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,3 @@ | ||
function Component() { | ||
return () => <Counter init={(value => value + prompt("Increment:"))(2)} />; | ||
} |
9 changes: 9 additions & 0 deletions
9
...transform-react-constant-elements/test/fixtures/allowMutablePropsOnTags/iife/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,9 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"transform-react-constant-elements", | ||
{ "allowMutablePropsOnTags": ["Counter"] } | ||
], | ||
"syntax-jsx" | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
...in-transform-react-constant-elements/test/fixtures/allowMutablePropsOnTags/iife/output.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,3 @@ | ||
function Component() { | ||
return () => <Counter init={(value => value + prompt("Increment:"))(2)} />; | ||
} |
4 changes: 2 additions & 2 deletions
4
.../pure-expression-whitelist-deopt/input.js → ...ePropsOnTags/not-allowed-element/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
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...pure-expression-whitelist-deopt/output.js → ...PropsOnTags/not-allowed-element/output.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
File renamed without changes.
File renamed without changes.
File renamed without changes.