berry icon indicating copy to clipboard operation
berry copied to clipboard

[Feature] Add support for @biomejs/biome in @yarnpkg/sdks

Open Yabes opened this issue 5 months ago • 5 comments

  • [x] I'd be willing to implement this feature (contributing guide)
  • [x] This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

Add support for @biomejs/biome in @yarnpkg/sdks, so IDEs will be able to get the correct path to the local biome cli.

Describe the solution you'd like

Running yarn dlx @yarnpkg/sdks will generate the biome sdk in .yarn/sdk.

Describe the drawbacks of your solution

We will have to follow up with biome if they make any changes to how the cli is exposed.

Describe alternatives you've considered

Manually creating the sdk in .yarn/sdk in project using biome, but it was not pleasant and not useful for anyone but me 😄

Yabes avatar Jul 01 '25 14:07 Yabes

I think Biome's VSCode plugin supports PnP out-of-the-box? Or are you integrating with a different editor?

clemyan avatar Jul 02 '25 16:07 clemyan

No, Biome extension cannot find the locally installed binary by itself. On my pr I added support for both the base and vscode.

Yabes avatar Jul 02 '25 19:07 Yabes

Hmm... I just tested on VSCode 1.102.0-indsiders and Biome VSCode Extension 3.1.0 and it works OOTB:

  1. yarn init && yarn add --dev @biomejs/biome
  2. Restart Extension Host
  3. Create test.js with content const x = 1
  4. The Biome extension reports the unused variable

Are you having issues with it? What version of VSCode and the Biome extension are you using? Do you have a reproduction?


On the other hand, with your PR, the Biome extension tries and fails to spawn a shebanged script on Windows.

clemyan avatar Jul 13 '25 11:07 clemyan

Thank you for double checking. I reinstalled my project and you're right, it works OOTB. I think it wasn't the case on my project because Biome wasn't installed in the project root, only in a workspace packages. Adding biome in the root package fixed the integration for me.

Do you think it could be worthwhile to salvage the base integration for other editors?

On the other hand, with your PR, the Biome extension tries and fails to spawn a shebanged script on Windows.

I'm guessing you are not running on WSL, do you know if and how other integrations work on Windows?

Yabes avatar Jul 15 '25 08:07 Yabes

Do you think it could be worthwhile to salvage the base integration for other editors?

Should be fine. I don't use biome so I don't have a strong opinion either way

do you know if and how other integrations work on Windows?

Other integrations just require the package (e.g. vscode-eslint essentially just require("eslint") from the eslint.nodePath). I think none of them spawns a native binary or shell script?

clemyan avatar Oct 22 '25 15:10 clemyan