Skip to content

fix: merge duplicate imports in sdk and test-utils packages (1/4)#19777

Merged
scidomino merged 5 commits intogoogle-gemini:mainfrom
Nixxx19:nityam/cleanup-import-no-duplicates
Feb 27, 2026
Merged

fix: merge duplicate imports in sdk and test-utils packages (1/4)#19777
scidomino merged 5 commits intogoogle-gemini:mainfrom
Nixxx19:nityam/cleanup-import-no-duplicates

Conversation

@Nixxx19
Copy link
Contributor

@Nixxx19 Nixxx19 commented Feb 21, 2026

Summary

This PR consolidates duplicate import statements from the same modules to comply with the import/no-duplicates ESLint rule.

Part 1 of 4 - Fixes 5 files in packages/sdk and packages/test-utils

Changes

  • packages/sdk (4 files):

    • Merged duplicate imports from node:path in test files
    • Merged duplicate imports from @google/gemini-cli-core in shell.ts
  • packages/test-utils (1 file):

    • Merged duplicate imports from node:fs in test-rig.ts

Testing

  • ✅ All SDK tests pass
  • ✅ ESLint passes with no warnings
  • ✅ Pre-commit hooks pass

Related

Consolidate duplicate import statements from the same modules to comply
with the import/no-duplicates ESLint rule.

Changes:
- packages/sdk: Merged duplicate imports from 'node:path' and '@google/gemini-cli-core'
- packages/test-utils: Merged duplicate imports from 'node:fs'

This is part 1 of 4 PRs to clean up import/no-duplicates warnings across
the codebase (5 files in sdk + test-utils packages).
@Nixxx19 Nixxx19 requested a review from a team as a code owner February 21, 2026 03:52
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Nixxx19, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on code quality and maintainability by consolidating duplicate import statements across several files in the sdk and test-utils packages. This is the first part of a larger effort to ensure compliance with the import/no-duplicates ESLint rule, resulting in cleaner and more consistent import declarations without altering any functional behavior of the application.

Highlights

  • Import Consolidation in packages/sdk: Merged duplicate import statements from node:path in test files (agent.integration.test.ts, skills.integration.test.ts, tool.integration.test.ts) and from @google/gemini-cli-core in shell.ts to comply with ESLint rules.
  • Import Consolidation in packages/test-utils: Consolidated duplicate import statements from node:fs in test-rig.ts.
  • ESLint Compliance: This PR addresses the import/no-duplicates ESLint rule by ensuring all imports from the same module are grouped into a single statement.
Changelog
  • packages/sdk/src/agent.integration.test.ts
    • Removed a redundant import for dirname from node:path.
    • Updated the __dirname assignment to use the already imported path module.
  • packages/sdk/src/shell.ts
    • Combined type Config as CoreConfig, ShellExecutionService, and ShellTool into a single import statement from @google/gemini-cli-core.
  • packages/sdk/src/skills.integration.test.ts
    • Removed a redundant import for dirname from node:path.
    • Updated the __dirname assignment to use the already imported path module.
  • packages/sdk/src/tool.integration.test.ts
    • Removed a redundant import for dirname from node:path.
    • Updated the __dirname assignment to use the already imported path module.
  • packages/test-utils/src/test-rig.ts
    • Merged named imports (mkdirSync, writeFileSync, readFileSync) into the existing default fs import from node:fs.
Activity
  • All SDK tests passed successfully.
  • ESLint checks completed with no warnings.
  • Pre-commit hooks passed without issues.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively consolidates duplicate import statements across several files in the sdk and test-utils packages, successfully addressing the import/no-duplicates ESLint rule. The changes are clean, correct, and improve code consistency. This is a good step in the larger effort to clean up the codebase.

@gemini-cli gemini-cli bot added priority/p2 Important but can be addressed in a future release. help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Feb 26, 2026
@scidomino scidomino enabled auto-merge February 27, 2026 21:01
@scidomino scidomino added this pull request to the merge queue Feb 27, 2026
Merged via the queue into google-gemini:main with commit f6533c0 Feb 27, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup existing import/no-duplicates warnings and suppressions

2 participants