-
Couldn't load subscription status.
- Fork 471
Open
Labels
formatterIssues related to code formattingIssues related to code formatting
Description
Comparing ReScript's behavior to Prettier's, Prettier is consistent for types and values, but ReScript is not.
My proposal is to standardize on Prettier's behavior, also because it seems to follow user intention better. If the user put the first record field on a separate line, we may assume that they intend to keep the formatting multiline and/or add more fields later.
Prettier
Types
type X = { a: number }; type Y = { a: number }; type Z = { a: number };reformats to
type X = { a: number }; type Y = { a: number }; type Z = { a: number; };Values
let x = { a: 2 }; let x = { a: 2, }; let x = { a: 2, };reformats to
let x = { a: 2 }; let x = { a: 2 }; let x = { a: 2, };ReScript
Types
type x = {a: int} type y = {a: int } type z = { a: int, }reformats to
type x = {a: int} type y = {a: int} type z = {a: int} Values
let x = {a: 2} let x = {a: 2 } let x = { a: 2 }reformats to
let x = {a: 2} let x = { a: 2, } let x = { a: 2, } tx46
Metadata
Metadata
Assignees
Labels
formatterIssues related to code formattingIssues related to code formatting