shimful / eslint-plugin-react-lite

Zero-dependency reimplementations of the most essential eslint-plugin-react rules
MIT License
2 stars 0 forks source link

Check that `prop-types` is not used #4

Open benmccann opened 2 months ago

benmccann commented 2 months ago

The readme has:

❓ prop-types Would this be taken care of by TS?

I think the answer is yes: https://stackoverflow.com/questions/73954484/should-i-use-the-package-prop-types-or-pass-a-props-interface-to-react-component

But I also wanted to suggest that if you are using TS that the rule should check that you're not using the prop-types library to define your props. The other thing that would be interesting would be if we can document some ways to do this with JSDoc as well (e.g. potentially define the interface in a .t.ds file to be imported and used)