prettier remove line wraps
Answered
B33fb0n3 posted this in #help-forum
B33fb0n3OP
Hey, I just installed prettier and changed some settings. After using it a while the formatting looks pretty ugly (see attached). It could look so much simpler (see attached). How to change that specific setting?
My current settings are:
I tried removing all my custom settings ^ , but the wrapping is still messy.
My current settings are:
"prettier.endOfLine": "auto",
"prettier.bracketSameLine": true,
"prettier.singleQuote": true,
"prettier.tabWidth": 4,
"prettier.useTabs": true,I tried removing all my custom settings ^ , but the wrapping is still messy.
Answered by joulev
dunno what happened in your end but
// prettier.config.js
module.exports = {
semi: true,
printWidth: 100,
arrowParens: "avoid",
tabWidth: 2,
}8 Replies
Asian black bear
This is controlled by the
printWidth setting.@Asian black bear This is controlled by the `printWidth` setting.
B33fb0n3OP
I just tried setting this setting to 1200 (just to make sure this is the specific setting), but it still wraps these lines
Eastern yellowjacket
change
printWidth to 120 heheB33fb0n3OP
bump
B33fb0n3OP
bump
dunno what happened in your end but
// prettier.config.js
module.exports = {
semi: true,
printWidth: 100,
arrowParens: "avoid",
tabWidth: 2,
}Answer
@joulev dunno what happened in your end but
tsx
// prettier.config.js
module.exports = {
semi: true,
printWidth: 100,
arrowParens: "avoid",
tabWidth: 2,
}
B33fb0n3OP
oh yes, that's it. It looks like it need to be especially inside the prettier config instead of the vscode settings. Thanks 👏