Skip to content

Biome formatter removes unused imports during partial agent edits #20508

Description

@BYK

Description

The biome formatter runs biome check --write after every file edit. The check --write command applies lint auto-fixes (including noUnusedImports removal) in addition to formatting. When the agent adds an import in one edit and the usage in a subsequent edit, biome removes the "unused" import between the two edits.

Steps to reproduce

  1. Open a project with a biome.json that has noUnusedImports enabled (default)
  2. Have the agent add an import statement in one edit
  3. Observe the formatter running biome check --write between edits
  4. The import is removed before the agent can add the usage in the next edit

OpenCode version

Latest dev

OS

Linux

Activity

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

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions