Skip to content

chore(internals): specify mock import type argument - #576

Open
cursor[bot] wants to merge 1 commit into
mainfrom
topic/upkeep/lint/packages-service-import-type
Open

cursor[bot] wants to merge 1 commit into
mainfrom
topic/upkeep/lint/packages-service-import-type

Conversation

@cursor

@cursor cursor Bot commented Nov 15, 2026

Copy link
Copy Markdown

Lint mode B. The selector chose @typescript-eslint/no-unnecessary-type-assertion in projects/internals/tools/src/packages/service.test.ts.

@typescript-eslint/no-unnecessary-type-assertion is enforced with 1 suppressed violation left in this file, the smallest remaining group. 193 suppressions remain across the repository.

The mock asserted importOriginal() as Record<string, unknown>. ESLint reported that the generic call can take that type argument directly, so the test now calls importOriginal<Record<string, unknown>>(). The assertion had no runtime effect.

Repository suppressions for this rule: 193 → 192. The tools suppressions file: 17 → 16, and the src/packages/service.test.ts entry is gone.

No public API changed.

Left alone: the other assertions in this file (ToolMethod<unknown>, changelog string and record unions, and as Error). They still change the expression type. The mock stays Record<string, unknown> because the fixture only supplies two package versions.

Validation: tools lint passed. test:coverage passed 745 tests, including the 12 in this file. test:types, test:axe, test:ssr, test:lighthouse, and test:visual are not defined. pnpm run test still fails the pre-existing setup-agent.test.ts EACCES on mkdir '/project/.agents/skills/elements' when Vitest isolation is off; package CI uses test:coverage. Root CI=true pnpm run ci passed (5 ran, 192 skipped).

Open in Web View Automation 

Replaces the unnecessary type assertion on importOriginal in the
packages service tests with an explicit type argument. The assertion
had no runtime effect. Repository suppressions for
@typescript-eslint/no-unnecessary-type-assertion go from 193 to 192.

Co-authored-by: Cory Rylan  <coryrylan@users.noreply.github.com>
Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@coryrylan coryrylan added the upkeep label Nov 15, 2026 — with Cursor
@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

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

Run configuration

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/vitest

main ac3a044 topic/upkeep/lint/pa... 171b9fd +/-
99% 99% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants