JS-1181 Support local alias escapes in S6767#7128
JS-1181 Support local alias escapes in S6767#7128francois-mora-sonarsource wants to merge 14 commits into
Conversation
Ruling Report✅ No changes to ruling expected issues in this PR |
🤖 Generated with GitHub Actions
|
Code Review ✅ Approved 1 resolved / 1 findingsSupport for local whole-props and named aliases in S6767 fixes false positives in ✅ 1 resolved✅ Quality: Duplicate
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar




Summary
forwardRefcallbacks and typed decorator callbacks with focused JS and TS coveragepropsaliases do not suppress real unused-prop reportsRoot Cause
S6767 only recognized direct
propsandthis.propsusage shapes, so local aliases used in whole-props forwarding,forwardRefclosures, and typed decorator callbacks still raised false positives. The whole-props path also matched the literal identifier nameprops, which could over-suppress nested helper-local aliases instead of the component's real props binding.Test Plan
npx tsx --tsconfig packages/tsconfig.test.json --test packages/analysis/src/jsts/rules/S6767/unit.test.ts packages/analysis/src/jsts/rules/S6767/unit.typescript.test.ts