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 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(rome_js_analyze): relax noConfusingArrow (#4593)
- Loading branch information
Showing
7 changed files
with
46 additions
and
47 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
1 change: 0 additions & 1 deletion
1
crates/rome_js_analyze/tests/specs/nursery/noConfusingArrow/invalid.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,2 +1 @@ | ||
var x = a => 1 ? 2 : 3; | ||
var x = (a) => 1 ? 2 : 3; |
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
9 changes: 6 additions & 3 deletions
9
crates/rome_js_analyze/tests/specs/nursery/noConfusingArrow/valid.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,8 +1,11 @@ | ||
/* should not generate diagnostics */ | ||
|
||
var x = a => (1 ? 2 : 3); | ||
|
||
var x = (a) => 1 ? 2 : 3; | ||
|
||
var x = (a) => (1 ? 2 : 3); | ||
var x = (a) => { | ||
return 1 ? 2 : 3; | ||
}; | ||
|
||
var x = (a) => { return 1 ? 2 : 3; }; | ||
|
||
var x = a => { return 1 ? 2 : 3; }; |
10 changes: 7 additions & 3 deletions
10
crates/rome_js_analyze/tests/specs/nursery/noConfusingArrow/valid.js.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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.