New Rule: No used props
bluerface opened this issue · comments
Zoe Lawrence commented
Useful for dead code elimination
John Wiseheart commented
Hi there @bluerface,
Can you go into a little more detail as to how you would expect this rule to work, perhaps with some examples?
Dan Homola commented
I believe they meant unused props, something like
const Foo = (props: {name: string; unusedProp: number}) => <div>Hi, {props.name}</div>
~~~~~~~~~~ The prop 'unusedProp' is not used anywhere in the component.
Karol Majewski commented
The previous issue proposed the same thing: #150. There is a rule like this in tslint-microsoft-contrib
, but it doesn't work with stateless components.
Kyle G commented
Given that React is moving towards SFCs over Class's, is this not something that could / should become part of this repos scope?
Adi Dahiya commented
This request doesn't look any different from no-unused-variable
, which is deprecated for maintenance reasons.