Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
Araxeus opened this issue Aug 10, 2024 · 5 comments
Open
1 of 3 tasks

Comments

@Araxeus
Copy link

Araxeus commented Aug 10, 2024

VS Code version

1.92.1

Extension version

2.3.0

Biome version

1.8.3

Operating system

  • Windows
  • macOS
  • Linux

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

@Araxeus Araxeus added the Triage label Aug 10, 2024
@ematipico
Copy link
Member

Coming from biomejs/biome#2772 (comment), now I understand what you mean.

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

@Araxeus
Copy link
Author

Araxeus commented Aug 13, 2024

will probably get fixed by #200

@nhedger
Copy link
Member

nhedger commented Dec 1, 2024

Is this still an issue in the prerelease extension @Araxeus ?

@nhedger nhedger added the Stable label Dec 1, 2024
@nemchik
Copy link

nemchik commented Dec 2, 2024

I just tested v2024.11.301111 (pre-release) and I don't see this issue (I did the last time I tried a pre-release a few months ago).

I'm experiencing a new issue though (might be worth opening an actual new issue on GH):
image
I am guessing I would need to set a binPath somewhere in vscode settings for the biome extension, but this doesn't seem to be required on the stable release version.

p.s. I tested opening an existing biome project that already had a biome.json as well as a project that does not have a biome.json. The error above is from opening a project without a biome.json and being prompted to download and install biome, which seems to fail.

@nhedger
Copy link
Member

nhedger commented Dec 2, 2024

I just tested v2024.11.301111 (pre-release) and I don't see this issue (I did the last time I tried a pre-release a few months ago).

I'm experiencing a new issue though (might be worth opening an actual new issue on GH): image I am guessing I would need to set a binPath somewhere in vscode settings for the biome extension, but this doesn't seem to be required on the stable release version.

p.s. I tested opening an existing biome project that already had a biome.json as well as a project that does not have a biome.json. The error above is from opening a project without a biome.json and being prompted to download and install biome, which seems to fail.

Good catch, I see what's going on here, I'll fix it.

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

No branches or pull requests

4 participants