Skip to content

chore(lint): fix lint errors seen when running npm run lint#19844

Merged
abhipatel12 merged 1 commit intomainfrom
abhi/lint-fixes.1
Feb 21, 2026
Merged

chore(lint): fix lint errors seen when running npm run lint#19844
abhipatel12 merged 1 commit intomainfrom
abhi/lint-fixes.1

Conversation

@abhipatel12
Copy link
Copy Markdown
Contributor

Summary

This PR addresses and fixes various lint errors reported when running npm run lint across packages/a2a-server and packages/core.

Details

The changes include:

  • Reordering and consolidating imports (combining type-only and value imports) to adhere to project standards.
  • Updating js-yaml usage from yaml.load to load to comply with the latest API.
  • Removing unused imports and fixing minor stylistic inconsistencies in test files.
    These fixes ensure that the codebase remains clean and passes CI linting checks.

Related Issues

None.

How to Validate

  1. Run npm run lint from the project root.
  2. Confirm that no linting errors are reported for the modified packages.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@abhipatel12 abhipatel12 requested a review from a team as a code owner February 21, 2026 18:05
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @abhipatel12, 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 enhancing code quality and consistency by resolving various linting errors. The primary changes involve standardizing import statements, updating API usage for the js-yaml library, and eliminating redundant code. These adjustments contribute to a more maintainable and compliant codebase, ensuring that all linting checks pass successfully.

Highlights

  • Import Consolidation: Many files across packages/a2a-server and packages/core had their TypeScript type imports and regular imports reordered and consolidated into single import statements. This improves readability and adheres to consistent import styling.
  • js-yaml API Update: The usage of the js-yaml library was updated from yaml.load to the named export load in packages/core/src/agents/agentLoader.ts and packages/core/src/skills/skillLoader.ts to align with its modern API.
  • Removed Redundant Imports: Several instances of redundant or duplicate imports were removed, particularly in test files, after consolidating them into existing import statements.
  • Stylistic Fixes in Test Files: Minor stylistic inconsistencies, such as the grouping of vitest imports and path utility imports, were addressed in various test files to ensure a cleaner codebase.
