Reputation: 53
This has been driving me wild for a little while here and i can't figure it out.
I have tried setting my prettier.printWidth
to 160 or 400 but it makes no difference. My environment is Vscode with prettier/vetur for Vue.
I can use // prettier-ignore
above the code but that's not a solution.
How i want it to look:
// prettier-ignore
if(!this.dataFields.some((field) => this.item.field && field.text === this.item.field)) {
// Find the field in the all fields list
const foundField = this.allDataFields.find((field) => field.text === this.item.field)
How it actually looks:
if (
!this.dataFields.some(
(field) => this.item.field && field.text === this.item.field
)
) {
// Find the field in the all fields list
const foundField = this.allDataFields.find(
(field) => field.text === this.item.field
)
Upvotes: 2
Views: 123
Reputation: 4019
Prettier has very few configuration options by design. It offers a small amount of control concerning multi-line objects, but in the end it it designed to take the decision on how to style certain code elements off the developers.
So the only options I see here are:
OR
Upvotes: 2