biomejs / biome-vscode

Biome extension for Visual Studio Code and VSCodium
https://marketplace.visualstudio.com/items?itemName=biomejs.biome
Apache License 2.0
188 stars 22 forks source link

🐛 Configuration file resolution not working if folder is not open #298

Open Araxeus opened 1 month ago

Araxeus commented 1 month ago

VS Code version

1.92.1

Extension version

2.3.0

Biome version

1.8.3

Operating system

Description

https://biomejs.dev/guides/configure-biome/#configuration-file-resolution states:

Biome uses auto discovery to find the nearest configuration file. It looks in the working directory and in the parent directories until it finds the config...

but the vscode extension doesn't do that if we just open a single file...

Steps to reproduce

  1. create ./biome.json with a rule you can notice
  2. create ./example.js
  3. close all vscode windows
  4. run code example.js

Expected behavior

The biome configuration should be resolved as usual - i,e it should equal to the output of biome check ./example.js

Does this issue occur when using the CLI directly?

No

Logs

No response

ematipico commented 1 month ago

Coming from https://github.com/biomejs/biome/discussions/2772#discussioncomment-9359599, now I understand what you mean.

It's a particular use case I failed to see. I'll triage the use case

Araxeus commented 1 month ago

will probably get fixed by #200