biomejs/biome-vscode

๐Ÿ› VSCode extension can't find biome in subfolder

Closed this issue ยท 5 comments

Environment information

Not related.

What happened?

Biome is installed via npm in a subfolder inside my project. The extension can't find it, instead it downloads a bundled version of Biome.

Expected result

The extension should scan for all package.json files in my project and use the already installed version of Biome.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

I am also having this issue with the biome VSCode extension. Another similar issue I have, and I wish was implemented, is the ability to find the closest biome.json file to the file instead of just in the root directory. I have a larger project with multiple subfolders that have biome.json files, but the extension won't start or recognize those unless they are in the root directory.

The extension should scan for all package.json files in my project and use the already installed version of Biome.

Are there another extensions that work this way?

From what I understood from other tools, you usually scan upwards, not downwards, when you're looking for a configuration file.

@njfdev Biome already does that: https://biomejs.dev/guides/how-biome-works/#configuration-file-resolution

So the issue is not Biome itself


So the main question is, why do you want to pick up a configuration file that is inside a child folder? That's a massive endeavour.

Then it might be my problem with how I manage my folders. I have a .husky folder which has a scripts folder in it. Inside it there are my nodejs scripts that do the git prehooks for me. I decided to install biomejs in this .husky/scripts folder and use it from here. This way I can just use this .husky at any node project with almost no setup at all.

I can accept that this issue won't be solved if this is an anti-pattern. I am going to just install biomejs in the root folder instead of putting it next to my prehooks.

Yea I think that's the best way for now. At the moment we don't support nested configurations, and I think other tools work this way.

Okay. Seems like I tried to complicate it too much.