Which setting wins
Settings are applied in layers, and later layers win:
- KScript's built-in defaults.
- The standards
kscript.jsonnames, in order. Each standard applies the standards itextendsfirst, in order, then its own settings. kscript.json's ownlintandformatsettings.
Settings are replaced one at a time, as is each format rule and each lint code, so a project that changes print_width keeps the rest of its standard. preserve is replaced as a whole list.
kscript check --warnings-as-errors turns warnings_as_errors on, whatever the layers say. In an editor, its tab settings only fill in the indent when no layer sets format.indent.
Codes and prefixes
A lint rule may name a code (KS6001) or a prefix (KS6*). Inside one layer, the longest match wins, so { "KS3*": "warning", "KS3001": "error" } keeps unknown elements as errors.
Across layers, a prefix replaces what earlier layers said about the codes it covers. A project's "KS6*": "off" really turns off every style rule, even one its standard set to "error" by code.