Changelog
  • packages/a2a-server/src/agent/task.test.ts
    • Consolidated type imports from '@google/gemini-cli-core'.
  • packages/a2a-server/src/agent/task.ts
    • Consolidated type imports from '@a2a-js/sdk/server'.
  • packages/a2a-server/src/config/config.ts
    • Consolidated type imports from '@google/gemini-cli-core'.
  • packages/a2a-server/src/http/app.test.ts
    • Consolidated type imports from '@google/gemini-cli-core'.
  • packages/core/src/agents/a2a-client-manager.test.ts
    • Reordered and grouped imports from '@a2a-js/sdk/client'.
  • packages/core/src/agents/agentLoader.ts
    • Updated 'js-yaml' import and usage to use named 'load' export.
  • packages/core/src/agents/local-invocation.test.ts
    • Consolidated type imports from './types.js'.
  • packages/core/src/agents/registry.test.ts
    • Consolidated and removed redundant type imports from '../config/config.js'.
  • packages/core/src/agents/remote-invocation.ts
    • Consolidated type imports from '../tools/tools.js'.
  • packages/core/src/code_assist/converter.test.ts
    • Moved 'Part' type import to a dedicated type import block.
  • packages/core/src/config/config.test.ts
    • Consolidated imports for 'uiTelemetryService' and grouped type imports for model configuration services.
  • packages/core/src/config/config.ts
    • Consolidated telemetry logger imports and grouped type imports for code assist settings.
  • packages/core/src/core/baseLlmClient.test.ts
    • Reordered and consolidated type imports from './baseLlmClient.js' and '../telemetry/types.js'.
  • packages/core/src/core/client.ts
    • Consolidated 'CompressionStatus' import from './turn.js'.
  • packages/core/src/core/coreToolHookTriggers.ts
    • Consolidated 'AnyToolInvocation' type import from '../tools/tools.js'.
  • packages/core/src/hooks/hookAggregator.ts
    • Consolidated 'HookEventName' import from './types.js'.
  • packages/core/src/hooks/hookEventHandler.test.ts
    • Reordered and consolidated type imports from './types.js'.
  • packages/core/src/hooks/hookPlanner.ts
    • Consolidated 'HookEventName' type import from './types.js'.
  • packages/core/src/hooks/hookRunner.test.ts
    • Consolidated type imports from './types.js'.
  • packages/core/src/ide/ide-installer.test.ts
    • Consolidated 'vitest' imports and removed redundant test utility imports.
  • packages/core/src/scheduler/state-manager.ts
    • Consolidated 'ROOT_SCHEDULER_ID' import from './types.js'.
  • packages/core/src/scheduler/tool-executor.test.ts
    • Consolidated 'AnyToolInvocation' type import from '../index.js'.
  • packages/core/src/services/chatCompressionService.ts
    • Consolidated 'LlmRole' import from '../telemetry/types.js'.
  • packages/core/src/services/loopDetectionService.ts
    • Consolidated 'LlmRole' import from '../telemetry/types.js'.
  • packages/core/src/skills/skillLoader.ts
    • Updated 'js-yaml' import and usage to use named 'load' export.
  • packages/core/src/telemetry/clearcut-logger/clearcut-logger.test.ts
    • Consolidated 'vitest' imports.
  • packages/core/src/telemetry/gcp-exporters.ts
    • Consolidated 'ExportResultCode' import from '@opentelemetry/core'.
  • packages/core/src/telemetry/loggers.test.ts
    • Consolidated type imports for 'MessageBus' and 'GeminiCLIExtension'.
  • packages/core/src/telemetry/uiTelemetry.test.ts
    • Consolidated 'ToolCallEvent' import from './types.js'.
  • packages/core/src/telemetry/uiTelemetry.ts
    • Consolidated 'LlmRole' type import from './types.js'.
  • packages/core/src/tools/edit.ts
    • Consolidated telemetry event and logger imports.
  • packages/core/src/tools/mcp-tool.ts
    • Consolidated 'PolicyUpdateOptions' type import from './tools.js'.
  • packages/core/src/tools/shell.test.ts
    • Consolidated 'OUTPUT_UPDATE_INTERVAL_MS' import from './shell.js'.
  • packages/core/src/tools/shell.ts
    • Consolidated 'PolicyUpdateOptions' type import from './tools.js'.
  • packages/core/src/tools/web-fetch.ts
    • Consolidated 'ToolConfirmationOutcome' type import from './tools.js'.
  • packages/core/src/tools/write-file.ts
    • Consolidated 'ToolConfirmationOutcome' type import from './tools.js'.
  • packages/core/src/tools/write-todos.ts
    • Consolidated 'Todo' and 'ToolResult' type imports from './tools.js'.
  • packages/core/src/utils/editCorrector.test.ts
    • Consolidated 'Mocked' type import from 'vitest'.
  • packages/core/src/utils/getFolderStructure.test.ts
    • Removed redundant 'nodePath' import and updated path joining calls.
  • packages/core/src/utils/memoryDiscovery.test.ts
    • Consolidated 'homedir' import from './paths.js'.
Activity
  • The pull request was created by abhipatel12 to address linting errors.
  • The author provided a detailed summary of the changes, including import reordering and js-yaml API updates.
  • Validation steps were outlined, instructing to run npm run lint to confirm no errors.
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
Copy Markdown
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

The pull request successfully addresses various linting errors across the packages/a2a-server and packages/core packages. The changes primarily involve consolidating and reordering imports, updating the js-yaml API usage to the latest standard (load instead of yaml.load), and removing unused imports. These modifications enhance code clarity and maintainability while ensuring the project adheres to its defined coding standards and passes CI linting checks. No functional bugs or high-severity issues were identified during the review.

@github-actions
Copy link
Copy Markdown

Size Change: -1.03 kB (0%)

Total Size: 25.2 MB

Filename Size Change
./bundle/gemini.js 25.2 MB -1.03 kB (0%)
ℹ️ View Unchanged
Filename Size
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB
./bundle/sandbox-macos-strict-open.sb 4.82 kB
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB

compressed-size-action

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 21, 2026
@abhipatel12 abhipatel12 added this pull request to the merge queue Feb 21, 2026
Merged via the queue into main with commit acb7f57 Feb 21, 2026
29 checks passed
@abhipatel12 abhipatel12 deleted the abhi/lint-fixes.1 branch February 21, 2026 18:42
SH20RAJ added a commit to SH20RAJ/gemini-cli that referenced this pull request Feb 23, 2026
liamhelmer pushed a commit to badal-io/gemini-cli that referenced this pull request Mar 12, 2026
mn3m-24 pushed a commit to mn3m-24/gemini-cli that referenced this pull request Apr 4, 2026
warrenzhu25 pushed a commit to warrenzhu25/gemini-cli that referenced this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants