CLI:
Version: 1.5.2
Color support: true
Platform:
CPU Architecture: x86_64
OS: windows
Environment:
BIOME_LOG_DIR: unset
NO_COLOR: unset
TERM: unset
JS_RUNTIME_VERSION: "v20.10.0"
JS_RUNTIME_NAME: "node"
NODE_PACKAGE_MANAGER: "npm/10.2.4"
Biome Configuration:
Status: Loaded successfully
Formatter disabled: false
Linter disabled: false
Organize imports disabled: false
VCS disabled: true
Workspace:
Open Documents: 0
I run biome as a precommit hook:
pre-commit:
commands:
biome-check-and-fix:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx biome check --apply --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
typescript-check:
run: npx tsc --noEmit
I noticed that a commit was successful wich contained wrong formatting. Manually executing I saw this:
PS C:\Entwicklung\repos\diana-cards> npx biome check --apply --no-errors-on-unmatched --files-ignore-unknown=true .\commitlint.config.js
.\commitlint.config.js internalError/io INTERNAL βββββββββββββββββββββββββββββββββββββββββββββββββ
Γ stream did not contain valid UTF-8
! This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.
Fixed 1 file(s) in 166Β΅s
Skipped 1 file(s)
PS C:\Entwicklung\repos\diana-cards> $LASTEXITCODE
0
PS C:\Entwicklung\repos\diana-cards> $?
True
So an error is thrown and thus the file is skipped, but the process ends with exit code 0. This leads to a commit that's broken despite the pre-commit check.
Exit code should not be 0 here!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too