refactor(linter/plugins): simplify binding it.only in RuleTester#16960
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the binding of it.only in the RuleTester class by replacing Function.bind.call(it.only, it) with the more straightforward it.only.bind(it). Both approaches achieve the same result, but the refactored version is more idiomatic and readable.
Key changes:
- Simplified the method binding syntax for
it.onlyin two locations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6a77d23 to
e88c42b
Compare
c83089a to
be2e431
Compare
Merge activity
|
…16960) Tiny refactor. `Function` does not actually have a property called `bind` - it's on `Function.prototype`.
be2e431 to
2f946cf
Compare
e88c42b to
0cbd88c
Compare
…xc-project#16960) Tiny refactor. `Function` does not actually have a property called `bind` - it's on `Function.prototype`.

Tiny refactor.
Functiondoes not actually have a property calledbind- it's onFunction.prototype.