Eric Anderson
Eric Anderson
Having now put in 2 PRs into this code base... this thing is complex. If there were more flags I cannot fathom how difficult it would be to maintain. It...
I want to think through a few more cases. N=4, M=2, O=4 ```js let foo; // #1 foo = { bar }; // #2 foo = { bar, baz, bloop,...
```js // #12 foo = [ { bar: [ isBaz ? getBar() : getBloop(), 5, ], } ];
@duailibe @j-f1 @azz @suchipi thoughts on the proposal? I might take a stab at it if there is support
Interesting. For completeness I will paste out all my examples again but for your proposed rules @suchipi Im going to tweak it to say that an array is "simple" if...
I tweaked your rules because I wouldnt want 9 to render as: ```js foo = [ isBaz ? getBar() : getBloop() ]; ``` Although I guess I don't mind that...
Taking the OP's larger example we get ```js const { name: { first, last }, organisation: { address: { street: orgStreetAddress, postcode: orgPostcode, }, }, } = user; ```
It’s both. The complaint includes that they behave differently.
That’s fair. I think @suchipi s rules work nicely for the object restructuring case though. Still happy to address a fix that is much much smaller in scope
Hmm, an extension of this might be to find the .prettierrc per file location. Thus: ``` child/ src/ file.js .prettierrc src/ file.js .prettierrc ```