Skip to content

chore(internals): drop unused string assertion in examples service - #575

Merged
coryrylan merged 1 commit into
mainfrom
topic/upkeep/lint/examples-service-assertion
Nov 15, 2026
Merged

coryrylan merged 1 commit into
mainfrom
topic/upkeep/lint/examples-service-assertion

Conversation

@cursor

@cursor cursor Bot commented Nov 15, 2026

Copy link
Copy Markdown

Selected task

Lint mode B. Selector rationale:

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

Measurement

@typescript-eslint/no-unnecessary-type-assertion suppressions: 194 → 193.

The finding in projects/internals/tools/src/examples/service.ts was return results as string in ExamplesService.list. ESLint reported that the assertion is unnecessary because the declared return type already accepts the expression. Warm and cold type-aware lint (with projects/internals/tools/dist and projects/internals/metadata/dist moved aside) both reported that same finding before the edit and zero findings in the file after it.

Public API

No public API changed. The ExamplesService.list signature is unchanged, and the removed assertion had no runtime effect.

Left alone

The other assertions in this file (as Example[]) still change the type, so they stay. Other suppressed files were not edited.

pnpm run test in this package still fails setup-agent.test.ts with EACCES on mkdir '/project/.agents/skills/elements' when Vitest does not isolate modules. That failure is pre-existing on this VM and is outside this change. Package CI uses test:coverage, which passed (29 files, 745 tests), including src/examples/service.test.ts (16 tests).

Validation

  • projects/internals/tools has no DEVELOPMENT.md. Its scripts are lint, test, test:coverage, and test:watch.
  • pnpm run lint: pass
  • pnpm run test: fail, pre-existing setup-agent.test.ts EACCES (11 tests). The examples service tests passed.
  • test:types, test:axe, test:ssr, test:lighthouse, test:visual: not defined
  • pnpm run test:coverage: pass (745 tests)
  • root CI=true pnpm run ci: pass (6 ran, 191 skipped)
  • git diff --check: clean
Open in Web View Automation 

Removes the unnecessary string assertion from ExamplesService.list.
The declared return type already accepts the expression, and the
assertion had no runtime effect. Repository suppressions for
@typescript-eslint/no-unnecessary-type-assertion go from 194 to 193.

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 1417043 topic/upkeep/lint/ex... 61752d8 +/-
99% 99% 0%

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

@coryrylan
coryrylan added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit e229b69 Nov 15, 2026
16 checks passed
@coryrylan
coryrylan deleted the topic/upkeep/lint/examples-service-assertion branch November 15, 2026 05:58
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