Skip to content

Comments

refactor(linter/plugins): simplify binding it.only in RuleTester#16960

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-16-refactor_linter_plugins_simplify_binding_it.only_in_ruletester_
Dec 16, 2025
Merged

refactor(linter/plugins): simplify binding it.only in RuleTester#16960
graphite-app[bot] merged 1 commit intomainfrom
12-16-refactor_linter_plugins_simplify_binding_it.only_in_ruletester_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 16, 2025

Tiny refactor. Function does not actually have a property called bind - it's on Function.prototype.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins labels Dec 16, 2025
Copy link
Member Author

overlookmotel commented Dec 16, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.only in two locations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overlookmotel overlookmotel self-assigned this Dec 16, 2025
@overlookmotel overlookmotel force-pushed the 12-16-refactor_linter_plugins_simplify_binding_it.only_in_ruletester_ branch from 6a77d23 to e88c42b Compare December 16, 2025 16:27
@overlookmotel overlookmotel force-pushed the 12-16-fix_linter_plugins_error_if_defaultoptions_is_not_json-serializable branch from c83089a to be2e431 Compare December 16, 2025 16:27
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Dec 16, 2025
Copy link
Member Author

overlookmotel commented Dec 16, 2025

Merge activity

…16960)

Tiny refactor. `Function` does not actually have a property called `bind` - it's on `Function.prototype`.
@graphite-app graphite-app bot force-pushed the 12-16-fix_linter_plugins_error_if_defaultoptions_is_not_json-serializable branch from be2e431 to 2f946cf Compare December 16, 2025 16:39
@graphite-app graphite-app bot force-pushed the 12-16-refactor_linter_plugins_simplify_binding_it.only_in_ruletester_ branch from e88c42b to 0cbd88c Compare December 16, 2025 16:39
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 16, 2025
Base automatically changed from 12-16-fix_linter_plugins_error_if_defaultoptions_is_not_json-serializable to main December 16, 2025 16:45
@graphite-app graphite-app bot merged commit 0cbd88c into main Dec 16, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 12-16-refactor_linter_plugins_simplify_binding_it.only_in_ruletester_ branch December 16, 2025 16:46
qinyuhang pushed a commit to qinyuhang/oxc that referenced this pull request Jan 22, 2026
…xc-project#16960)

Tiny refactor. `Function` does not actually have a property called `bind` - it's on `Function.prototype`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant