electrovir / prettier-plugin-multiline-arrays

Prettier plugin to force array elements to wrap onto new lines.
https://www.npmjs.com/package/prettier-plugin-multiline-arrays
Creative Commons Zero v1.0 Universal
137 stars 6 forks source link

Prettier v3 support (v2) #28

Closed tthornton3-chwy closed 1 year ago

tthornton3-chwy commented 1 year ago

This is a fork off of https://github.com/electrovir/prettier-plugin-multiline-arrays/pull/27, that applies the diff provided by @richardsimko (thank you!), then fixes the tests / formatting etc.

This took a bit of debugging!

Worth noting-- I monkey patched prettier-plugin-organize-imports, because otherwise I would have had to re-write a bunch of javascript tests. I did it in an "okay" way, but we should probably no longer assume type declarations are allowed in plain js! Or maybe we could try adding the @flow annotation?? I tried for 2 seconds and it didn't immediately work, so I just did this haha.

richardsimko commented 1 year ago

Great! Thanks for picking it up and glad to hear my small contribution was useful :)

electrovir commented 1 year ago

Hey thanks for this @tthornton3-chwy! I'll try to take a look this weekend.

electrovir commented 1 year ago

@richardsimko note that I added an empty commit to the main branch under your name to indicate your contribution of the concat doc fix patch from #27 (in this comment https://github.com/electrovir/prettier-plugin-multiline-arrays/pull/27#discussion_r1319867801):

https://github.com/electrovir/prettier-plugin-multiline-arrays/commit/fc53db2a87c613e5b69a1184592dfff4cd35375a

(The commit is empty because the changes were already incorporated into @tthornton3-chwy's commit fded62c but I didn't want to rebase this branch as it would nuke the "verified" status of their commits.)

tthornton3-chwy commented 1 year ago

Thanks again @electrovir for your amazing work on this plugin-- this is a huge thing for a lot of people that you've managed to help! Cheers!