eslint-plugin-react icon indicating copy to clipboard operation
eslint-plugin-react copied to clipboard

Added support (without options) for spread arguments with keys

Open machineghost opened this issue 5 years ago • 3 comments

This is just a first step to try and solve: https://github.com/yannickcr/eslint-plugin-react/issues/1753

This is ONLY a request for code review: please do not merge. I just wanted to get feedback on what I have so far before I add in options. Also I wanted to get your thoughts on whether we should have two options or just one.

It seems like we definitely want to guard this new flexibility with some sort of "allow spread keys" option, but then do we want just one, or do we want to allow explicit spread keys:

<Foo {...{ key }} />

separately from implicit ones:

<Foo {...someObjectThatPresumablyHasAKey} />

Hypothetically speaking I could see a dev wanting to allow the former but not the latter ... but maybe that's YAGNI?

machineghost avatar Jun 08 '20 16:06 machineghost

Since you never responded about the spread stuff I just made it an option, but that can easily change.

machineghost avatar Jun 27 '20 15:06 machineghost

From the lack of response (one way or the other) here, is it safe to assume that I will need to fork the library if I want this change published (and just in general if I want to see other improvements made to it)?

machineghost avatar Aug 19 '20 16:08 machineghost

@machineghost sorry for the delay; what are you still waiting for a response on? I do have a reply here that you haven't replied to yet?

ljharb avatar Aug 30 '20 07:08 ljharb