We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c31236 commit 8e57fc2Copy full SHA for 8e57fc2
crates/oxc_linter/src/rules/react/react_in_jsx_scope.rs
@@ -50,10 +50,7 @@ impl Rule for ReactInJsxScope {
50
return;
51
}
52
53
- if !scope
54
- .ancestors(node.scope_id())
55
- .any(|v| scope.get_bindings(v).iter().any(|(k, _)| k.as_str() == react_name))
56
- {
+ if scope.find_binding(node.scope_id(), react_name).is_none() {
57
ctx.diagnostic(react_in_jsx_scope_diagnostic(node_span));
58
59
0 commit comments