Skip to content

fix: nullish coalescing operator conditional detection #1427

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

Merged

Conversation

paul-sachs
Copy link
Contributor

Need to pop conditional on binary expression exits.

Fixes #1426

Need to pop conditional on binary expression exits.
@deno-deploy deno-deploy bot requested a deployment to Preview March 4, 2025 22:46 Abandoned
@CLAassistant
Copy link

CLAassistant commented Mar 4, 2025

CLA assistant check
All committers have signed the CLA.

@paul-sachs
Copy link
Contributor Author

First rust PR soooo... 🙈

@@ -185,9 +185,13 @@ impl Handler for RulesOfHooksHandler {
}
}
}
Node::BinExpr(_) => {
if let Some(ParentKind::Bin) = self.parent_kind.pop() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this is even really needed, might be excessive paranoia.

Copy link
Contributor

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

Sweet, thanks!

@marvinhagemeister marvinhagemeister merged commit 17b9535 into denoland:main Mar 6, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

Lint rule react-rules-of-hooks misidentifies a conditional hook
3 participants