Skip to content

Commit

Permalink
chore: remove usage of "export *"
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter committed Dec 11, 2024
1 parent a6cc5b0 commit c05e69c
Show file tree
Hide file tree
Showing 121 changed files with 384 additions and 324 deletions.
5 changes: 2 additions & 3 deletions packages/eslint-plugin/src/configs/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ module.exports = {
},
overrides: [
{
files: '**/src/index.{ts,tsx,js}',
files: '**/src/**/*.{ts,tsx,js}',
rules: {
// TODO: propagate to `error` once all packages barrel files have been fixed
'@rnx-kit/no-export-all': ['warn', { expand: 'all' }],
'@rnx-kit/no-export-all': ['error', { expand: 'all' }],
},
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/Button/index';
export type { ButtonProps, ButtonSlots, ButtonState } from './components/Button/index';
export { Button, buttonClassNames, renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from './components/Button/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CompoundButton/index';
export type { CompoundButtonProps, CompoundButtonSlots, CompoundButtonState } from './components/CompoundButton/index';
export { CompoundButton, compoundButtonClassNames, renderCompoundButton_unstable, useCompoundButtonStyles_unstable, useCompoundButton_unstable } from './components/CompoundButton/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/MenuButton/index';
export type { MenuButtonProps, MenuButtonSlots, MenuButtonState } from './components/MenuButton/index';
export { MenuButton, menuButtonClassNames, renderMenuButton_unstable, useMenuButtonStyles_unstable, useMenuButton_unstable } from './components/MenuButton/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/SplitButton/index';
export type { SplitButtonProps, SplitButtonSlots, SplitButtonState } from './components/SplitButton/index';
export { SplitButton, renderSplitButton_unstable, splitButtonClassNames, useSplitButtonStyles_unstable, useSplitButton_unstable } from './components/SplitButton/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/ToggleButton/index';
export type { ToggleButtonProps, ToggleButtonState } from './components/ToggleButton/index';
export { ToggleButton, renderToggleButton_unstable, toggleButtonClassNames, useToggleButtonStyles_unstable, useToggleButton_unstable } from './components/ToggleButton/index';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './Button';
export { Button } from './Button';
// Explicit exports to omit ButtonCommons
export type { ButtonProps, ButtonSlots, ButtonState } from './Button.types';
export * from './renderButton';
export * from './useButton';
export { renderButton_unstable } from './renderButton';
export { useButton_unstable } from './useButton';
export { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CompoundButton';
export * from './CompoundButton.types';
export * from './renderCompoundButton';
export * from './useCompoundButton';
export { CompoundButton } from './CompoundButton';
export type { CompoundButtonProps, CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';
export { renderCompoundButton_unstable } from './renderCompoundButton';
export { useCompoundButton_unstable } from './useCompoundButton';
export { compoundButtonClassNames, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './MenuButton.types';
export * from './MenuButton';
export * from './renderMenuButton';
export * from './useMenuButton';
export type { MenuButtonProps, MenuButtonSlots, MenuButtonState } from './MenuButton.types';
export { MenuButton } from './MenuButton';
export { renderMenuButton_unstable } from './renderMenuButton';
export { useMenuButton_unstable } from './useMenuButton';
export { menuButtonClassNames, useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './SplitButton';
export * from './SplitButton.types';
export * from './renderSplitButton';
export * from './useSplitButton';
export { SplitButton } from './SplitButton';
export type { SplitButtonProps, SplitButtonSlots, SplitButtonState } from './SplitButton.types';
export { renderSplitButton_unstable } from './renderSplitButton';
export { useSplitButton_unstable } from './useSplitButton';
export { splitButtonClassNames, useSplitButtonStyles_unstable } from './useSplitButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './ToggleButton';
export * from './ToggleButton.types';
export * from './renderToggleButton';
export * from './useToggleButton';
export { ToggleButton } from './ToggleButton';
export type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';
export { renderToggleButton_unstable } from './renderToggleButton';
export { useToggleButton_unstable } from './useToggleButton';
export { toggleButtonClassNames, useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './ButtonContext';
export type { ButtonContextValue } from './ButtonContext';
export { ButtonContextProvider, useButtonContext } from './ButtonContext';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './useToggleState';
export { useToggleState } from './useToggleState';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/Carousel/index';
export type { CarouselAnnouncerFunction, CarouselMotion, CarouselProps, CarouselSlots, CarouselState, CarouselUpdateData, CarouselVisibilityChangeEvent, CarouselVisibilityEventDetail } from './components/Carousel/index';
export { Carousel, carouselClassNames, renderCarousel_unstable, useCarouselStyles_unstable, useCarousel_unstable } from './components/Carousel/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselAutoplayButton/index';
export type { CarouselAutoplayAriaLabelFunction, CarouselAutoplayButtonProps, CarouselAutoplayButtonSlots, CarouselAutoplayButtonState, CarouselAutoplayChangeData } from './components/CarouselAutoplayButton/index';
export { CarouselAutoplayButton, carouselAutoplayButtonClassNames, renderCarouselAutoplayButton_unstable, useCarouselAutoplayButtonStyles_unstable, useCarouselAutoplayButton_unstable } from './components/CarouselAutoplayButton/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselButton/index';
export type { CarouselButtonProps, CarouselButtonSlots, CarouselButtonState } from './components/CarouselButton/index';
export { CarouselButton, carouselButtonClassNames, renderCarouselButton_unstable, useCarouselButtonStyles_unstable, useCarouselButton_unstable } from './components/CarouselButton/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselCard/index';
export type { CarouselCardProps, CarouselCardSlots, CarouselCardState } from './components/CarouselCard/index';
export { CarouselCard, carouselCardClassNames, renderCarouselCard_unstable, useCarouselCardStyles_unstable, useCarouselCard_unstable } from './components/CarouselCard/index';
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './components/CarouselContext';
export * from './components/CarouselContext.types';
export { CarouselProvider, carouselContextDefaultValue, useCarouselContext_unstable } from './components/CarouselContext';
export type { CarouselContextValue, CarouselContextValues, CarouselIndexChangeData } from './components/CarouselContext.types';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselNav/index';
export type { CarouselNavContextValue, CarouselNavProps, CarouselNavSlots, CarouselNavState, NavButtonRenderFunction } from './components/CarouselNav/index';
export { CarouselNav, carouselNavClassNames, renderCarouselNav_unstable, useCarouselNavStyles_unstable, useCarouselNav_unstable } from './components/CarouselNav/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselNavButton/index';
export type { CarouselNavButtonProps, CarouselNavButtonSlots, CarouselNavButtonState } from './components/CarouselNavButton/index';
export { CarouselNavButton, carouselNavButtonClassNames, renderCarouselNavButton_unstable, useCarouselNavButtonStyles_unstable, useCarouselNavButton_unstable } from './components/CarouselNavButton/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselNavContainer/index';
export type { CarouselNavContainerProps, CarouselNavContainerSlots, CarouselNavContainerState } from './components/CarouselNavContainer/index';
export { CarouselNavContainer, carouselNavContainerClassNames, renderCarouselNavContainer_unstable, useCarouselNavContainerStyles_unstable, useCarouselNavContainer_unstable } from './components/CarouselNavContainer/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselNavImageButton/index';
export type { CarouselNavImageButtonProps, CarouselNavImageButtonSlots, CarouselNavImageButtonState } from './components/CarouselNavImageButton/index';
export { CarouselNavImageButton, carouselNavImageButtonClassNames, renderCarouselNavImageButton_unstable, useCarouselNavImageButtonStyles_unstable, useCarouselNavImageButton_unstable } from './components/CarouselNavImageButton/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselSlider/index';
export type { CarouselSliderContextValue, CarouselSliderProps, CarouselSliderSlots, CarouselSliderState } from './components/CarouselSlider/index';
export { CarouselSlider, carouselSliderClassNames, renderCarouselSlider_unstable, useCarouselSliderStyles_unstable, useCarouselSlider_unstable } from './components/CarouselSlider/index';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/CarouselViewport/index';
export type { CarouselViewportProps, CarouselViewportSlots, CarouselViewportState } from './components/CarouselViewport/index';
export { CarouselViewport, carouselViewportClassNames, renderCarouselViewport_unstable, useCarouselViewportStyles_unstable, useCarouselViewport_unstable } from './components/CarouselViewport/index';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './Carousel';
export * from './Carousel.types';
export * from './renderCarousel';
export * from './useCarousel';
export * from './useCarouselStyles.styles';
export { Carousel } from './Carousel';
export type { CarouselAnnouncerFunction, CarouselMotion, CarouselProps, CarouselSlots, CarouselState, CarouselUpdateData, CarouselVisibilityChangeEvent, CarouselVisibilityEventDetail } from './Carousel.types';
export { renderCarousel_unstable } from './renderCarousel';
export { useCarousel_unstable } from './useCarousel';
export { carouselClassNames, useCarouselStyles_unstable } from './useCarouselStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselAutoplayButton';
export * from './CarouselAutoplayButton.types';
export * from './renderCarouselAutoplayButton';
export * from './useCarouselAutoplayButton';
export * from './useCarouselAutoplayButtonStyles.styles';
export { CarouselAutoplayButton } from './CarouselAutoplayButton';
export type { CarouselAutoplayAriaLabelFunction, CarouselAutoplayButtonProps, CarouselAutoplayButtonSlots, CarouselAutoplayButtonState, CarouselAutoplayChangeData } from './CarouselAutoplayButton.types';
export { renderCarouselAutoplayButton_unstable } from './renderCarouselAutoplayButton';
export { useCarouselAutoplayButton_unstable } from './useCarouselAutoplayButton';
export { carouselAutoplayButtonClassNames, useCarouselAutoplayButtonStyles_unstable } from './useCarouselAutoplayButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselButton';
export * from './CarouselButton.types';
export * from './renderCarouselButton';
export * from './useCarouselButton';
export * from './useCarouselButtonStyles.styles';
export { CarouselButton } from './CarouselButton';
export type { CarouselButtonProps, CarouselButtonSlots, CarouselButtonState } from './CarouselButton.types';
export { renderCarouselButton_unstable } from './renderCarouselButton';
export { useCarouselButton_unstable } from './useCarouselButton';
export { carouselButtonClassNames, useCarouselButtonStyles_unstable } from './useCarouselButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselCard';
export * from './CarouselCard.types';
export * from './renderCarouselCard';
export * from './useCarouselCard';
export * from './useCarouselCardStyles.styles';
export { CarouselCard } from './CarouselCard';
export type { CarouselCardProps, CarouselCardSlots, CarouselCardState } from './CarouselCard.types';
export { renderCarouselCard_unstable } from './renderCarouselCard';
export { useCarouselCard_unstable } from './useCarouselCard';
export { carouselCardClassNames, useCarouselCardStyles_unstable } from './useCarouselCardStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselNav';
export * from './CarouselNav.types';
export * from './renderCarouselNav';
export * from './useCarouselNav';
export * from './useCarouselNavStyles.styles';
export { CarouselNav } from './CarouselNav';
export type { CarouselNavContextValue, CarouselNavProps, CarouselNavSlots, CarouselNavState, NavButtonRenderFunction } from './CarouselNav.types';
export { renderCarouselNav_unstable } from './renderCarouselNav';
export { useCarouselNav_unstable } from './useCarouselNav';
export { carouselNavClassNames, useCarouselNavStyles_unstable } from './useCarouselNavStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselNavButton';
export * from './CarouselNavButton.types';
export * from './renderCarouselNavButton';
export * from './useCarouselNavButton';
export * from './useCarouselNavButtonStyles.styles';
export { CarouselNavButton } from './CarouselNavButton';
export type { CarouselNavButtonProps, CarouselNavButtonSlots, CarouselNavButtonState } from './CarouselNavButton.types';
export { renderCarouselNavButton_unstable } from './renderCarouselNavButton';
export { useCarouselNavButton_unstable } from './useCarouselNavButton';
export { carouselNavButtonClassNames, useCarouselNavButtonStyles_unstable } from './useCarouselNavButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselNavContainer';
export * from './CarouselNavContainer.types';
export * from './renderCarouselNavContainer';
export * from './useCarouselNavContainer';
export * from './useCarouselNavContainerStyles.styles';
export { CarouselNavContainer } from './CarouselNavContainer';
export type { CarouselNavContainerProps, CarouselNavContainerSlots, CarouselNavContainerState } from './CarouselNavContainer.types';
export { renderCarouselNavContainer_unstable } from './renderCarouselNavContainer';
export { useCarouselNavContainer_unstable } from './useCarouselNavContainer';
export { carouselNavContainerClassNames, useCarouselNavContainerStyles_unstable } from './useCarouselNavContainerStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselNavImageButton';
export * from './CarouselNavImageButton.types';
export * from './renderCarouselNavImageButton';
export * from './useCarouselNavImageButton';
export * from './useCarouselNavImageButtonStyles.styles';
export { CarouselNavImageButton } from './CarouselNavImageButton';
export type { CarouselNavImageButtonProps, CarouselNavImageButtonSlots, CarouselNavImageButtonState } from './CarouselNavImageButton.types';
export { renderCarouselNavImageButton_unstable } from './renderCarouselNavImageButton';
export { useCarouselNavImageButton_unstable } from './useCarouselNavImageButton';
export { carouselNavImageButtonClassNames, useCarouselNavImageButtonStyles_unstable } from './useCarouselNavImageButtonStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselSlider';
export * from './CarouselSlider.types';
export * from './renderCarouselSlider';
export * from './useCarouselSlider';
export * from './useCarouselSliderStyles.styles';
export { CarouselSlider } from './CarouselSlider';
export type { CarouselSliderContextValue, CarouselSliderProps, CarouselSliderSlots, CarouselSliderState } from './CarouselSlider.types';
export { renderCarouselSlider_unstable } from './renderCarouselSlider';
export { useCarouselSlider_unstable } from './useCarouselSlider';
export { carouselSliderClassNames, useCarouselSliderStyles_unstable } from './useCarouselSliderStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './CarouselViewport';
export * from './CarouselViewport.types';
export * from './renderCarouselViewport';
export * from './useCarouselViewport';
export * from './useCarouselViewportStyles.styles';
export { CarouselViewport } from './CarouselViewport';
export type { CarouselViewportProps, CarouselViewportSlots, CarouselViewportState } from './CarouselViewport.types';
export { renderCarouselViewport_unstable } from './renderCarouselViewport';
export { useCarouselViewport_unstable } from './useCarouselViewport';
export { carouselViewportClassNames, useCarouselViewportStyles_unstable } from './useCarouselViewportStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
export * from './Attachment';
export * from './AttachmentAction';
export * from './AttachmentBody';
export * from './AttachmentDescription';
export * from './AttachmentHeader';
export * from './AttachmentIcon';
export type { AttachmentProps } from './Attachment';
export { Attachment, attachmentClassName, attachmentProgressBarClassName, attachmentProgressContainerClassName } from './Attachment';
export type { AttachmentActionProps } from './AttachmentAction';
export { AttachmentAction, attachmentActionClassName } from './AttachmentAction';
export type { AttachmentBodyProps } from './AttachmentBody';
export { AttachmentBody, attachmentBodyClassName } from './AttachmentBody';
export type { AttachmentDescriptionProps } from './AttachmentDescription';
export { AttachmentDescription, attachmentDescriptionClassName } from './AttachmentDescription';
export type { AttachmentHeaderProps } from './AttachmentHeader';
export { AttachmentHeader, attachmentHeaderClassName } from './AttachmentHeader';
export type { AttachmentIconProps } from './AttachmentIcon';
export { AttachmentIcon, attachmentIconClassName } from './AttachmentIcon';

export type { AttachmentProps } from './Attachment';
export type { AttachmentActionProps } from './AttachmentAction';
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './ButtonMigration.mixins';
export { v0Icon, v9CustomSizeIcon, v9DisabledCursor, v9HoverClasses, v9Icon } from './ButtonMigration.mixins';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './FormFieldShim';
export { FormFieldShim } from './FormFieldShim';
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './ItemLayout';
export * from './ItemLayout.styles';
export { ItemLayout, itemLayoutClassName } from './ItemLayout';
export { useItemLayoutStyles } from './ItemLayout.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './List';
export * from './List.types';
export * from './renderList';
export * from './useList';
export * from './useListStyles.styles';
export { List } from './List';
export type { ListContextValue, ListContextValues, ListProps, ListSlots, ListState } from './List.types';
export { renderList_unstable } from './renderList';
export { useList_unstable } from './useList';
export { listClassNames, useListStyles_unstable } from './useListStyles.styles';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './ListItem';
export * from './ListItem.types';
export * from './renderListItem';
export * from './useListItem';
export * from './useListItemStyles.styles';
export { ListItem } from './ListItem';
export type { ListItemProps, ListItemSlots, ListItemState } from './ListItem.types';
export { renderListItem_unstable } from './renderListItem';
export { useListItem_unstable } from './useListItem';
export { listItemClassNames, useListItemStyles_unstable } from './useListItemStyles.styles';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './useListSelection';
export { useListSelection } from './useListSelection';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './Primitive';
export { Primitive, primitiveClassName } from './Primitive';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './Segment';
export { Segment, segmentClassName } from './Segment';
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './StyledText';
export * from './StyledText.styles';
export type { StyledTextProps, StyledTextSlots } from './StyledText';
export { StyledText, styledTextClassName } from './StyledText';
export { useSizeStyles, useStyles, useWeightStyles } from './StyledText.styles';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './Video';
export type { VideoProps } from './Video';
export { Video, videoClassName } from './Video';
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './components/AppItem/index';
export type { AppItemProps, AppItemSlots, AppItemState } from './components/AppItem/index';
export { AppItem, appItemClassNames, renderAppItem_unstable, useAppItemStyles, useAppItemStyles_unstable, useAppItem_unstable } from './components/AppItem/index';
Loading

0 comments on commit c05e69c

Please sign in to comment.