eslint-plugin-react
eslint-plugin-react copied to clipboard
Added support (without options) for spread arguments with keys
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?
Since you never responded about the spread stuff I just made it an option, but that can easily change.
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 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?