Skip to content

style(linter): use top-level imports#19076

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/02-06-style_linter_use_top-level_imports
Feb 6, 2026
Merged

style(linter): use top-level imports#19076
graphite-app[bot] merged 1 commit intomainfrom
om/02-06-style_linter_use_top-level_imports

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 6, 2026

Style-only change. Shorten code by using top-level import instead of repeating crate::fixer::FixKind in many places.

Also move a use::std::... statement up to top level.

@github-actions github-actions bot added the A-linter Area - Linter label Feb 6, 2026
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Feb 6, 2026
Copy link
Member Author

overlookmotel commented Feb 6, 2026


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.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 6, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing om/02-06-style_linter_use_top-level_imports (5986027) with main (c417bf5)1

Summary

✅ 47 untouched benchmarks
⏩ 3 skipped benchmarks2

Footnotes

  1. No successful run was found on om/02-06-perf_linter_remove_pointless_string_cloning_when_combining_suggestions (c417bf5) during the generation of this report, so main (c417bf5) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@overlookmotel overlookmotel marked this pull request as ready for review February 6, 2026 15:43
Copilot AI review requested due to automatic review settings February 6, 2026 15:44
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 is a style-only refactor in tsgolint.rs to reduce repetition by moving previously function-local std imports to the module level and using the already-imported FixKind identifier directly instead of crate::fixer::FixKind.

Changes:

  • Move Cow, iter, and mem imports to the existing top-level use std::{ ... } block.
  • Replace crate::fixer::FixKind::{Fix,Suggestion} with FixKind::{Fix,Suggestion} where FixKind is already in scope.
  • Update the test module import list to include FixKind directly.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Feb 6, 2026
Copy link
Contributor

camc314 commented Feb 6, 2026

Merge activity

@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 6, 2026
@overlookmotel overlookmotel force-pushed the om/02-06-style_linter_use_top-level_imports branch from ee2cfe2 to 5986027 Compare February 6, 2026 15:57
@overlookmotel overlookmotel force-pushed the om/02-06-perf_linter_remove_pointless_string_cloning_when_combining_suggestions branch from 429ad2b to d793381 Compare February 6, 2026 15:57
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 6, 2026
Style-only change. Shorten code by using top-level import instead of repeating `crate::fixer::FixKind` in many places.

Also move a `use::std::...` statement up to top level.
@graphite-app graphite-app bot force-pushed the om/02-06-perf_linter_remove_pointless_string_cloning_when_combining_suggestions branch from d793381 to 4ce3772 Compare February 6, 2026 16:02
@graphite-app graphite-app bot force-pushed the om/02-06-style_linter_use_top-level_imports branch from 5986027 to 7160485 Compare February 6, 2026 16:03
Base automatically changed from om/02-06-perf_linter_remove_pointless_string_cloning_when_combining_suggestions to main February 6, 2026 16:07
@graphite-app graphite-app bot merged commit 7160485 into main Feb 6, 2026
22 checks passed
@graphite-app graphite-app bot deleted the om/02-06-style_linter_use_top-level_imports branch February 6, 2026 16:08
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 6, 2026
OskarLebuda pushed a commit to OskarLebuda/oxc that referenced this pull request Feb 17, 2026
Style-only change. Shorten code by using top-level import instead of repeating `crate::fixer::FixKind` in many places.

Also move a `use::std::...` statement up to top level.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter 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.

2 participants

Comments