Skip to content

refactor(linter/plugins): simplify callback functions for create/destroy workspace#18761

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace
Jan 31, 2026
Merged

refactor(linter/plugins): simplify callback functions for create/destroy workspace#18761
graphite-app[bot] merged 1 commit intomainfrom
om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jan 31, 2026

Simple refactor. When a NAPI function has only a single param, no need to use FnArgs.

Copy link
Member Author

overlookmotel commented Jan 31, 2026

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 NAPI callback type definitions and their usage for workspace management functions. When a NAPI function has only a single parameter, there's no need to use the FnArgs wrapper - the parameter type can be used directly.

Changes:

  • Simplified JsCreateWorkspaceCb and JsDestroyWorkspaceCb type definitions to use String directly instead of FnArgs<(String,)>
  • Updated call sites in wrap_create_workspace and wrap_destroy_workspace to pass the workspace URI parameter directly

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/oxlint/src/run.rs Updated type definitions for JsCreateWorkspaceCb and JsDestroyWorkspaceCb to use String instead of FnArgs<(String,)>
apps/oxlint/src/js_plugins/external_linter.rs Updated wrap_create_workspace and wrap_destroy_workspace implementations to call the callbacks with the workspace URI directly instead of wrapping it in FnArgs

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

@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace branch from 08d57bb to 3d7c063 Compare January 31, 2026 13:49
@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_reorder_callback_wrapper_functions branch from a01133c to f313db3 Compare January 31, 2026 13:49
@github-actions github-actions bot added the A-linter-plugins Area - Linter JS plugins label Jan 31, 2026
@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_reorder_callback_wrapper_functions branch from f313db3 to c38f130 Compare January 31, 2026 14:13
@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace branch from 3d7c063 to b5be499 Compare January 31, 2026 14:13
@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_reorder_callback_wrapper_functions branch from c38f130 to 9b8cf57 Compare January 31, 2026 15:15
@overlookmotel overlookmotel force-pushed the om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace branch from b5be499 to 4ffdd70 Compare January 31, 2026 15:15
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 31, 2026
Copy link
Contributor

camc314 commented Jan 31, 2026

Merge activity

  • Jan 31, 3:35 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 31, 4:32 PM UTC: graphite-app added this pull request to the Graphite merge queue.
  • Jan 31, 4:42 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 31, 4:44 PM UTC: connorshea added this pull request to the Graphite merge queue.
  • Jan 31, 4:45 PM UTC: Merged by the Graphite merge queue.

@camc314 camc314 force-pushed the om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace branch from 4ffdd70 to b5be499 Compare January 31, 2026 15:35
@camc314 camc314 force-pushed the om/01-31-refactor_linter_plugins_reorder_callback_wrapper_functions branch 2 times, most recently from 82d5d37 to 1cda019 Compare January 31, 2026 16:22
@camc314 camc314 force-pushed the om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace branch from b5be499 to 54e7269 Compare January 31, 2026 16:22
…roy workspace (#18761)

Simple refactor. When a NAPI function has only a single param, no need to use `FnArgs`.
@graphite-app graphite-app bot force-pushed the om/01-31-refactor_linter_plugins_reorder_callback_wrapper_functions branch from 1cda019 to 64ddbe1 Compare January 31, 2026 16:34
@graphite-app graphite-app bot force-pushed the om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace branch from 54e7269 to 41d75c4 Compare January 31, 2026 16:35
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 31, 2026
Base automatically changed from om/01-31-refactor_linter_plugins_reorder_callback_wrapper_functions to main January 31, 2026 16:41
@connorshea connorshea added the 0-merge Merge with Graphite Merge Queue label Jan 31, 2026
@graphite-app graphite-app bot merged commit 41d75c4 into main Jan 31, 2026
20 checks passed
@graphite-app graphite-app bot deleted the om/01-31-refactor_linter_plugins_simplify_callback_functions_for_create_destroy_workspace branch January 31, 2026 16:45
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 31, 2026
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.

3 participants

Comments