File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
crates/oxc_linter/src/rules/react Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -316,13 +316,14 @@ impl Rule for JsxHandlerNames {
316
316
}
317
317
} ;
318
318
319
+ // "ref" prop is allowed to be assigned to a function with any name.
319
320
if prop_key == "ref" {
320
321
return ;
321
322
}
322
323
323
324
let prop_is_event_handler = self . match_event_handler_props_name ( prop_key) ;
324
325
let is_handler_name_correct = handler_name. as_ref ( ) . map_or ( Some ( false ) , |name| {
325
- // if the event handler is a property of "props", the handler name can also start with the prop prefix .
326
+ // if the event handler is "this.props.*" or "props.* ", the handler name can be the pattern of event handler props .
326
327
if is_props_handler && self . match_event_handler_props_name ( name) . unwrap_or ( false ) {
327
328
return Some ( true ) ;
328
329
}
You can’t perform that action at this time.
0 commit comments