Skip to content

Adjust lint rules to avoid unnecessary warning.#18970

Merged
scidomino merged 1 commit intomainfrom
tomm_deps
Feb 13, 2026
Merged

Adjust lint rules to avoid unnecessary warning.#18970
scidomino merged 1 commit intomainfrom
tomm_deps

Conversation

@scidomino
Copy link
Collaborator

@scidomino scidomino commented Feb 13, 2026

Summary

Adjust lint rules to avoid unnecessary warning.

Details

We were previously getting this error when building:

/Users/sciortino/src/gemini-cli/packages/vscode-ide-companion/src/diff-manager.ts
  246:9  warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-unsafe-type-assertion')

/Users/sciortino/src/gemini-cli/packages/vscode-ide-companion/src/ide-server.ts
  209:9  warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-unsafe-type-assertion')
  294:9  warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-unsafe-type-assertion')
  342:9  warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-unsafe-type-assertion')

✖ 4 problems (0 errors, 4 warnings)
  0 errors and 4 warnings potentially fixable with the `--fix` option.

It was due to the vscode-ide-companion having its own eslint file that was out of sync. This fixes it to have the same setting for this warning that the rest of the project does.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @scidomino, 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 enhances code quality and maintainability by introducing a stricter ESLint rule for TypeScript type assertions. The change aims to catch potential type-related issues earlier in the development process, leading to more robust and reliable code. A specific exemption for test files ensures that development and testing workflows remain efficient without compromising the overall type safety of the main application logic.

Highlights

  • ESLint Configuration Update: Enabled the @typescript-eslint/no-unsafe-type-assertion rule as an error across the codebase to enforce stricter type safety.
  • Test File Exemption: Disabled the newly added @typescript-eslint/no-unsafe-type-assertion rule specifically for **/*.test.ts files to prevent unnecessary warnings in test suites.
Changelog
  • packages/vscode-ide-companion/eslint.config.mjs
    • Added @typescript-eslint/no-unsafe-type-assertion rule with 'error' severity.
    • Configured @typescript-eslint/no-unsafe-type-assertion rule to be 'off' for files matching **/*.test.ts.
Activity
  • The author, scidomino, initiated this pull request with the title 'fix warnings'.
  • A pre-merge checklist is included in the pull request description, outlining necessary validation steps and documentation considerations.
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 adds the @typescript-eslint/no-unsafe-type-assertion ESLint rule to enforce safer type assertions, disabling it for test files. This is a good addition for code quality. However, the rule is being added to a configuration block that applies to all file types, not just TypeScript files. This is a critical issue as it will cause the TypeScript parser to run on incompatible files, leading to linting failures. My review includes a comment detailing how to correctly scope the configuration.

@scidomino scidomino changed the title fix warnings Adjust lint rules to avoid unnecessary warning. Feb 13, 2026
@github-actions
Copy link

github-actions bot commented Feb 13, 2026

Size Change: -2 B (0%)

Total Size: 24.4 MB

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

compressed-size-action

@scidomino scidomino marked this pull request as ready for review February 13, 2026 02:43
@scidomino scidomino requested a review from a team as a code owner February 13, 2026 02:43
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 13, 2026
@scidomino
Copy link
Collaborator Author

/gemini review

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 adjusts the ESLint configuration for the vscode-ide-companion package to align it with project-wide linting rules, resolving warnings about unused eslint-disable directives. The changes are well-implemented. I've added one suggestion to also include an ignores configuration to prevent linting of build artifacts, which is missing from this package's standalone ESLint config.

@scidomino scidomino enabled auto-merge February 13, 2026 17:25
@scidomino scidomino added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit 3bed7bb Feb 13, 2026
26 of 27 checks passed
@scidomino scidomino deleted the tomm_deps branch February 13, 2026 17:43
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.

3 participants