Skip to content

fix: resolve biome v2 config and lint errors - #471

Merged
shivammittal274 merged 1 commit into
mainfrom
fix/biome-v2-config
Mar 17, 2026
Merged

fix: resolve biome v2 config and lint errors#471
shivammittal274 merged 1 commit into
mainfrom
fix/biome-v2-config

Conversation

@shivammittal274

Copy link
Copy Markdown
Contributor

Summary

  • Migrate files.ignorefiles.includes with negation pattern for Biome v2 compatibility (root cause of all lint failures)
  • Fix forEach callback implicitly returning a value in build-consolidated-set.ts
  • Fix unused variable v in inspect-ui.ts
  • Fix import ordering in chat-service.ts
  • Auto-format inspect-ui.ts to match Biome v2 formatter rules

Context

PR #453 added "ignore" to biome.json, but Biome v2 renamed this key to "includes" (with negation patterns). This made biome check exit immediately with a config deserialization error, so no files were being linted at all.

Test plan

  • bun run lint passes with 0 errors (36 pre-existing warnings remain)

🤖 Generated with Claude Code

Migrate `files.ignore` to `files.includes` for Biome v2 compatibility,
fix forEach callback return value, unused variable, import ordering,
and formatting violations.
@github-actions github-actions Bot added the fix label Mar 17, 2026
@greptile-apps

greptile-apps Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a Biome v2 configuration incompatibility introduced in PR #453, where files.ignore was used — a key that no longer exists in Biome v2 (renamed to files.includes with negation patterns). Because this caused a config deserialization error, biome check was exiting immediately and no files were being linted at all. Once the config was fixed, three previously-hidden lint errors surfaced and are also resolved here.

Key changes:

  • biome.json: Migrates files.ignorefiles.includes with a negation glob to restore linting across the entire package
  • build-consolidated-set.ts: Adds explicit block body to a forEach callback to prevent Biome from flagging the implicit return value of console.log
  • chat-service.ts: Fixes import ordering to satisfy Biome's organizeImports rule
  • inspect-ui.ts: Renames unused destructured variable v_v in normalizeKey, plus auto-formatting to comply with Biome v2's line-length rules

The negation glob in biome.json uses !**/apps/eval/src/dashboard/index.html (with a **/ prefix), which is slightly broader than the original exact-path ignore entry, though it is functionally equivalent given this file only exists in one location.

Confidence Score: 5/5

  • Safe to merge — changes are limited to linter config, import ordering, and auto-formatting with no logic modifications.
  • All four changed files contain either config corrections, formatting-only changes, or trivial lint suppressions (unused variable prefix). No application logic, API surface, or data handling is altered. The Biome v2 includes pattern is correct and the three lint fixes are straightforward.
  • No files require special attention.

Important Files Changed

Filename Overview
packages/browseros-agent/biome.json Migrates files.ignore to files.includes with negation pattern for Biome v2 compatibility; uses !**/ which is slightly broader than the original exact-path exclusion, but harmless for this specific file.
packages/browseros-agent/apps/eval/scripts/build-consolidated-set.ts Adds explicit block body to forEach callback to prevent Biome flagging the implicit console.log return value; straightforward and correct.
packages/browseros-agent/apps/server/src/api/services/chat-service.ts Import ordering fix only — swaps filterValidMessages and formatUserMessage imports to satisfy Biome's organizeImports rule; no logic changes.
packages/browseros-agent/scripts/dev/inspect-ui.ts Renames unused destructured variable v to _v in normalizeKey, plus extensive auto-formatting (line wrapping, object expansion) to comply with Biome v2 formatter rules; no logic changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["bun run lint\n(biome check)"] -->|"Biome v2 reads biome.json"| B{Config valid?}
    B -- "Before PR: files.ignore\n(unknown key in v2)" --> C["❌ Deserialization error\nExits immediately\nNo files linted"]
    B -- "After PR: files.includes\nwith negation pattern" --> D["✅ Config parsed OK"]
    D --> E["Lint all files\nexcept apps/eval/src/dashboard/index.html"]
    E --> F["3 lint errors surfaced\n& fixed in this PR"]
    F --> G["✅ 0 errors\n(36 pre-existing warnings)"]
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: packages/browseros-agent/biome.json
Line: 10

Comment:
**Negation glob is broader than the original `ignore` pattern**

The original `"ignore": ["apps/eval/src/dashboard/index.html"]` matched the file only at that exact path relative to `biome.json`. The new negation `"!**/apps/eval/src/dashboard/index.html"` will exclude any file matching that path at *any* directory depth (e.g. `foo/apps/eval/src/dashboard/index.html` would also be excluded).

This is harmless in practice — there's only one such file — but for strict equivalence you could drop the leading `**/`:

```suggestion
    "includes": ["**", "!apps/eval/src/dashboard/index.html"]
```

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: 5c6ea3b

@shivammittal274
shivammittal274 merged commit 515ad44 into main Mar 17, 2026
5 of 7 checks passed
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.

1 participant