[Feature] Add support for @biomejs/biome in @yarnpkg/sdks
- [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 😄
I think Biome's VSCode plugin supports PnP out-of-the-box? Or are you integrating with a different editor?
No, Biome extension cannot find the locally installed binary by itself. On my pr I added support for both the base and vscode.
Hmm... I just tested on VSCode 1.102.0-indsiders and Biome VSCode Extension 3.1.0 and it works OOTB:
yarn init && yarn add --dev @biomejs/biome- Restart Extension Host
- Create
test.jswith contentconst x = 1 - 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.
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?
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?