Skip to content

chore: upgrade biome to 2.4.16 (config migration + 2.x reformat)#48

Merged
oorabona merged 1 commit into
mainfrom
chore/biome-2
Jun 7, 2026
Merged

chore: upgrade biome to 2.4.16 (config migration + 2.x reformat)#48
oorabona merged 1 commit into
mainfrom
chore/biome-2

Conversation

@oorabona

@oorabona oorabona commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Upgrades the pinned Biome from 1.9.x to 2.4.16.

  • Catalog bump @biomejs/biome^2.4.16; biome.json migrated to the 2.x schema.
  • Enabled vcs.useIgnoreFile and added !**/target so Biome no longer scans the Rust target/ build output (the scan set drops from ~3200 files to ~283 — the project sources).
  • Reformatted the codebase to the 2.x formatter style and fixed the residual lint findings surfaced by 2.x rules (void-return facade methods in the meta DAL, an implicit-any let, non-null assertions and explicit-any casts in tests).

Note: Biome 2.x check --write silently dropped two private readonly field declarations (channel-logger.ts, theme-manager.ts) during the reformat; both were restored and verified by tsc.

biome check is clean (0 errors), hub + web typecheck pass, full test suite green.

…rmat to 2.x style

- Bump @biomejs/biome from 1.9.4 to 2.4.16 (pnpm-workspace.yaml catalog +
  hub package.json)
- Migrate biome.json: vcs.useIgnoreFile=true so target/ and node_modules/
  are excluded via .gitignore; remove files.ignore (removed in 2.x), use
  files.includes with negation patterns
- Reformat 114 files to biome 2.x style (import sort order, template
  literals, trailing commas, quote normalization)
- Restore two reformat-broken field declarations removed by biome --write:
  ChannelLogger.config (LogConfig) and ThemeManager.configDir (string)
- Fix residual lint errors (25 → 0):
  - noVoidTypeReturn (×19, meta.ts PROD): remove bare `return` from all
    void-typed facade methods that delegate to sub-DALs
  - noImplicitAnyLet (×2, channels.ts + session-manager.ts PROD): add
    explicit Channel[] and LaunchProfile|undefined type annotations
  - noNonNullAssertion (×14, *.spec.ts + spawn-test.ts): restructure with
    local variable + expect().toBeDefined() + if-guard for test files;
    justified biome-ignore for Buffer bounds-checked loop in spawn-test.ts
  - noExplicitAny (×2, useBellSound.spec.ts + spawn-test.ts): replace
    `as any` with `keyof typeof globalThis` and UiSpawnOkMessage cast
  - noTemplateCurlyInString (×24, var-expansion.spec.ts): file-level
    biome-ignore-all — intentional literal ${} test data
  - suppressions/unused (×3, agent-deployer.spec.ts + validation.ts):
    remove stale biome-ignore comments whose rules no longer fire in 2.x
Copilot AI review requested due to automatic review settings June 7, 2026 01:07
@oorabona oorabona merged commit c7572c6 into main Jun 7, 2026
9 checks passed
@oorabona oorabona deleted the chore/biome-2 branch June 7, 2026 01:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the repo’s Biome tooling from 1.9.x to 2.4.16, migrates biome.json to the 2.x schema (including VCS ignore support), and applies the Biome 2.x formatting/lint autofixes across the TypeScript codebase.

Changes:

  • Bump @biomejs/biome to ^2.4.16 (catalog + lockfile) and migrate biome.json to the Biome 2.x schema with vcs.useIgnoreFile and an explicit !**/target exclusion.
  • Reformat TypeScript sources/tests to the Biome 2.x formatter output and address newly surfaced lint findings (e.g., void-return facades, non-null assertions in tests, implicit-any cleanup).
  • Minor refactors/cleanups in hub/shared/web code to satisfy updated lint/style constraints (imports ordering, type-only imports, small correctness nits in tests).

Reviewed changes

