plugins
plugins copied to clipboard
trunk fmt does not surface `biome format` errors
👋 hullo!
trunk doesn't appear to surface biome format
errors, not sure why, haven't dug into it. still on WSL.
here's a malformed biome config that complains correctly when run with pnpm biome format .
:
❯ cat biome.json
{
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true,
"rules": {
"recommended": true,
"formatWithErrors": true,
"indentStyle": "spaces",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "single",
"semicolons": "asNeeded",
"trailingComma": "all"
}
}
}
Howdy! 😄
Did a quick investigation and looks like this case is getting swallowed up in the exit code 1 output. I'll put up a fix for this, but in the meantime you can override with:
lint:
definitions:
- name: biome
commands:
- name: fmt
success_codes: [0]
Unfortunately we can't do this for the lint
subcommand easily because it's a regex
linter and all biome errors and diagnostics output an exit code 1. Nevertheless, fixing this for format
should be sufficient! Thanks for flagging this!