google/jsonnet

Better defaults for jsonnet fmt

sbarzowski opened this issue · 1 comments

Right now jsonnet fmt by default does less than I would expect, e.g. it doesn't fix indentation.

Something like jsonnet fmt -n 2 --max-blank-lines 1 --sort-imports could be the default.

I think that ideally long-term we would have something like gofmt which provides heavily opinionated, "the only true" formatting, without any knobs. Having reasonable defaults is the first step in this direction.

My vote would be for:

-n 2 --max-blank-lines 2 --sort-imports --string-style s --comment-style s

This is what we now use internally, in the system you helped implement when you were here :)