When building component packages at scale it can be useful to be able to able to use object dot notation to reduce import noise and to increase readability for highly related components.
An example would be for building a opinionated text components form a style build.
import { Paragraph } from 'your-component-library'
export const Component = ({ children }) =>
<>
<Paragraph.Large>Header</Paragraph.Large>
<Paragraph>Detail</Paragraph>
<Paragraph.Small>{children}</Paragraph.Small>
</>
However, the current skip rules only allow a single JSXIdentifier for the component tags. This PR uses @babel/traverse to find the opening component tag, and from there builds the tag identifier.
When building component packages at scale it can be useful to be able to able to use object dot notation to reduce import noise and to increase readability for highly related components.
An example would be for building a opinionated text components form a style build.
Instead of having:
You could have :
However, the current
skip
rules only allow a singleJSXIdentifier
for the component tags. This PR uses @babel/traverse to find the opening component tag, and from there builds the tag identifier.