- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 710
 
Closed
Labels
A-linterArea - LinterArea - Linter
Description
What version of Oxlint are you using?
1.22.0
What command did you run?
No response
What does your .oxlintrc.json config file look like?
What happened?
False positive for eslint-plugin-react-hooks when prefixing component function with _
This is marked as invalid, but fairly comment to preview a mobx wrapped component with _
import { observer } from "mobx-react-lite";
export const CommentLikeActivityEntry = observer(function _CommentLikeActivityEntry({
  const reduceMotion = useReducedMotion() ?? false;
  return null;
});As a workaround this works:
import { observer } from "mobx-react-lite";
export const CommentLikeActivityEntry = observer(function CommentLikeActivityEntry_({
  const reduceMotion = useReducedMotion() ?? false;
  return null;
});React Hook "useReducedMotion" is called in function "_CommentLikeActivityEntry" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".oxc[eslint-plugin-react-hooks(rules-of-hooks)](https://oxc.rs/docs/guide/usage/linter/rules/react/rules-of-hooks.html)
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter
{ "rules": { "react-hooks/rules-of-hooks": "warn" } }