biomejs/biome-vscode

Format on save uses incorrect `biome.json` configuration in workspace

Closed this issue · 1 comments

With the following:

Untitled Workspace
    folder1/
        src/
            index.ts
        biome.json
    folder2/
        src/
            index.ts
        biome.json

folder1/biome.json

{
	"$schema": "https://biomejs.dev/schemas/1.5.1/schema.json",
	"formatter": {
		"indentSize": 2
	},
	"javascript": {
		"formatter": {
			"semicolons": "asNeeded"
		}
	}
}

folder2/biome.json

{
	"$schema": "https://biomejs.dev/schemas/1.5.1/schema.json",
	"formatter": {
		"indentSize": 2
	},
	"javascript": {
		"formatter": {
			"semicolons": "always"
		}
	}
}

If I edit folder2/src/index.ts and save, it uses folder1's biome.json configuration, removing the semicolon.


I'm not sure if this is the same issue as #32, although I thought this applied to a single folder within a workspace? I typically have multiple different projects open in a single workspace like this, and should abide by the project's settings. Prettier works like this fwiw, and I never had an issue with it

We are already tracking information in #18

The extension doesn't work in workspaces and we are looking for help to understand how the extension should behave.

I will close it as a duplicate.