biomejs / pre-commit

Biome's pre-commit hooks.
Apache License 2.0
25 stars 3 forks source link

Incompatible --write Flag with `biome check` #10

Closed alipqb closed 1 week ago

alipqb commented 1 week ago

The --write flag is currently used in the hook for biome check, but this flag is not supported for biome check and should be removed to prevent errors. click here

-   id: biome-check
    name: biome check
    entry: biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
    language: node
    types: [text]
    files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css|svelte|vue|astro|graphql|gql)$"
ematipico commented 1 week ago

Why should it be removed? --write is supported by biome check. Maybe you're using an outdated version of Biome

alipqb commented 1 week ago

I was getting this error:

error: --write is not expected in this context

But I don't have this problem with biome format

ematipico commented 1 week ago

Yeah you're using an old version of Biome.

Unfortunately we don't support older versions at the moment, so you'd have to upgrade Biome to a version that implements --write for the check command.

Or you'd need to use an older version of pre-commit

alipqb commented 1 week ago

Thanks