Closed calag4n closed 1 year ago
Could you please provide more details on what you're requesting? Prettier without this plugin already and only wraps by character count. This plugin does not interfere with that but also wraps in more conditions (when the element count threshold is passed). To wrap by character count alone, ignoring element account, this plugin should not be used.
Closing due to lack of response. Please feel free to re-open with more details!
Could you please provide more details on what you're requesting? Prettier without this plugin already and only wraps by character count. This plugin does not interfere with that but also wraps in more conditions (when the element count threshold is passed). To wrap by character count alone, ignoring element account, this plugin should not be used.
I probably misunderstand how it is supposed to work, sorry. My issue is that I don't want small arrays to be wrapped in one line.
For example, if a set prettier with "multilineArraysWrapThreshold": 4
const foo = [1, 2, 3, 4, 5]
will be formatted in
const a = [
1,
2,
3,
4,
5,
]
That I want to avoid. Otherwise it's a great plugin, good job, bravo !
Thanks for the details!
What are you hoping this plugin will do for you? Or, in other words, what are you hoping to get out of setting the wrap threshold to 4? (Rather than relying on Prettier's default array wrapping behavior.)
I'm trying to understand your use case as it seems to me that you want to set a threshold but then ignore the threshold. In that case, I don't know when you expect the threshold to not be ignored.
Otherwise it's a great plugin, good job, bravo !
Thank you kindly :grin:
It would be great if we could choose to set the threshold in term of characters instead of array elements. Maybe just following the
printWidth
property for the limit.