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

chore: add react-hooks ESLint plugin #556

Merged
merged 2 commits into from Sep 2, 2019

Conversation

@sohkai
Copy link
Member

commented Sep 2, 2019

Thought we already had this enabled in this repo D:.

Caught a few bugs, but a few of them I'm not 100% sure. @bpierre can you double check? I don't think any of them should cause regressions, since they're mostly based on props that don't change.

sohkai added 2 commits Sep 2, 2019

@sohkai sohkai requested a review from bpierre Sep 2, 2019

@bpierre
bpierre approved these changes Sep 2, 2019
Copy link
Member

left a comment

Well that was needed! All the fixes are looking fine to me 👍

"rules": {
"react/jsx-boolean-value": "off",

This comment has been minimized.

Copy link
@bpierre

bpierre Sep 2, 2019

Member

I’m starting to think that the true shortcut looks a bit like a historical mistake in JSX. It’s really weird to do <Component prop /> to set prop to true and <Component prop={false} /> to set it to false.

I also noticed that the React documentation started to recommend not using it:

Nothing urgent but if we agree on this, maybe we could start using "always" for this rule.

This comment has been minimized.

Copy link
@sohkai

sohkai Sep 2, 2019

Author Member

Let's do this when we upgrade our configs altogether :).

It is a good note though, and I do actually like the shorthand.

@sohkai sohkai merged commit 80e67f2 into newstyle Sep 2, 2019

5 checks passed

License Compliance All checks passed.
Details
WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@delete-merged-branch delete-merged-branch bot deleted the eslint-hooks branch Sep 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.