Copilot reviewed 117 out of 119 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/sea-hub-e2e.spec.ts Reformat E2E SEA hub test to Biome 2.x style.
scripts/package-sea-hub.ts Reformat SEA packaging script; no functional change intended.
scripts/build-sea-hub.spec.ts Reformat SEA hub build tests to Biome 2.x style.
scripts/build-sea-binary.ts Reformat SEA binary builder; minor readability changes.
scripts/build-sea-binary.spec.ts Reformat SEA binary builder tests.
pnpm-workspace.yaml Catalog bump for @biomejs/biome to 2.4.16.
pnpm-lock.yaml Lockfile update for Biome 2.4.16 and platform CLIs.
packages/shared/src/var-expansion.spec.ts Add Biome ignore for intentional ${} test literals.
packages/shared/src/validation.ts Minor edit in validation module (comment-only change).
packages/shared/src/validation.spec.ts Import reordering to match formatter output.
packages/shared/src/sea-addon-loader.ts Env var access refactor (process.env.X style).
packages/shared/src/index.ts Barrel export reordering to match formatter output.
packages/shared/src/framing.spec.ts Import order reformat.
packages/shared/package.json JSON formatting changes.
packages/hub/src/ws/ws-handler.ts Import/type ordering reformat.
packages/hub/src/ws/ws-handler.spec.ts Import grouping reformat.
packages/hub/src/ws/handlers/spawn.ts Reformat + string literal normalization.
packages/hub/src/ws/handlers/index.ts Export ordering and type export position.
packages/hub/src/theme-manager.ts Import ordering reformat.
packages/hub/src/theme-manager.spec.ts Import ordering and cleanup.
packages/hub/src/storage/meta.ts Remove redundant return from void façade methods.
packages/hub/src/storage/meta.spec.ts Import ordering reformat.
packages/hub/src/storage/meta-launch-profiles.spec.ts Rename unused locals and reformat.
packages/hub/src/storage/index.ts Export ordering / type export ordering.
packages/hub/src/storage/hosts-dal.spec.ts Import ordering reformat.
packages/hub/src/storage/db.ts Import ordering reformat.
packages/hub/src/storage/db.spec.ts Import ordering reformat.
packages/hub/src/spawn-test.ts Add targeted Biome ignores + tighten types in logging.
packages/hub/src/shell-discovery.ts Import ordering reformat.
packages/hub/src/session/write-lock.spec.ts Remove unused test imports (beforeEach/vi) and reformat.
packages/hub/src/session/termora-agent.ts Import ordering reformat.
packages/hub/src/session/termora-agent.spec.ts Rename unused locals and reformat.
packages/hub/src/session/state-broadcaster.ts Type import cleanup + optional chaining refactor.
packages/hub/src/session/ssh-exec.spec.ts Add Biome ignore for safe non-null assertion in test.
packages/hub/src/session/ssh-connection-manager.ts Import/type ordering reformat.
packages/hub/src/session/ssh-connection-manager.spec.ts Replace non-null assertions with explicit guards.
packages/hub/src/session/ssh-agent.ts Reformat + minor string/template cleanup.
packages/hub/src/session/ssh-agent.spec.ts Consolidate imports and reformat.
packages/hub/src/session/snapshot-scheduler.spec.ts Import ordering reformat.
packages/hub/src/session/session-manager.spec.ts Replace non-null assertions with guards; import consolidation.
packages/hub/src/session/session-manager-onboarding.spec.ts Import ordering reformat.
packages/hub/src/session/daemon-integration.spec.ts Import ordering reformat.
packages/hub/src/session/channel-lifecycle-manager.ts Import ordering cleanup + optional chaining refactor.
packages/hub/src/session/channel-lifecycle-manager.spec.ts Replace non-null assertions with optional chaining in tests.
packages/hub/src/session/agent-launcher.spec.ts Remove unused args and reformat.
packages/hub/src/session/agent-deployer.ts Reformat + string literal normalization.
packages/hub/src/session/agent-connection-manager.ts Reformat + small safety tweaks (optional chaining).
packages/hub/src/server.ts Reformat + small string literal normalization in auth/CORS logic.
packages/hub/src/server.spec.ts Reformat + string literal normalization.
packages/hub/src/sea-static-server.ts Minor string formatting + export ordering.
packages/hub/src/sea-agent-resolver.ts Export ordering normalization.
packages/hub/src/open-browser.spec.ts Remove unused test imports and reformat.
packages/hub/src/logging/index.ts Type export ordering reformat.
packages/hub/src/logging/hub-logger.ts Minor string construction refactor.
packages/hub/src/logging/hub-logger.spec.ts Reduce non-null assertions; reformat.
packages/hub/src/logging/channel-logger.ts Minor object property access + string construction refactor.
packages/hub/src/logging/channel-logger.spec.ts Reduce non-null assertions; reformat.
packages/hub/src/config.ts Import ordering; rename unused helper; small regex tweak.
packages/hub/src/config.spec.ts Import consolidation/reformat.
packages/hub/src/build-version.ts String literal normalization/reformat.
packages/hub/src/auth.ts Remove unused imports.
packages/hub/src/auth.spec.ts Import ordering reformat.
packages/hub/src/appearance-manager.ts Import ordering reformat.
packages/hub/src/api/wallpapers.spec.ts Import ordering reformat.
packages/hub/src/api/tokens.spec.ts Remove unused import; reformat.
packages/hub/src/api/themes.ts Import ordering reformat.
packages/hub/src/api/themes.spec.ts Import ordering reformat.
packages/hub/src/api/ssh-keys.ts Small string template refactor + request body access style change.
packages/hub/src/api/ssh-keys.spec.ts Optional chaining refactor in auth check.
packages/hub/src/api/routes.spec.ts Import ordering reformat.
packages/hub/src/api/pair.spec.ts Import ordering reformat.
packages/hub/src/api/pagination.spec.ts Import ordering reformat.
packages/hub/src/api/logs.ts Switch to dot-property access for parsed JSONL records.
packages/hub/src/api/logs.spec.ts String construction reformat; readability tweaks.
packages/hub/src/api/launch-profiles.ts Import ordering reformat.
packages/hub/src/api/launch-profiles.spec.ts Import ordering reformat.
packages/hub/src/api/host-ssh-import.ts Import ordering reformat.
packages/hub/src/api/host-profiles.ts Import ordering reformat.
packages/hub/src/api/host-groups.spec.ts Import ordering reformat.
packages/hub/src/api/host-crud.ts Reformat route registration; no functional change intended.
packages/hub/src/api/fonts.ts Import ordering reformat.
packages/hub/src/api/fonts.spec.ts Import ordering reformat.
packages/hub/src/api/config.ts Import ordering reformat.
packages/hub/src/api/config.spec.ts Import ordering reformat.
packages/hub/src/api/channels.ts Add explicit Channel[] typing and adjust imports.
packages/hub/package.json JSON formatting changes.
packages/clients/web/src/stores/theme.spec.ts Import ordering reformat.
packages/clients/web/src/stores/session.ts Import ordering reformat.
packages/clients/web/src/stores/profiles.ts Formatting (blank line) per formatter output.
packages/clients/web/src/stores/config.ts Remove unused type import.
packages/clients/web/src/stores/channels.ts Minor local rename to satisfy lint; state sync logic unchanged.
packages/clients/web/src/services/ws-client.ts Import ordering reformat.
packages/clients/web/src/env.d.ts Formatting (blank line) per formatter output.
packages/clients/web/src/composables/useWindowTitle.ts Import ordering reformat.
packages/clients/web/src/composables/useWallpaper.ts Import ordering reformat.
packages/clients/web/src/composables/useVisualProfile.ts Import ordering reformat.
packages/clients/web/src/composables/useTabTitle.ts Import ordering reformat.
packages/clients/web/src/composables/useSearchShortcuts.ts Remove unused import and reformat.
packages/clients/web/src/composables/useSearchShortcuts.spec.ts Import ordering reformat.
packages/clients/web/src/composables/useScrollBehavior.ts Remove unused import and reformat.
packages/clients/web/src/composables/useResolvedProfile.ts Import ordering reformat.
packages/clients/web/src/composables/useRename.ts Import ordering reformat.
packages/clients/web/src/composables/usePaneTree.ts Import ordering reformat.
packages/clients/web/src/composables/useMultiPaneSearch.ts Import ordering reformat.
packages/clients/web/src/composables/useLayout.ts Re-export ordering + import ordering reformat.
packages/clients/web/src/composables/useLayout.spec.ts Rename unused helper; import ordering reformat.
packages/clients/web/src/composables/useFileDrop.spec.ts Replace non-null assertions with optional chaining in tests.
packages/clients/web/src/composables/useCommandPalette.ts Rename unused store local to satisfy lint.
packages/clients/web/src/composables/useBellSound.ts Type formatting normalization.
packages/clients/web/src/composables/useBellSound.spec.ts Add Biome ignore for test spy typing edge case.
packages/clients/web/src/composables/useActivityTracker.ts Remove unused import and reformat.
packages/clients/web/src/composables/useActivityTracker.spec.ts Remove unused import and reformat.
packages/clients/desktop/tauri-config.spec.ts Reformat + string literal normalization.
biome.json Migrate to Biome 2.x schema; enable VCS ignore; update include/exclude set.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +471 to 472
const _syncIds = new Set(syncChannels.map((s) => s.channelId));
let changed = false;
Comment on lines +1 to +6
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { describe, expect, it } from "vitest";

import { existsSync } from 'node:fs';
import { join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';

const __dirname = fileURLToPath(new URL('.', import.meta.url));
const ROOT = resolve(__dirname, '..');
const __dirname = fileURLToPath(new URL(".", import.meta.url));
const _ROOT = resolve(__dirname, "..");
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.

2 participants