Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linters like those for javascript react hooks? #285

Open
fzyzcjy opened this issue Feb 23, 2022 · 7 comments
Open

Linters like those for javascript react hooks? #285

fzyzcjy opened this issue Feb 23, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@fzyzcjy
Copy link

fzyzcjy commented Feb 23, 2022

Hi thanks for the lib! In JS, we have https://www.npmjs.com/package/eslint-plugin-react-hooks linters for enforcing the rules of hooks https://reactjs.org/docs/hooks-rules.html (the rules are mostly the same as here). So I wonder whether we can have one? Thanks!

@fzyzcjy fzyzcjy added enhancement New feature or request needs triage labels Feb 23, 2022
@rrousselGit
Copy link
Owner

It's been on my todo-list for a while. It's possible, but not my priority

@fzyzcjy
Copy link
Author

fzyzcjy commented Feb 23, 2022

@rrousselGit I can contribute for it. Could you please provide some hints about how you would like to implement it?

@rrousselGit
Copy link
Owner

Someone started working on one already https://github.com/mj-hd/flutter_hooks_lint_plugin

I'd reach out to them first to see whether we can merge efforts and make an official solution.

@fzyzcjy
Copy link
Author

fzyzcjy commented Feb 23, 2022

Sounds great. Thanks!

@rrousselGit rrousselGit self-assigned this May 10, 2023
@satvikpendem
Copy link

Is this still being worked on? I saw that the one linked above doesn't work with the new lints for riverpod since now Dart only allows one linter. Looks like they're not working on their flutter_hooks linter anymore, wondering if there is an official solution now.

@rrousselGit
Copy link
Owner

There's no official solution for now.

@burhanyasar
Copy link

Here is another library, which seems to be more actively maintained: https://pub.dev/packages/flutter_hooks_lint

I just started adding hooks in a project and basic hook usage checks seem to work well. Calling them outside the build functions or calling them conditionally etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants