biomejs / biome-intellij

Biome plugin for IntelliJ
https://plugins.jetbrains.com/plugin/22761-biome
Apache License 2.0
45 stars 12 forks source link

feat: set flags based on biome-version to add backwards compatibility #96

Closed bc-m closed 1 day ago

bc-m commented 1 week ago

Since Biome v1.8.0 the cli arguments have changed from --apply and --apply-unsafe to --write and --unsafe.

In https://github.com/biomejs/biome-intellij/pull/85 we updated the cli flags, but dropped backwards compatibility.

This PR checks the running biome version to add backwards compatibility to biome prior to 1.8.0. This PR also sets --skip-errors to skip files containing syntax errors instead of throw an error.

Fixes #89 #90 #95

ematipico commented 1 week ago

I must admit that this is an awkward setting, probably because at that time the LSP didn't support the majority of the endpoints. This check shouldn't be needed, however I know nothing about intellij extension developments, so I hope this will be removed in the future