Skip to content

ci: introduce workflow for linter#183

Merged
guglielmo-san merged 21 commits into
a2aproject:mainfrom
guglielmo-san:main
Nov 17, 2025
Merged

ci: introduce workflow for linter#183
guglielmo-san merged 21 commits into
a2aproject:mainfrom
guglielmo-san:main

Conversation

@guglielmo-san

@guglielmo-san guglielmo-san commented Nov 17, 2025

Copy link
Copy Markdown
Member

Description

This pull request introduces a new ESLint configuration file, eslint.config.mjs to standardize code quality and style across the project.

Here's a summary of the key changes:

  • ESLint Setup with TypeScript and Prettier Integration: The configuration now leverages @eslint/js and typescript-eslint for linting of TypeScript code. eslint-config-prettier is included to disable any ESLint rules that might conflict with Prettier's formatting, which will be included in a new PR.
  • Ignored Files: The dist/ and node_modules/ directories are explicitly ignored to prevent linting of generated output and third-party dependencies.

Custom Rule Adjustments:

  • @typescript-eslint/no-explicit-any is turned off to allow the use of the any type where necessary.
  • @typescript-eslint/no-unused-vars is configured to ignore unused arguments and caught errors that are prefixed with an underscore (_). This is a common pattern to signal intentional unused variables.

Test File Specific Rules:

  • @typescript-eslint/no-unused-expressions is turned off to accommodate testing libraries like Chai, which often use expression-based assertions.
  • @typescript-eslint/no-unsafe-function-type is turned off to allow more flexible function type usage within test contexts.

Node.js Global Variables: The configuration now includes globals.node to correctly recognize Node.js global variables, preventing false positives for undefined variables in Node.js environments.

The changes in other files in this PR are necessary for the linter checks to pass. They involve mainly the removal of unused parameters.

Re #177 🦕

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @guglielmo-san, 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 establishes a robust linting workflow for the project by introducing a new ESLint configuration tailored for TypeScript. The setup integrates essential tools for code quality and style consistency, including specific rule adjustments to align with project practices and testing frameworks. This foundational change ensures a higher standard of code maintainability and readability going forward.

Highlights

  • New ESLint Configuration: A new eslint.config.mjs file has been introduced to standardize code quality and style across the project, leveraging @eslint/js and typescript-eslint for TypeScript code linting.
  • Prettier Integration: eslint-config-prettier is included to disable any ESLint rules that might conflict with Prettier's formatting, ensuring a harmonious setup for code style.
  • Custom Rule Adjustments: Specific ESLint rules have been adjusted: @typescript-eslint/no-explicit-any is turned off, and @typescript-eslint/no-unused-vars is configured to ignore unused arguments and caught errors prefixed with an underscore (_).
  • Test File Specific Rules: Rules like @typescript-eslint/no-unused-expressions and @typescript-eslint/no-unsafe-function-type are turned off for test files (test/**/*.spec.ts) to accommodate common testing patterns with libraries like Chai.
  • Node.js Global Variables Support: The configuration now includes globals.node to correctly recognize Node.js global variables, preventing false positives for undefined variables in Node.js environments.
  • Codebase Refinements: Various files have been updated to remove unused imports and prefix intentionally unused parameters with _ to comply with the new linting rules.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/linter.yml
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.

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

Copy link
Copy Markdown
Contributor

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 introduces ESLint to the project, which is a great step for maintaining code quality. The configuration in eslint.config.mjs is a good start, but has a critical issue with how the configuration is exported, which will prevent it from working. I've left comments with suggestions to fix this. I've also pointed out that globally disabling @typescript-eslint/no-explicit-any is not recommended and provided an alternative. The rest of the changes are lint fixes, which look correct and improve the codebase by removing unused code.

Comment thread eslint.config.mjs
Comment thread eslint.config.mjs
Comment thread eslint.config.mjs
Comment thread eslint.config.mjs
Comment thread eslint.config.mjs Outdated
@ishymko ishymko changed the title feat: Introduce workflow for linter ci: introduce workflow for linter Nov 17, 2025
Comment thread test/client/util.ts Outdated
Comment thread test/server/a2a_express_app.spec.ts Outdated
Comment thread src/server/transports/jsonrpc_transport_handler.ts Outdated
Comment thread src/server/transports/jsonrpc_transport_handler.ts Outdated
Comment thread eslint.config.mjs Outdated
Comment thread eslint.config.mjs
@guglielmo-san guglielmo-san merged commit e7e8f35 into a2aproject:main Nov 17, 2025
5 checks passed
@ishymko ishymko mentioned this pull request Nov 19, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants