sbdchd / eslint-plugin-cake

:cake: Sweet rules for ESLint
MIT License
1 stars 0 forks source link

allow react router props in no unused destructure #18

Closed sbdchd closed 3 years ago

sbdchd commented 3 years ago
export interface RouteComponentProps<P, C extends StaticContext = StaticContext> {
  history: H.History;
  location: H.Location;
  match: match<P>;
  staticContext?: C;
}

I think we'd take the keys and explicitly allow them, using Pick results in the withRouter HOC not working because it requires the type params extend from RouteComponentProps

sbdchd commented 3 years ago

fixed in 0.3.2