biomejs/biome-vscode

๐Ÿ› `biome.json` ignored when multiple folders open in a VS code session

Closed this issue ยท 1 comments

VS Code version

1.87

Extension version

2.2.2

Biome version

1.6.1

Operating system

  • Windows
  • macOS
  • Linux

Description

So I found a nasty bug where my biome.json is ignored when I have two projects open in a single VS code session.

But, the bug only happens if the project that uses Biome is the 2nd workspace.

This works fine, biome.json is found

typescript-project
  - biome.json
python-project

This does not. My "tabs as spaces" configuration is ignored.

python-project
typescript-project
  - biome.json

I assume the bug is the VS code extension assumes one folder or always picks the first one.

Steps to reproduce

  1. Create a new VS code workspace
  2. Add a folder and select a project that does not have a biome.json at its root
  3. Add a folder that has a biome.json
  4. Configure format on save
  5. Go into a typescript file in the 2nd folder, edit and save. Spaces will be replaced with Tabs

Here's my biome.json:

{
  "$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
  "organizeImports": {
    "enabled": true
  },
  "linter": {
    "enabled": false,
    "rules": {
      "recommended": true,
      "suspicious": {
        "noExplicitAny": "off"
      }
    }
  },
  "formatter": {
    "enabled": true,
    "formatWithErrors": false,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 80,
    "lineEnding": "lf",
    "ignore": []
  },
  "javascript": {
    "formatter": {
      "indentWidth": 2,
      "indentStyle": "space"
    }
  },
  "json": {
    "formatter": {
      "indentWidth": 2,
      "indentStyle": "space"
    }
  }
}

Expected behavior

The Biome extension should be aware of multiple workspaces and use the settings specific to each project.

Does this issue occur when using the CLI directly?

No

Logs

No response

This is a duplicate of biomejs/biome#1630