-
-
Notifications
You must be signed in to change notification settings - Fork 794
fix(lint): don't flag separate non-null assertions on assignment sides #8383
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(lint): don't flag separate non-null assertions on assignment sides #8383
Conversation
Fix issue #7927 where noExtraNonNullAssertion incorrectly triggered for compound assignments like arr[0]! ^= arr[1]!. The rule should only flag nested assertions, not separate assertions on different sides of an assignment expression. The fix checks if the non-null assertion is actually nested within the left side expression tree before flagging it as an error.
Address reviewer feedback: ensure nested assertions like arr[0] ^= arr[1]!! are correctly flagged. The fix now checks for nested assertions first before checking assignment-specific cases, ensuring all nested assertions are caught regardless of which side of the assignment they appear on.
…-assertion-compound-assignment
🦋 Changeset detectedLatest commit: 6e8a782 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe PR refines the Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (3).changeset/**/*.md📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.ts📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.rs📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
🧠 Learnings (24)📓 Common learnings📚 Learning: 2025-11-28T09:08:10.091ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-24T18:05:27.810ZApplied to files:
📚 Learning: 2025-11-24T18:06:03.545ZApplied to files:
📚 Learning: 2025-11-24T18:05:27.810ZApplied to files:
📚 Learning: 2025-11-24T18:05:27.810ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-24T18:06:03.545ZApplied to files:
📚 Learning: 2025-11-27T23:04:02.022ZApplied to files:
📚 Learning: 2025-11-24T18:06:03.545ZApplied to files:
🧬 Code graph analysis (1)crates/biome_js_analyze/src/lint/suspicious/no_extra_non_null_assertion.rs (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
🔇 Additional comments (6)
Comment |
CodSpeed Performance ReportMerging #8383 will not alter performanceComparing Summary
Footnotes
|
#8383) Co-authored-by: harshasiddartha <[email protected]> Co-authored-by: harshasiddartha <[email protected]>
#8383) Co-authored-by: harshasiddartha <[email protected]> Co-authored-by: harshasiddartha <[email protected]>
biomejs#8383) Co-authored-by: harshasiddartha <[email protected]> Co-authored-by: harshasiddartha <[email protected]>
Summary
Fixes #7927
Follow up of #7935
Test Plan
Docs