This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rome_js_analyze): improve the logic of jsx_reference_identifier_i…
…s_fragment
- Loading branch information
Showing
7 changed files
with
73 additions
and
23 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
7 changes: 5 additions & 2 deletions
7
crates/rome_js_analyze/tests/specs/correctness/noUselessFragments/fromImportRenameValid.jsx
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import AwesomeReact, { Fragment as AwesomeFragment } from "noReact"; | ||
import AwesomeNoReact, { Fragment as AwesomeFragment } from "noReact"; | ||
import AwesomeReact, { StrictMode as AwesomeStrictMode } from "react"; | ||
|
||
<> | ||
<AwesomeFragment></AwesomeFragment> | ||
<AwesomeReact.Fragment>foo</AwesomeReact.Fragment> | ||
<AwesomeNoReact.Fragment>foo</AwesomeNoReact.Fragment> | ||
<AwesomeStrictMode></AwesomeStrictMode> | ||
<AwesomeReact.StrictMode>foo</AwesomeReact.StrictMode> | ||
</> |
8 changes: 6 additions & 2 deletions
8
...rome_js_analyze/tests/specs/correctness/noUselessFragments/fromImportRenameValid.jsx.snap
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
6 changes: 6 additions & 0 deletions
6
crates/rome_js_analyze/tests/specs/correctness/noUselessFragments/notFragmentValid.jsx
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,6 @@ | ||
import React, { StrictMode } from "react"; | ||
|
||
<> | ||
<StrictMode></StrictMode> | ||
<React.StrictMode></React.StrictMode> | ||
</> |
17 changes: 17 additions & 0 deletions
17
crates/rome_js_analyze/tests/specs/correctness/noUselessFragments/notFragmentValid.jsx.snap
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,17 @@ | ||
--- | ||
source: crates/rome_js_analyze/tests/spec_tests.rs | ||
assertion_line: 99 | ||
expression: notFragmentValid.jsx | ||
--- | ||
# Input | ||
```js | ||
import React, { StrictMode } from "react"; | ||
|
||
<> | ||
<StrictMode></StrictMode> | ||
<React.StrictMode></React.StrictMode> | ||
</> | ||
|
||
``` | ||
|
||
|
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
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