Skip to content

Enforce import/no-duplicates as error#19797

Merged
scidomino merged 4 commits into
google-gemini:mainfrom
Nixxx19:nityam/import-no-duplicates-rule
Feb 27, 2026
Merged

Enforce import/no-duplicates as error#19797
scidomino merged 4 commits into
google-gemini:mainfrom
Nixxx19:nityam/import-no-duplicates-rule

Conversation

@Nixxx19

@Nixxx19 Nixxx19 commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades import/no-duplicates from warning to error to prevent new violations.

Duplicate imports were already cleaned up in #19753 (PRs #19777, #19781, #19791, #19795). This PR enforces the rule going forward.

Changes

  • Set import/no-duplicates to error in eslint.config.js

Closes #19752

@Nixxx19 Nixxx19 requested a review from a team as a code owner February 21, 2026 07:10
@gemini-code-assist

Copy link
Copy Markdown
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 strengthens code quality by enforcing a critical ESLint rule as an error. By elevating the import/no-duplicates rule, the system will now actively prevent the introduction of redundant import statements, maintaining a cleaner and more efficient codebase. This change builds upon prior efforts to clean up existing violations, focusing on proactive prevention.

Highlights

  • ESLint Configuration Update: The import/no-duplicates rule has been upgraded from a warning to an error in the ESLint configuration. This change ensures that any new instances of duplicate imports will be flagged as errors, preventing their introduction into the codebase.
Changelog
  • eslint.config.js
    • Updated the import/no-duplicates rule from 'warn' to 'error' to enforce stricter import management.
Activity
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 correctly promotes the import/no-duplicates ESLint rule to an error. This is a positive change for code quality. I've also left a comment on eslint.config.js suggesting a refactoring to merge two redundant configuration blocks to improve maintainability and clarity.

Comment thread eslint.config.js Outdated
@gemini-cli gemini-cli Bot added the area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt label Feb 21, 2026
@Nixxx19

Nixxx19 commented Feb 23, 2026

Copy link
Copy Markdown
Contributor Author

cc @gundermanc (tagging for better visibility)

@scidomino scidomino enabled auto-merge February 27, 2026 21:00
@scidomino scidomino added this pull request to the merge queue Feb 27, 2026
Merged via the queue into google-gemini:main with commit 5e3b1fe Feb 27, 2026
27 checks passed
BryanBradfo pushed a commit to BryanBradfo/gemini-cli that referenced this pull request Mar 5, 2026
liamhelmer pushed a commit to badal-io/gemini-cli that referenced this pull request Mar 12, 2026
warrenzhu25 pushed a commit to warrenzhu25/gemini-cli that referenced this pull request Apr 9, 2026
cocosheng-g pushed a commit that referenced this pull request May 6, 2026
@sripasg sripasg added the size/s A small PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt size/s A small PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make import/no-duplicates rule an error

3 participants