feat: add support for arrayExpression.maxWidth configuration#739
feat: add support for arrayExpression.maxWidth configuration#739xseman wants to merge 1 commit intodprint:mainfrom
arrayExpression.maxWidth configuration#739Conversation
|
@dsherret I know you may be busy. This PR has been open for a while. Any feedback would help. Thanks |
| fn generate_element_text<'a>(node: Node<'a>, context: &mut Context<'a>) -> String { | ||
| node.text_fast(context.program).to_string() | ||
| } |
There was a problem hiding this comment.
This is not an accurate way to measure the text of a node because the node could have things like spaces or newlines and bad formatting, so the width might be different once printed. Similarly, in this other PR it's not an accurate way to figure out the node width: https://github.com/dprint/dprint-plugin-typescript/pull/737/changes#diff-d83dd6f700946697666bb782a867b64343578bc2067c1904c08060c5f21009d1R258
Both of these are difficult to do properly and I'm not sure I want to maintain them. Sorry!
There was a problem hiding this comment.
Thanks for the feedback! It would really help me to know if you think these issues (both this one and #737) are actually worth solving within dprint typescript plugin.
If I get clear direction on the approach you'd prefer, I'm happy to implement it, but I don't want to push for features that don't align with your vision for the module. I'd rather spend my time on things you actually find valuable for the project.
Implements #677