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

[Bug]: destructuring-assignment rule false pass #3561

Open
2 tasks done
grant-unwin-cc opened this issue Apr 18, 2023 · 1 comment
Open
2 tasks done

[Bug]: destructuring-assignment rule false pass #3561

grant-unwin-cc opened this issue Apr 18, 2023 · 1 comment
Labels

Comments

@grant-unwin-cc
Copy link

grant-unwin-cc commented Apr 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

I have identified a false pass for the destructuring assignment rule.

image

Note the, destructureInSignature set to 'always'.

I have made a branch with the test case added, which fails here:

https://github.com/grant-unwin-cc/eslint-plugin-react/blob/destructuring-assignment-false-pass-example/tests/lib/rules/destructuring-assignment.js#L895

Expected Behavior

Expect the test to pass, it does not. It seems to be mislead by a destructuring further down.

https://github.com/grant-unwin-cc/eslint-plugin-react/blob/destructuring-assignment-false-pass-example/tests/lib/rules/destructuring-assignment.js#L895

eslint-plugin-react version

master

eslint version

8.38.0

node version

18.15.0

@ljharb
Copy link
Member

ljharb commented Apr 19, 2023

Good catch - can you make a PR, even if it just has the failing test cases?

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

No branches or pull requests

2 participants