Skip to content

chore(cli): drop unnecessary type assertion in mcp tools - #342

Merged
coryrylan merged 1 commit into
mainfrom
topic/upkeep/lint/cli-mcp-unnecessary-assertion
Sep 25, 2026
Merged

coryrylan merged 1 commit into
mainfrom
topic/upkeep/lint/cli-mcp-unnecessary-assertion

Conversation

@cursor

@cursor cursor Bot commented Sep 25, 2026

Copy link
Copy Markdown

Selected task: lint Mode B on projects/cli/src/mcp/index.ts.

Rationale (selector): "@typescript-eslint/no-unnecessary-type-assertion is enforced with 1 suppressed violation left in this file, the smallest remaining group. 225 suppressions remain across the repository."

Before / after:

  • projects/cli/src/mcp/index.ts: 1 suppression → 0
  • Repo-wide @typescript-eslint/no-unnecessary-type-assertion suppressions: 225 → 224
  • Finding was attachProgress(params as Record<string, unknown>, ctx) at line 83. attachProgress already accepts the original params type, so the assertion was dropped. The finding is present both with @internals/tools dist present and with it moved aside.

Public API: no public API changed. startMcpServer and other exports are byte-identical except for removing that assertion in the internal registerTools callback.

Left alone: remaining CLI suppressions in src/utils.ts (2); remaining assertions in this file (as ToolAnnotations, as unknown as { [x: string]: unknown }) which are not flagged; other packages' suppressions.

Validation: projects/cli lint pass; unit tests 196 pass; test:types / test:axe / test:ssr / test:lighthouse / test:visual not defined for this package. Root pnpm run ci pass after the change. No inline disables added.

Open in Web View Automation 

Removes a redundant `as Record<string, unknown>` on MCP tool params
before attachProgress, then prunes the matching bulk suppression.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: NVIDIA/elements/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: cf64476e-b67a-4fc1-814d-f184228549a3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@cursor
cursor Bot marked this pull request as ready for review September 25, 2026 06:10
@coryrylan coryrylan added the upkeep label Sep 25, 2026 — with Cursor
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/vitest

The overall line coverage in commit 75826ba in the topic/upkeep/lint/cl... branch remains at 99%, unchanged from commit b24d6cb in the main branch.

@coryrylan
coryrylan merged commit d28edd7 into main Sep 25, 2026
16 checks passed
@coryrylan
coryrylan deleted the topic/upkeep/lint/cli-mcp-unnecessary-assertion branch September 25, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants