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): Assert
React
symbols resolve to react
module
## Summary The `is_react_call_api` in some situations didn't test if the method name is the tested for method name. For example, `is_react_call_api(..., "cloneElement")` returned true for `React.clone` or just `clone`. I fixed the same issue in `jsx_member_name_is_react_fragment` ## Test Plan I added some new tests veryfing that the logic correctly verifies the member name.
- Loading branch information
1 parent
99f59bf
commit 55f93e4
Showing
22 changed files
with
382 additions
and
408 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
2 changes: 2 additions & 0 deletions
2
crates/rome_js_analyze/tests/specs/a11y/noPositiveTabindex/reactCreateElementInvalid.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
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
2 changes: 2 additions & 0 deletions
2
crates/rome_js_analyze/tests/specs/a11y/useButtonType/inObject.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,3 +1,5 @@ | ||
import React from "react"; | ||
|
||
// invalid | ||
React.createElement('button'); | ||
React.createElement('button', { | ||
|
Oops, something went wrong.