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 a3585fb
Show file tree
Hide file tree
Showing 121 changed files with 1,091 additions and 333 deletions.
37 changes: 25 additions & 12 deletions packages/a11y-testing/src/definitions/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
export * from './Button/buttonBehaviorDefinition';
export * from './Button/buttonGroupBehaviorDefinition';
export * from './Button/toggleButtonBehaviorDefinition';
export * from './Link/linkBehaviorDefinition';
export * from './MenuButton/menuButtonBehaviorDefinition';
export * from './Pill/pillActionBehaviorDefinition';
export * from './Pill/pillBehaviorDefinition';
export * from './Pill/pillOptionBehaviorDefinition';
export * from './Pill/pillGroupBehaviorDefinition';
export * from './Popup/popupBehaviorDefinition';

export * from './react-button/buttonAccessibilityBehaviorDefinition';
export { buttonBehaviorDefinition } from './Button/buttonBehaviorDefinition';
export { buttonGroupBehaviorDefinition } from './Button/buttonGroupBehaviorDefinition';
export { toggleButtonBehaviorDefinition } from './Button/toggleButtonBehaviorDefinition';
export { linkBehaviorDefinition } from './Link/linkBehaviorDefinition';
export {
menuButtonBehaviorDefinition,
menuButtonBehaviorDefinitionMenuSlot,
menuButtonBehaviorDefinitionMenuSlotWithoutID,
menuButtonBehaviorDefinitionTriggerSlotNotTabbable,
menuButtonBehaviorDefinitionTriggerSlotTabbable,
menuButtonBehaviorDefinitionTriggerSlotWithoutID,
menuButtonBehaviorDefinitionTriggerWithTabIndex,
} from './MenuButton/menuButtonBehaviorDefinition';
export { pillActionBehaviorDefinition } from './Pill/pillActionBehaviorDefinition';
export { pillBehaviorDefinition } from './Pill/pillBehaviorDefinition';
export { pillOptionBehaviorDefinition } from './Pill/pillOptionBehaviorDefinition';
export { pillGroupBehaviorDefinition } from './Pill/pillGroupBehaviorDefinition';
export {
popupBehaviorDefinition,
popupBehaviorDefinitionPopupSlot,
popupBehaviorDefinitionTriggerSlotNotTabbable,
popupBehaviorDefinitionTriggerSlotTabbable,
popupBehaviorDefinitionTriggerSlotWithTabIndex,
} from './Popup/popupBehaviorDefinition';
export { buttonAccessibilityBehaviorDefinition } from './react-button/buttonAccessibilityBehaviorDefinition';
2 changes: 1 addition & 1 deletion packages/a11y-testing/src/facades/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './ComponentTestFacade';
export { ComponentTestFacade } from './ComponentTestFacade';
32 changes: 27 additions & 5 deletions packages/a11y-testing/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
export * from './types';
export * from './validators/index';
export * from './facades/index';
export * from './rules/index';
export * from './definitions/index';
export type { AccessibilityBehavior, PropValue, Props, Rule, Slot, TestFacade } from './types';
export { validateBehavior, validateSlot } from './validators/index';
export { ComponentTestFacade } from './facades/index';
export { BehaviorRule, SlotRule } from './rules/index';
export {
buttonAccessibilityBehaviorDefinition,
buttonBehaviorDefinition,
buttonGroupBehaviorDefinition,
linkBehaviorDefinition,
menuButtonBehaviorDefinition,
menuButtonBehaviorDefinitionMenuSlot,
menuButtonBehaviorDefinitionMenuSlotWithoutID,
menuButtonBehaviorDefinitionTriggerSlotNotTabbable,
menuButtonBehaviorDefinitionTriggerSlotTabbable,
menuButtonBehaviorDefinitionTriggerSlotWithoutID,
menuButtonBehaviorDefinitionTriggerWithTabIndex,
pillActionBehaviorDefinition,
pillBehaviorDefinition,
pillGroupBehaviorDefinition,
pillOptionBehaviorDefinition,
popupBehaviorDefinition,
popupBehaviorDefinitionPopupSlot,
popupBehaviorDefinitionTriggerSlotNotTabbable,
popupBehaviorDefinitionTriggerSlotTabbable,
popupBehaviorDefinitionTriggerSlotWithTabIndex,
toggleButtonBehaviorDefinition,
} from './definitions/index';
2 changes: 1 addition & 1 deletion packages/a11y-testing/src/rules/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './rules';
export { BehaviorRule, SlotRule } from './rules';
2 changes: 1 addition & 1 deletion packages/a11y-testing/src/validators/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './validate';
export { validateBehavior, validateSlot } from './validate';
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,8 @@
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,8 @@
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,8 @@
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,8 @@
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,8 @@
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';
18 changes: 17 additions & 1 deletion packages/react-components/react-carousel/library/src/Carousel.ts
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
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,14 @@
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,8 @@
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,8 @@
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,10 @@
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,14 @@
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,12 @@
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,12 @@
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,12 @@
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,13 @@
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,12 @@
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,14 @@
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,14 @@
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';
Loading

0 comments on commit a3585fb

Please sign in to comment.