reason
reason copied to clipboard
refmt makes record fields with `bs` annotations harder to read
This is purely subjective, so feel free to close if you disagree, but it bothered me enough that I thought I'd mention it. :smile: The following code:
[@bs.deriving abstract]
type t = {
[@bs.optional] filename: string,
[@bs.optional] onWarning: Js.Exn.t => unit,
[@bs.optional] schema: schema,
[@bs.optional] json: bool,
};
gets turned into:
[@bs.deriving abstract]
type t = {
[@bs.optional]
filename: string,
[@bs.optional]
onWarning: Js.Exn.t => unit,
[@bs.optional]
schema,
[@bs.optional]
json: bool,
};
after refmt works its magic. The refmt'd version is inconsistent with the formatting used in the bucklescript object docs, and in my opinion it's substantially harder to make sense of.