Alex Zherdev
Alex Zherdev
@AkshatSrivastava2 are you still working on this? I can pick up if necessary, otherwise you can check out #1676 (which I think is similar) for hints. cc @loganfsmyth
I'll see if I can reproduce this 👍
Note that this can be achieved with the core [`no-restricted-syntax`](https://eslint.org/docs/rules/no-restricted-syntax) rule by using the following selector: `"ImportDeclaration[source.value=\"react\"] :matches(ImportSpecifier, ImportNamespaceSpecifier)"`
I have a PR upcoming that deduplicates propType usage detection from `prop-types` and `no-unused-prop-types` https://github.com/alexzherdev/eslint-plugin-react/commit/348021f4fbfae9c39de6ed7f77ef6395d7916e6f (bringing them both down to < 200 lines compared to 1100+ lines originally 🤗). If...
Oh yeah, a new rule (if we go that way) would have a different name.
Removed `jsx` prefix, added `createElement` support and controls for arrays/objects
Oh, for sure, this name leaves much to be desired. I guess this is more `no-object-or-array-literals-in-props` but that's quite a mouthful 😐 Although not really more than `no-redundant-should-component-update` 😄
@metreniuk sorry, I don't have a lot of experience with this rule. From looking at this PR, I would expect more changes in tests though? Am I missing something?
~Looks like I need to fix #1817 to improve coverage.~ ~_Edit_: done~
Just rebased to resolve conflicts