Skip to content

chore: fix lint warnings in VAD, AEC, and stateless adapter#10

Merged
ZouR-Ma merged 1 commit into
stepfun-ai:mainfrom
pingfanfan:chore/clean-checks
Jul 10, 2026
Merged

chore: fix lint warnings in VAD, AEC, and stateless adapter#10
ZouR-Ma merged 1 commit into
stepfun-ai:mainfrom
pingfanfan:chore/clean-checks

Conversation

@pingfanfan

@pingfanfan pingfanfan commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Closes #62

Why

pnpm check surfaced several low-risk oxlint warnings on a fresh checkout. This PR clears them.

Per AGENTS.md §7, README.md, README_CN.md, and .gitignore are currently frozen, so this PR touches code only — the markdown/.gitignore changes from the earlier revision have been dropped (and were already addressed on main).

What changed

  • VAD edit-distance helpers (cli-handlers.ts, resolver.ts): replace new Array(length) sparse-array construction with Array.from, avoiding holey arrays.
  • Stateless backend adapter (stepfun-stateless.ts): drop the unused catch (e) binding.
  • Browser AEC async iterator (browser-audio-driver.ts): use arrow functions to avoid const self = this aliasing.

Verification

  • pnpm check exits 0 (test + lint + dep-guard + deadcode + tsc + prettier) — 1475 tests pass.
  • Rebased onto the latest main; no conflicts.

@ZouR-Ma

ZouR-Ma commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

To get this ready to merge:

  • Reference an issue in the description with Closes #<number> (our link-check CI requires it; open one first if needed).
  • Make sure pnpm check passes locally (lint, type-check, dependency/dead-code guards, formatting, and tests — also enforced in CI).

Full conventions:
https://github.com/stepfun-ai/Step-Realtime-CLI/blob/main/CONTRIBUTING.md

@github-actions github-actions Bot added area/docs docs, AGENTS.md, README(s), CONTRIBUTING.md area/realtime packages/realtime + extensions/realtime-* labels Jun 18, 2026
Clears the oxlint warnings surfaced by `pnpm check` without touching
the frozen README/.gitignore files (AGENTS.md §7):

- Replace `new Array(length)` sparse-array construction in the VAD
  edit-distance helpers (cli-handlers.ts, resolver.ts) with
  `Array.from`, avoiding holey arrays.
- Drop the unused `catch (e)` binding in the stateless backend adapter.
- Use arrow functions in the browser AEC async iterator to avoid
  `const self = this` aliasing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pingfanfan
pingfanfan force-pushed the chore/clean-checks branch from 5628a45 to 193781e Compare June 18, 2026 11:34
@pingfanfan pingfanfan changed the title chore: fix check formatting and lint warnings chore: fix lint warnings in VAD, AEC, and stateless adapter Jun 18, 2026
@li-xiu-qi

Copy link
Copy Markdown
Contributor

Hi @pingfanfan, thanks for the lint cleanup. This PR overlaps with #41 and #68 on the VAD sparse array fix (cli-handlers.ts, resolver.ts) and the unused catch parameter in stepfun-stateless.ts. Those PRs are currently open and cover the same files. Wanted to flag the overlap in case you want to coordinate or consolidate.

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

Labels

area/docs docs, AGENTS.md, README(s), CONTRIBUTING.md area/realtime packages/realtime + extensions/realtime-*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: pnpm check fails on a fresh checkout (formatting, lint warnings, ungitignored local tool state)

3 participants