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

Fix set state callback destructing & state use inside callback #2151

Merged
merged 1 commit into from
Feb 2, 2019

Conversation

barakyosi
Copy link

@barakyosi barakyosi commented Feb 2, 2019

Fix no-unused-state rule:

  1. When using destruction in setState callback.
  2. When using state inside setState callback.

Fixes #1697

This is my first PR to open source :)

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Awesome start.

lib/rules/no-unused-state.js Show resolved Hide resolved
@ljharb ljharb added the bug label Feb 2, 2019
@ljharb ljharb force-pushed the fix_no_unused_state branch from e8292fd to 4270205 Compare February 2, 2019 21:26
@ljharb ljharb merged commit 4270205 into jsx-eslint:master Feb 2, 2019
@barakyosi barakyosi deleted the fix_no_unused_state branch February 3, 2019 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants