forked from rome/tools
-
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.
feature(rome_js_parser): JSX support in .js files (rome#2674)
Enable JSX by default for all javascript files (not typescript)
- Loading branch information
1 parent
042e65d
commit 2b08299
Showing
7 changed files
with
220 additions
and
220 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
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
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
5 changes: 3 additions & 2 deletions
5
crates/rome_js_parser/test_data/inline/err/jsx_or_type_assertion.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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// SCRIPT | ||
function f() { | ||
let a = <div>a</div>; // JSX | ||
let b = <string>b; //type assertion | ||
let b = <string>b; // type assertion | ||
let c = <string>b<a>d; // type assertion | ||
let d = <div>a</div>/; // ambigous: JSX or "type assertion a less than regex /div>/". Probably JSX. | ||
let d = <div>a</div>/; // ambiguous: JSX or "type assertion a less than regex /div>/". Probably JSX. | ||
let d = <string>a</string>/; | ||
} |
413 changes: 207 additions & 206 deletions
413
crates/rome_js_parser/test_data/inline/err/jsx_or_type_assertion.rast
Large diffs are not rendered by default.
Oops, something went wrong.
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