824 B
824 B
Tweak function composition logic for decorators (#7138 by @brainkim)
Because decorators modify the line following, splitting a decorator call’s arguments onto multiple lines can obscure the relationship between the decorator and its intended target, producing less-readable code. Therefore, the function composition logic introduced in #6033 has been changed to exclude decorator calls.
// Input
export class Item {
@OneToOne(() => Thing, x => x.item)
thing!: Thing;
}
// Output (Prettier stable)
export class Item {
@OneToOne(
() => Thing,
x => x.item,
)
thing!: Thing;
}
// Output (Prettier master)
export class Item {
@OneToOne(() => Thing, x => x.item)
thing!: Thing;
}