Closed giact closed 2 years ago
Related issue is that if there are no elements in the array but there is a comment, the plugin errors out:
{
"data": [
// comment
]
}
Error output: Found "[" but first indent child was not a line.
Thanks both of you for the feedback! The fix for these are in progress now. @eric-coker I've already figured out a valid fix for your issue. @giact I'm still working on a fix for your issue.
Unless some other big issue comes up, the next release of this package should have the fix for both of these issues. I will update this issue when that gets out.
Resolved in the now-published version v1.1.1. Please re-open this ticket if that does not work for you! (All test are passing though so I think we're good.)
Awesome. Thanks for the great plugin!
I have been using it for a few days, and no other issues with comments inside arrays, so far. Thanks for the fix! 👍🏻
When a JSON like this is Prettied...
... it gets formatted into this:
I added a test for it here:
giact/prettier-plugin-multiline-arrays@07e6eba1f815db65e0d6443dc78fedfcde857675