Skip to content

build(npm): add Biome checks and strict TypeScript flags - #11

Open
google-labs-stitch[bot] wants to merge 9 commits into
mainfrom
stitch/add-biome-and-strict-ts-jm0-ab6636be-3965-49ec-9e1e-d058468ecfca
Open

google-labs-stitch[bot] wants to merge 9 commits into
mainfrom
stitch/add-biome-and-strict-ts-jm0-ab6636be-3965-49ec-9e1e-d058468ecfca

Conversation

@google-labs-stitch

@google-labs-stitch google-labs-stitch Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add @biomejs/biome (^2.6.8) to devDependencies in package.json and lock its version in package-lock.json alongside @types/node (24.19.2) and typescript (7.0.2).
  • Add biome.json with Git ignore support, files.ignoreUnknown set to true, two-space indentation, double quotes, recommended lint rules and assist.enabled set to false.
  • Set files.includes in biome.json to ["**", "!CHANGELOG.md", "!package-lock.json"] so Biome checks TypeScript, JavaScript, JSON, YAML and Markdown files and skips CHANGELOG.md and package-lock.json.
  • Replace the unsafe class/interface declaration merge and non-null assertions in TuneletAudioViews (src/index.ts), replace string-literal template placeholders in scripts/verify-pack.mjs, and format README.md, scripts/normalize-jsdoc.mjs, scripts/postbuild-wasm.mjs and scripts/verify-pack.mjs so Biome reports zero lint warnings and zero format diffs.
  • Preserve "lib": ["ES2020"] and "exactOptionalPropertyTypes": true in tsconfig.json and enable verbatimModuleSyntax, isolatedDeclarations, noUncheckedIndexedAccess, noUnusedLocals and noUnusedParameters.
  • Add lint (biome lint --error-on-warnings .), format:check and typecheck scripts to package.json and run them in the build-wasm job of .github/workflows/ci.yml alongside ./.github/actions/setup-wasm, check-os and msrv.
  • Document the local npm check, build and typecheck commands in AGENTS.md.

Verification

  • Ran npm ci, npm run lint (--error-on-warnings) and npm run format:check on a clean checkout without pkg/ or dist/ (zero errors and zero warnings across all checked files).
  • Confirmed npx biome format --write . makes zero diffs and skips CHANGELOG.md and package-lock.json.
  • Ran npm run build:wasm, npm run typecheck, npm run build:ts and npm run verify:pack -- --ignore-scripts under typescript (7.0.2).
  • Ran npm run check:wasm and all Cargo checks (cargo rustc --locked --lib --release -- -D warnings, RUSTFLAGS="-D warnings" cargo build --locked --release, cargo fmt --check, cargo clippy --locked --lib -- -D warnings, RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps and cargo package --locked).

Automated PR initiated by user @byteland-app via Stitch Loop.

- Add @biomejs/biome to devDependencies and lock its version.
- Add biome.json for TypeScript, JSON, YAML and Markdown checks.
- Exclude CHANGELOG.md and package-lock.json from Biome checks.
- Enable strict compiler flags in tsconfig.json.
- Add lint, format:check and typecheck scripts to package.json.
- Document the npm verification commands in AGENTS.md.
- Merge origin/main into the feature branch.
- Keep lint, format:check, typecheck and verify:pack in package.json.
- Replace the template placeholder string in scripts/verify-pack.mjs.
- Merge origin/main into the feature branch.
- Keep check:wasm, lint, format:check and typecheck in package.json.
- Keep check:wasm, build:wasm and typecheck in AGENTS.md.
- Merge origin/main into the feature branch.
- Keep check:wasm, build:wasm, typecheck and verify:pack in AGENTS.md.
@byteland-app

Copy link
Copy Markdown
Contributor

Review: Preferred over #35 (Biome keeps TS 7.0 and adds a single binary dependency). Please make two updates before merge:

  1. Rebase onto current main (package-lock.json is behind on 0.3.1) and squash the merge commits.
  2. Wire npm run lint, npm run format:check, and npm run typecheck into .github/workflows/ci.yml so CI enforces these checks.

- Merge origin/main into the feature branch.
- Keep cargo package, lint, format:check and typecheck in AGENTS.md.
- Run npm run lint after npm ci in .github/workflows/ci.yml.
- Run npm run format:check after npm run lint in ci.yml.
- Run npm run typecheck after npm run verify:pack in ci.yml.
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Addressed in 6d1096e:

  1. Synced with current main (0.3.3): Merged main (451ea1e) so package-lock.json is up to date on 0.3.3 with only @biomejs/biome (2.6.8) added. Note that force-pushing is disabled for the bot environment so existing pushed merge commits cannot be rewritten on this branch, though GitHub's Squash and merge will squash the branch into a single clean commit on main.
  2. Wired checks into .github/workflows/ci.yml: Added npm run lint and npm run format:check right after npm ci, and added npm run typecheck right after npm run verify:pack (reusing pkg/tunelet.d.ts built during verify:pack so wasm-pack only runs once in CI).

