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

Add eslint-plugin-react-hooks #2

Closed
jgierer12 opened this issue Feb 19, 2019 · 2 comments
Closed

Add eslint-plugin-react-hooks #2

jgierer12 opened this issue Feb 19, 2019 · 2 comments

Comments

@jgierer12
Copy link
Contributor

It would be cool to add eslint-plugin-react-hooks, which is the official plugin by the React team to enforce the 'rules of Hooks'. Seeing as it will be added to Create React App soon, I would like to see it in Healthier too.

This shouldn't be a breaking change, since it only applies to projects using Hooks anyways and is a relatively unopiniated enforcement of the rules that are present in the React docs too.

If you approve of this change, I will work on a PR for it.

@KidkArolis
Copy link
Owner

KidkArolis commented Feb 20, 2019

Yes! In general, this sounds like a good idea.

We had a little bit of discussion regarding how to best handle React stuff in healthier in general. Some here KidkArolis/healthier#20 and here KidkArolis/healthier#16.

I need to reread those myself, but I just want to ensure that healthier, just like standard, doesn't break in non React environments. E.g. if someone's using jsx with Preact or any other library, you shouldn't get issues flagged that are only relevant for React.

So one thing we talked about was detecting if you have react installed.

Actually, in the meantime, we can just keep this in healthier/react config. Maybe that's what you had in mind? So yes, let's definitely add plugin-react-hooks into healthier/react.

@jgierer12
Copy link
Contributor Author

Actually, in the meantime, we can just keep this in healthier/react config

Yes, that is exactly what I had in mind 👍

I will add it and open a PR shortly.

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

No branches or pull requests

2 participants