Configuration
Configuration is optional. Without a bonsai-lint.toml anywhere, every language gets the
default threshold and the scan behaves exactly as --over 15 would.
Top-level keys
Section titled “Top-level keys”| Key | Type | Default | Meaning |
|---|---|---|---|
threshold | integer | 15 | Fail above this score. A per-language section overrides it. |
exclude | string[] | [] | Globs, relative to the config's own directory. |
toplevel | boolean | true | Score code outside any function as <toplevel>. |
baseline | path | .bonsai-lint-baseline.json | Where this directory's baseline lives, relative to it. |
domains | string[] | none | Root config only: globs naming directories that own their own config and baseline. |
name | string | the directory | A domain's name in output and for --domain. |
Per-language sections
Section titled “Per-language sections”A table named after a language id overrides the threshold for that language alone. The id is
the same string --lang and --over LANG=N take.
threshold = 15exclude = ["vendor/**", "**/*.generated.ts"]
[typescript]threshold = 20| Key | Type | Default | Meaning |
|---|---|---|---|
threshold | integer | inherited | Overrides the domain's threshold for this language only. |
Two things that are errors, not defaults
Section titled “Two things that are errors, not defaults”A misspelt key fails to parse rather than falling back silently. A stray thresold = 20
stops the run instead of leaving you believing a threshold is in force when it isn’t.
A negated glob (!pattern) is rejected outright rather than being matched literally.