Conversation
🦋 Changeset detectedLatest commit: 9e8da4a 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 |
68a109e to
8140719
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds overload-aware handling to the nursery/noShadow lint: new helper Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/biome_js_analyze/src/lint/nursery/no_shadow.rs`:
- Around line 294-301: The is_in_overload_signature check currently treats
certain parent kinds as overload signatures but omits setters, causing false
positives; update the matches against parent_function in
is_in_overload_signature to include
AnyJsParameterParentFunction::TsSetterSignatureClassMember(_) alongside
TsConstructorSignatureClassMember, TsMethodSignatureClassMember,
TsDeclareFunctionDeclaration, and TsDeclareFunctionExportDefaultDeclaration so
setter signature parameters are skipped the same way.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 52b82292-f9a2-40a0-b03f-b7d205914abe
⛔ Files ignored due to path filters (2)
crates/biome_js_analyze/tests/specs/nursery/noShadow/invalid-overloads.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-overloads.ts.snapis excluded by!**/*.snapand included by**
📒 Files selected for processing (5)
.changeset/fix-no-shadow-overloads.mdcrates/biome_js_analyze/src/lint/nursery/no_shadow.rscrates/biome_js_analyze/tests/specs/nursery/noShadow/invalid-overloads.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/valid-overloads.tscrates/biome_js_semantic/src/events.rs
Parser conformance results onjs/262
jsx/babel
markdown/commonmark
symbols/microsoft
ts/babel
ts/microsoft
|
There was a problem hiding this comment.
♻️ Duplicate comments (1)
crates/biome_js_analyze/src/lint/nursery/no_shadow.rs (1)
299-317:⚠️ Potential issue | 🟠 MajorInclude setter signatures in overload skip logic.
is_in_overload_signaturestill missesTsSetterSignatureClassMember, so setter-signature parameters can still be falsely reported as shadowing.Suggested patch
matches!( parent_function, Some( AnyJsParameterParentFunction::TsConstructorSignatureClassMember(_) | AnyJsParameterParentFunction::TsMethodSignatureClassMember(_) + | AnyJsParameterParentFunction::TsSetterSignatureClassMember(_) | AnyJsParameterParentFunction::TsDeclareFunctionDeclaration(_) | AnyJsParameterParentFunction::TsDeclareFunctionExportDefaultDeclaration(_) ) )#!/bin/bash set -euo pipefail binding_ext_file="$(fd 'binding_ext.rs' | head -n1)" echo "Using binding_ext file: ${binding_ext_file}" echo "=== Parent-function enum variants ===" rg -n "AnyJsParameterParentFunction|TsSetterSignatureClassMember|TsConstructorSignatureClassMember|TsMethodSignatureClassMember" -C2 "${binding_ext_file}" echo "=== Current overload skip helper ===" rg -n "fn is_in_overload_signature|AnyJsParameterParentFunction::" -C4 crates/biome_js_analyze/src/lint/nursery/no_shadow.rsExpected result: enum contains
TsSetterSignatureClassMember, but helper match currently does not.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/biome_js_analyze/src/lint/nursery/no_shadow.rs` around lines 299 - 317, The helper is_in_overload_signature is missing the TsSetterSignatureClassMember variant so parameters in setter signatures are not skipped; update the matches! in is_in_overload_signature to include AnyJsParameterParentFunction::TsSetterSignatureClassMember(_) alongside the existing TsConstructorSignatureClassMember and TsMethodSignatureClassMember variants so setter-signature parameters are treated as overload signatures and not reported as shadowing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@crates/biome_js_analyze/src/lint/nursery/no_shadow.rs`:
- Around line 299-317: The helper is_in_overload_signature is missing the
TsSetterSignatureClassMember variant so parameters in setter signatures are not
skipped; update the matches! in is_in_overload_signature to include
AnyJsParameterParentFunction::TsSetterSignatureClassMember(_) alongside the
existing TsConstructorSignatureClassMember and TsMethodSignatureClassMember
variants so setter-signature parameters are treated as overload signatures and
not reported as shadowing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1a51b303-86bc-46d8-8ec9-2614fe3b7897
⛔ Files ignored due to path filters (2)
crates/biome_js_analyze/tests/specs/nursery/noShadow/invalid-overloads.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-overloads.ts.snapis excluded by!**/*.snapand included by**
📒 Files selected for processing (5)
.changeset/fix-no-shadow-overloads.mdcrates/biome_js_analyze/src/lint/nursery/no_shadow.rscrates/biome_js_analyze/tests/specs/nursery/noShadow/invalid-overloads.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/valid-overloads.tscrates/biome_js_semantic/src/events.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-overloads.ts
Merging this PR will not alter performance
Comparing Footnotes
|
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Summary
Closes #7125
PR developed with the help of claude code.
Test Plan
Added various test cases
Docs