@byteland-app

Copy link
Copy Markdown
Contributor

Round 2 review: Looks great — Biome lint/format/typecheck wiring in ci.yml and strict tsconfig flags are clean. Please rebase onto updated main after #90, #120, and #123 (keeping #123's tsconfig.json lib list and exactOptionalPropertyTypes).

- Merge origin/main into the feature branch.
- Keep the ES2020 lib list and strict flags in tsconfig.json.
- Keep the setup-wasm step, MSRV job and npm checks in ci.yml.
- Format postbuild-wasm.mjs and verify-pack.mjs for Biome.
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Addressed in e81e7d9:

  • Synced with updated main (720690b, 0.3.4) incorporating #90, #120, and #123 (via merge commit since force-pushing is disabled for the bot environment; Squash and merge will squash cleanly onto main):
    • tsconfig.json: Kept #123's "lib": ["ES2020"] and "exactOptionalPropertyTypes": true alongside verbatimModuleSyntax, isolatedDeclarations, noUncheckedIndexedAccess, noUnusedLocals, and noUnusedParameters.
    • .github/workflows/ci.yml: Kept #90's ./.github/actions/setup-wasm step and #120's msrv job alongside npm run lint, npm run format:check, and npm run typecheck.
    • package.json / package-lock.json / AGENTS.md: Updated to 0.3.4 while preserving #90's release-mode check:wasm, #123's Wasm subpath exports and postbuild-wasm.mjs hook, and Biome ^2.6.8.
    • scripts/postbuild-wasm.mjs & scripts/verify-pack.mjs: Replaced string-literal ${...} placeholders inside generated .mjs test sources with string concatenation and aligned formatting so biome lint --error-on-warnings . and npm run format:check pass with zero warnings and zero diffs.

@byteland-app

Copy link
Copy Markdown
Contributor

Round 3 review: Approved — Biome lint/format/typecheck wiring and strict tsconfig flags look clean. Please rebase onto updated main after #93, #121, #107, and #117 (ensuring the newly merged scripts/normalize-jsdoc.mjs and src/index.ts pass Biome).

- Merge origin/main into the feature branch.
- Keep @biomejs/biome with @types/node 24.19.2 in package.json.
- Run the Biome and TypeScript checks in build-wasm in ci.yml.
- Replace the interface merge and assertions in src/index.ts.
- Format normalize-jsdoc.mjs and verify-pack.mjs for Biome.
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Synced with updated main (0850e25) in 1a468da:

  • package.json & package-lock.json: Kept @biomejs/biome (^2.6.8) alongside #93's @types/node (24.19.2) and #107's normalize-jsdoc.mjs hook.
  • .github/workflows/ci.yml & AGENTS.md: Preserved #121's build-wasm / check-os / verify split and Windows shell notes while running npm ci, npm run lint, npm run format:check and npm run typecheck in build-wasm.
  • src/index.ts: Replaced the unsafe class/interface declaration merge and non-null assertions in TuneletAudioViews (#117) with declare [Symbol.dispose]: () => void and a cached view object so biome lint --error-on-warnings . and npm run typecheck pass with zero warnings.
  • scripts/normalize-jsdoc.mjs & scripts/verify-pack.mjs: Formatted with Biome (#107 / #117) so npm run format:check and npm run verify:pack pass with zero diffs.

@byteland-app

Copy link
Copy Markdown
Contributor

Review: Biome integration and strict TypeScript flags look clean. Please sync onto updated main (#139, #131, #104, #61), preserving #131's -D warnings commands in package.json, AGENTS.md, and .github/workflows/ci.yml, plus #104/#61's updates in scripts/normalize-jsdoc.mjs and scripts/verify-pack.mjs.

Two minor suggestions while syncing:

  • Consider "lint": "biome lint --error-on-warnings ." in package.json so lint warnings fail CI as stated in AGENTS.md.
  • Shorten the 27-word header comment in .github/workflows/ci.yml to 25 words or fewer for STE compliance.

- Merge main with warning checks, telemetry and parameter controls.
- Add --error-on-warnings to the lint script in package.json.
- Shorten the comment in ci.yml to meet the STE word limit.
- Format README.md and scripts/verify-pack.mjs with Biome.
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Synced with updated main (8880205) in 1692220:

  • Preserved #139, #131, #104, and #61: Kept #131's -D warnings commands in package.json (check:wasm), AGENTS.md, and .github/workflows/ci.yml, along with #104 and #61's updates in scripts/normalize-jsdoc.mjs and scripts/verify-pack.mjs.
  • package.json: Updated "lint" to "biome lint --error-on-warnings ." so lint warnings fail CI.
  • .github/workflows/ci.yml: Shortened the first sentence of the header comment to 21 words for STE compliance.
  • README.md & scripts/verify-pack.mjs: Formatted the #61 Markdown table and script lines with Biome so npm run lint, npm run format:check, npm run typecheck, and npm run verify:pack pass with zero warnings and zero diffs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant