Skip to content

fix(mandatory-scope-binding): flag potential invocations only#183

Merged
kireevmp merged 4 commits into
masterfrom
fix/narrow-mandatory-scope-binding
May 14, 2026
Merged

fix(mandatory-scope-binding): flag potential invocations only#183
kireevmp merged 4 commits into
masterfrom
fix/narrow-mandatory-scope-binding

Conversation

@kireevmp
Copy link
Copy Markdown
Contributor

@kireevmp kireevmp commented May 12, 2026

Previously mandatory-scope-binding over-flagged every EventCallble & Effect reference (specifically, Identifier) it found in a component without regard to its usage – it even erroneously flagged function arguments. But the essence of the rule has always been to prevent Scopeless calls, so this PR significantly improves (narrows down) the search.

Only direct or transitive (via an unknowing consumer) invocations actually risk bypassing Scope binding. So the rule now matches at four specific "boundary" positions + analyzes actual usage.

There's now also a "delegation contract" exception. We now allow passing a Unit to a callee within React jurisdiction whose declared argument type explicitly guarantees it's is aware the argument is a Unit. The rule assumes that the receiver is itself bound by the very same rule and "delegates" scope binding to that receiver.

@kireevmp kireevmp requested a review from AlexandrHoroshih May 12, 2026 12:32
@kireevmp kireevmp self-assigned this May 12, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for eslint-plugin ready!

Name Link
🔨 Latest commit 75b463e
🔍 Latest deploy log https://app.netlify.com/projects/eslint-plugin/deploys/6a058af2932250000893abac
😎 Deploy Preview https://deploy-preview-183--eslint-plugin.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@kireevmp kireevmp merged commit 3554284 into master May 14, 2026
8 checks passed
@kireevmp kireevmp deleted the fix/narrow-mandatory-scope-binding branch May 14, 2026 17:17
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.

1 participant