-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
🐛 Biome applies unsafe fixes inside liveshares #119
Comments
Can you share the output of Check the logs first, make sure there's no sensitive information you don't want to share. Also, does that mean Biome works as expected when you don't do a live share of the project? |
I will get back to you during the day with the logs Yes biome works as expected when I don't have a liveshare active, it also seems to work when a liveshare is started and no one has joined yet. |
@ematipico here is the logs |
I was able to reproduce the issue. When both you and the remote participant are connected to the live share session, the host saving the file does not apply the unsafe fixes, as expected. However, as soon as the guest participant saves the file, now both participants will trigger unsafe fixes when saving. Terminating the liveshare session stops the issue from happening. Comparing the trace output between a standard session and a liveshare session shows that liveshare session use From the LSP docs: /**
* The reason why code actions were requested.
*
* @since 3.17.0
*/
export namespace [CodeActionTriggerKind](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionTriggerKind) {
/**
* Code actions were explicitly requested by the user or by an extension.
*/
export const Invoked: 1 = 1;
/**
* Code actions were requested automatically.
*
* This typically happens when current selection in a file changes, but can
* also be triggered when file content changes.
*/
export const Automatic: 2 = 2;
}
export type [CodeActionTriggerKind](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionTriggerKind) = 1 | 2; liveshare off
liveshare on
|
It seems that biome applies unsafe fixes when working in virtual workspaces, at least when working inside liveshares.
Here is a reproducible example. https://github.com/gustaferiksson/biome-unsafe
If I start a liveshare in that repo and share it with myself (in a new vscode window), and save
index.ts
, biome will apply the unsafe fixes.My vscode settings has the following related to biome
Here is the Output from the Biome Trace that applies the unsafe fixes
The text was updated successfully, but these errors were encountered: