react icon indicating copy to clipboard operation
react copied to clipboard

[eslint-plugin-react-hooks] Allow standalone "use" for hook

Open MoOx opened this issue 3 years ago • 1 comments

Summary

As a ReScript user, various package & modules have simple name like Module.use() (to avoid repetition like Module.useModule() or worst (add "something" just to have code accepted by the rule)) or even generated code (eg: use$1, generated by rescript-relay).

How did you test this change?

I am currently using this code as a patch (using patch-package) and it didn't bring any regression but allow rules-of-hook to be used in a considerable ReScript codebase.

MoOx avatar Aug 31 '22 21:08 MoOx

I think making use solely a prefix was a deliberate choice. Maybe @gaearon knows more about this to review this PR.

NOTE: updated the PR title to be more precise on what the change is

kassens avatar Sep 08 '22 14:09 kassens

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

github-actions[bot] avatar Apr 10 '24 01:04 github-actions[bot]

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

github-actions[bot] avatar Apr 17 '24 11:04 github-actions[bot]