Repository navigation
chore(core): remove unnecessary audit dispatch assertion - #474
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Drops the type assertion in AuditController.#update because dispatch already accepts the audit registry. Prunes one suppression for @typescript-eslint/no-unnecessary-type-assertion (214 to 213). No public API or behavior change. Co-authored-by: Cory Rylan <coryrylan@users.noreply.github.com> Signed-off-by: Cursor Agent <cursoragent@cursor.com>
coryrylan
force-pushed
the
topic/upkeep/lint/audit-type-assertion
branch
from
October 28, 2026 15:47
fb2ab3f to
7a52d70
Compare
coryrylan
enabled auto-merge (rebase)
October 28, 2026 15:51
coryrylan
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Selected task
Lint mode B. The selector chose
@typescript-eslint/no-unnecessary-type-assertioninprojects/core/src/internal/controllers/audit.controller.ts.Rationale: "@typescript-eslint/no-unnecessary-type-assertion is enforced with 1 suppressed violation left in this file, the smallest remaining group. 214 suppressions remain across the repository."
Before and after
The finding was: "This assertion is unnecessary since the receiver accepts the original type of the expression" on the
as Partial<typeof globalThis.NVE_ELEMENTS.state>argument inAuditController.#update. The same finding remained withprojects/core/distmoved aside.Removed that assertion.
GlobalStateService.dispatchalready accepts{ audit: registry }.Repo-wide suppressions for this rule: 214 → 213. In
projects/core/eslint-suppressions.json: 132 → 131, and theaudit.controller.tsentry is gone.Public API
No public API changed. The edit is inside the private
#updatemethod. Exported symbols, tags, properties, attributes, slots, events, and CSS are unchanged.Left alone
as unknown ason#hostMetadatain the same file (that assertion is not this finding).eslint-disablewarning indropdown.examples.tsthat prune prints.Validation
projects/corelint: passpnpm run test: 2312 passed, 1 skipped, includingaudit.controller.test.ts(16)test:types,test:axe,test:ssr, andtest:visual: pass (wireit cache; emitted output is unchanged because the assertion was already erased)test:lighthouse: 83 passedCI=true pnpm run ci: pass (12 ran, 182 skipped)git diff --check: cleanDiff is 1 insertion and 8 deletions across 2 files.