You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the official implementation of react-hooks/RulesOfHooks, it seems that hooks are not disallowed within functions that are default exports, whereas in our Rust version of the implementation, such behavior is restricted. Of course, I also don't think this is an incorrect implementation approach.
It's just that in the project I'm working on, there's a requirement to "throw errors for files that violate RulesOfHooks," so using oxlint results in a large number of errors being thrown. (However, using ESLint does not result in these errors.)
I would like to propose an expectation that we can align with the official implementation, which would be great;
Alternatively, adding an Advanced Configuration to bypass this restriction on default exports, similar to:
camc314
changed the title
bug(linter): An action of "react-hooks/RulesOfHooks"
bug(linter): false positve "react-hooks/RulesOfHooks" with default export
Dec 1, 2024
What version of Oxlint are you using?
0.13.2
What command did you run?
yarn oxlint
What does your
.oxlint.json
config file look like?What happened?
react-hooks/RulesOfHooks
, it seems that hooks are not disallowed within functions that are default exports, whereas in our Rust version of the implementation, such behavior is restricted. Of course, I also don't think this is an incorrect implementation approach.The text was updated successfully, but these errors were encountered: