We noticed a few unexpected behavior with the latest eslint-plugin-github 4.9.0 release, which all seems to stem from using getPropValue instead of getLiteralPropValue in our methods getElementType and getRole.
getElementType will return a div for the following. It should instead return Box and not try to assess the conditional.
<Box as={isNavigationOpen ? 'div' : 'nav'} />
--
getRole will return a "generic" here. I don't think it should return anything.
We noticed a few unexpected behavior with the latest eslint-plugin-github 4.9.0 release, which all seems to stem from using
getPropValue
instead ofgetLiteralPropValue
in our methodsgetElementType
andgetRole
.getElementType
will return a div for the following. It should instead returnBox
and not try to assess the conditional.--
getRole
will return a "generic" here. I don't think it should return anything.--
getRole
will return a "role" here. It should retur undefined since this isrole
is set to a variable.--
This PR:
getPropValue
withgetLiteralPropValue
.