fix: merge duplicate imports in packages/cli (4/4)#19795
Conversation
Merged duplicate import statements across 171 files in packages/cli to comply with the import/no-duplicates ESLint rule. Changes include: - Combined type and value imports from the same module - Used inline type syntax for better import consolidation - Fixed import ordering to reduce redundancy - Applied ESLint autofix with prefer-inline option Note: Some React imports remain as separate statements as they require both value and type imports in TSX files, which is acceptable. Related to google-gemini#19753
Summary of ChangesHello @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 refactors import statements throughout the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request performs a comprehensive cleanup of import statements across the packages/cli package, merging duplicates and adopting inline type syntax. The refactor, driven by ESLint rules, enhances code clarity and maintainability without altering application logic. The changes are consistent with the Repository Style Guide's emphasis on specific imports (Rule 74-75) and follow established patterns for combining value and type imports. No issues of high or critical severity were found during the review.
|
Thanks for the update |
Resolved conflicts in: - packages/cli/src/nonInteractiveCli.ts: Added convertSessionToClientHistory import - packages/cli/src/ui/hooks/useSessionBrowser.ts: Consolidated imports, removed duplicate coreEvents - packages/cli/src/ui/hooks/useSessionBrowser.test.ts: Added convertSessionToClientHistory import
- Fix duplicate PromptCompletion import in useCommandCompletion.tsx - Fix duplicate imports in useGeminiStream.test.tsx (useToolScheduler, Config, EditorType, AnyToolInvocation) - Add missing getErrorMessage import in useAuth.ts - Add missing Config type import in cleanup.ts - Add explicit return type to registerTelemetryConfig All ESLint, TypeScript, and build checks now pass.
Head branch was pushed to by a user without write access
|
@Nixxx19 I don't understand why we never merged this. It's now grown super stale. Can you send me some smaller PRs to do this? You can ping me on them and I will review them as they are for existing work. |
hey, I think it got conflicts after auto-merge was enabled so i had to push and then auto merge stopped, and over time the branch became quite stale. I can split this into smaller PRs (directory-wise) if that works for you, thanks!! |
|
created fresh pr queue #22040 and others to fix this issue and breaking into smaller tasks, so closing this pr |
Summary
packages/clitypesyntaximport/no-duplicatesESLint ruleChanges
--fixwithimport/no-duplicatesrule andprefer-inlineoptionStats
Testing
Related
Fixes #19753 - PR 4 of 4 (packages/cli) - FINAL PR! 🎉
Previous PRs: