biome icon indicating copy to clipboard operation
biome copied to clipboard

Misconfigured config leads to using all the default settings

Open nstepien opened this issue 1 year ago • 2 comments

In Biome 1.5.1, useConsistentArrayType was moved back to the nursery group, which made the Biome cli complain about it, and is how I discovered this issue. While the cli doesn't do anything beside throwing an error, it seems like the vscode extension instead reverts to use all the defaults for the formatter. So formatting on save will change all space indentation to tabs for example.

Ideally a misconfiguration in the linter should not affect the formatter's configuration. Or the linter's config itself for that matter.

nstepien avatar Jan 18 '24 00:01 nstepien

I'll move this in the main repository later.

This is a bug, and we should error if the configuration has errors. The LSP should not change any code.

That's how the CLI behaves.

ematipico avatar Jan 18 '24 07:01 ematipico

Checked again today, if I make a typo in the config, and reload VSCode, Biome will not be available as a formatter: image image

It's a step in the right direction, now Biome won't format files incorrectly, but I still wish it'd be able to format if the config error is not related to the formatting settings.

nstepien avatar Apr 24 '24 16:04 nstepien

Closing. The CLI now errors. In v1.8 the LSP will not do anything.

ematipico avatar May 30 '24 17:05 ematipico