fix(lint): lint/suspicous/noRedeclare should not report redeclarations for infer type in conditional types#8417
Conversation
🦋 Changeset detectedLatest commit: 34ddf2f 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 |
WalkthroughThis change adds a const helper Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (4 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 (1)
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
🧰 Additional context used📓 Path-based instructions (1)**/*.ts📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-11-24T18:05:42.356ZApplied to files:
📚 Learning: 2025-11-24T18:05:42.356ZApplied to files:
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… type in conditional types
158d8ee to
34ddf2f
Compare
CodSpeed Performance ReportMerging #8417 will not alter performanceComparing Summary
Footnotes
|
…ons for `infer` type in conditional types (biomejs#8417)
Summary
lint/suspicious/noRedeclarewrongly reported on double type inferrence #7809Currently,
lint/suspicous/noRedeclarewrongly reports redeclarations forinfertype in conditional types. So, I added checking if the declaration isinfertype or not, and fixed not to report multiple usage of them.This is my first contribution to this project. Please let me know if there's anything I should do.
Test Plan
I added a new test to
valid-conditional-type.tsthat demonstarates multipleinferdeclarations in conditional types.Docs