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

[eslint-plugin-react-hooks] fix: optional chaining safety #30989

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Sep 17, 2024

  1. fix: optional chaining safety

    Update optional chaining logic to prefer optional over required when
    both usage types appear.
    tuttleb committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    cda8b01 View commit details
    Browse the repository at this point in the history
  2. fix: use parent to determine if property should be accessed optionally

    We previously would keep track of a specific property to determine if it
    could be accessed optionally, but for safety we should instead be
    tracking the parent to determine if it is safe to access any descendant
    properties non-optionally.
    tuttleb committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    70a93ba View commit details
    Browse the repository at this point in the history