button-inc / digital_marketplace

The intent of this development is to build a product that will support digital procurement needs for the BC Government including services such as, but not limited to, Sprint With Us, Code With Us, The Procurement Concierge.
Apache License 2.0
0 stars 0 forks source link

Fix react/no children prop eslint error #66

Closed BCerki closed 2 years ago

BCerki commented 2 years ago

I found this one tricky to understand, here are the docs I found in case they're helpful:

As far I can tell, this error arises because the Base Props interface has a prop named "children":

interface BaseProps {
  tag?: 'a' | 'div';
  dest?: Dest;
  symbol_?: Placement<LinkSymbol>;
  symbolClassName?: string;
  symbolStyle?: CSSProperties;
  iconSymbolSize?: number; //rem
  children?: ViewElementChildren;
  className?: string;
  style?: CSSProperties;
  disabled?: boolean;
  newTab?: boolean;
  focusable?: boolean;
  onClick?(e?: MouseEvent): void;
}

BaseProps is used all over the place, as is the word "children," so I think it would be time-consuming to fix this one. When I tried changing "children" in BaseProps to a different word, I got 400 lines of TS errors.

BCerki commented 2 years ago

Closing for now pending discussion in https://github.com/button-inc/digital_marketplace/issues/25