Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates example app sources to satisfy new ESLint import rules by reordering imports and converting type-only imports to import type, and adds a TypeScript module declaration to allow import ... from '*.png' in the common app.
Changes:
- Reorder imports across example/test/showcase files to satisfy new lint import-order rules.
- Convert eligible imports to
import typeto avoid runtime imports where only types are needed. - Add
apps/common-app/src/images.d.tsto declare*.pngimports.
Reviewed changes
Copilot reviewed 123 out of 124 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/macos-example/index.ts | Reorders imports to satisfy lint rules |
| apps/expo-example/index.ts | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/tests/webStylesReset/index.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/twoFingerPan/index.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/rectButton/index.tsx | Reorders imports; splits type-only imports |
| apps/common-app/src/new_api/tests/reattaching/index.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/pressable/testingBase.tsx | Reorders imports; separates RN vs GH props types |
| apps/common-app/src/new_api/tests/pressable/index.tsx | Reorders imports; converts ReactNode to type-only import |
| apps/common-app/src/new_api/tests/pressable/hoverDelay.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/pressable/hitSlop.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/pressable/functionalStyles.tsx | Reorders imports; uses type-only import for callback type |
| apps/common-app/src/new_api/tests/pressable/delayedPress.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/pressable/androidRipple.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/pointerType/index.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/nestedRootView/index.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/tests/nestedPressables/index.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/simple/tap/index.tsx | Reorders imports within reanimated + other modules |
| apps/common-app/src/new_api/simple/rotation/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/simple/pinch/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/simple/pan/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/simple/longPress/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/simple/hover/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/simple/fling/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/showcase/timer/index.tsx | Reorders imports; splits type-only import |
| apps/common-app/src/new_api/showcase/svg/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/showcase/state_manager/index.tsx | Reorders imports; uses type-only import for gesture type |
| apps/common-app/src/new_api/showcase/shared_value/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/showcase/overlap/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/showcase/nested_text/nested_text.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/showcase/bottom_sheet/index.tsx | Reorders imports; splits RN and GH event types into type-only imports |
| apps/common-app/src/new_api/showcase/animated/index.tsx | Consolidates react-native import list; reorders imports |
| apps/common-app/src/new_api/index.tsx | Reorders example imports in the NEW_EXAMPLES index |
| apps/common-app/src/new_api/hover_mouse/stylus_data/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/hover_mouse/mouse_buttons/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/hover_mouse/hoverable_icons/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/hover_mouse/hover/index.tsx | Reorders imports; converts RefObject to type-only import |
| apps/common-app/src/new_api/hover_mouse/context_menu/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/components/touchable_stress/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/components/touchable/index.tsx | Reorders imports; converts TouchableProps to type-only import |
| apps/common-app/src/new_api/components/switchAndInput/index.tsx | Reorders imports; keeps NativeGestureEvent as type-only import |
| apps/common-app/src/new_api/components/swipeable/index.tsx | Reorders imports; converts SharedValue/SwipeableMethods to type-only imports |
| apps/common-app/src/new_api/components/swipeable/GmailStyleSwipeableRow.tsx | Reorders imports; converts ReactNode/SharedValue/SwipeableMethods to type-only imports |
| apps/common-app/src/new_api/components/swipeable/AppleStyleSwipeableRow.tsx | Reorders imports; converts ReactNode/SharedValue/SwipeableMethods to type-only imports |
| apps/common-app/src/new_api/components/scrollview/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/components/flatlist/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/components/drawer/index.tsx | Reorders imports; converts DrawerLayoutMethods/SharedValue to type-only imports |
| apps/common-app/src/new_api/components/buttons/index.tsx | Reorders imports; converts ref-related types to type-only imports |
| apps/common-app/src/new_api/components/button_underlay/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/complicated/velocity_test/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/complicated/lock/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/complicated/chat_heads/index.tsx | Reorders imports; converts SharedValue/ImageStyle/LayoutChangeEvent to type-only imports |
| apps/common-app/src/new_api/complicated/camera/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/new_api/complicated/camera/filters.tsx | Reorders imports; converts SharedValue to type-only import |
| apps/common-app/src/new_api/complicated/camera/capture.tsx | Reorders imports; converts SharedValue to type-only import |
| apps/common-app/src/legacy/v2_api/velocityTest/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/v2_api/transformations/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/v2_api/pressable/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/v2_api/overlap/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/v2_api/manualGestures/index.tsx | Reorders imports; converts SharedValue to type-only import |
| apps/common-app/src/legacy/v2_api/hoverable_icons/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/v2_api/hover/index.tsx | Reorders imports; converts GestureType to type-only import |
| apps/common-app/src/legacy/v2_api/drag_n_drop/index.tsx | Reorders imports; converts DraggableItemData/ColorTile to type-only imports |
| apps/common-app/src/legacy/v2_api/drag_n_drop/Tile.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/v2_api/drag_n_drop/Draggable.tsx | Reorders imports; converts gesture payload + SharedValue to type-only imports |
| apps/common-app/src/legacy/v2_api/drag_n_drop/DragAndDrop.tsx | Reorders imports; converts PanGestureHandlerEventPayload to type-only import |
| apps/common-app/src/legacy/v2_api/chat_heads/index.tsx | Reorders imports; converts SharedValue/ImageStyle/LayoutChangeEvent to type-only imports |
| apps/common-app/src/legacy/v2_api/camera/index.tsx | Reorders imports; converts SharedValue to type-only import |
| apps/common-app/src/legacy/v2_api/calculator/index.tsx | Reorders imports; converts SharedValue/layout types/React Dispatch types to type-only imports |
| apps/common-app/src/legacy/v2_api/bottom_sheet/index.tsx | Reorders imports; converts RN + GH event types to type-only imports |
| apps/common-app/src/legacy/simple/tap/index.tsx | Reorders imports; converts handler event type to type-only import |
| apps/common-app/src/legacy/simple/manual/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/simple/longPress/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/simple/fling/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/simple/draggable/index.tsx | Reorders imports; converts FC/style prop types to type-only imports |
| apps/common-app/src/legacy/showcase/chatHeads/index.tsx | Reorders imports; converts gesture event types/layout type to type-only imports |
| apps/common-app/src/legacy/showcase/bottomSheet/index.tsx | Reorders imports; converts RN + GH event types to type-only imports |
| apps/common-app/src/legacy/release_tests/webStylesReset/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/twoFingerPan/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/touchables/index.tsx | Converts BackgroundPropType/StackScreenProps to type-only imports |
| apps/common-app/src/legacy/release_tests/svg/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/rectButton/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/pointerType/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/overflowParent/index.tsx | Reorders imports; converts state change event type to type-only import |
| apps/common-app/src/legacy/release_tests/nestedTouchables/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/nestedText/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/nestedPressables/index.tsx | Reorders imports; converts PressableStateCallbackType to type-only import |
| apps/common-app/src/legacy/release_tests/nestedGHRootViewWithModal/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/nestedFling/index.tsx | Reorders imports; converts state change event type to type-only import |
| apps/common-app/src/legacy/release_tests/nestedButtons/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/mouseButtons/index.tsx | Reorders imports; converts GestureType to type-only import |
| apps/common-app/src/legacy/release_tests/gesturizedPressable/testingBase.tsx | Reorders imports; converts prop types to type-only imports |
| apps/common-app/src/legacy/release_tests/gesturizedPressable/index.tsx | Reorders imports; converts ReactNode to type-only import |
| apps/common-app/src/legacy/release_tests/gesturizedPressable/hoverDelayExample.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/gesturizedPressable/hitSlopExample.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/gesturizedPressable/functionalStylesExample.tsx | Reorders imports; converts PressableStateCallbackType to type-only import |
| apps/common-app/src/legacy/release_tests/gesturizedPressable/delayedPressExample.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/gesturizedPressable/androidRippleExample.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/doubleDraggable/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/contextMenu/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/release_tests/combo/index.tsx | Reorders imports; converts RN + GH types to type-only imports |
| apps/common-app/src/legacy/release_tests/combo/InfoButton.tsx | Reorders imports; converts BorderlessButtonProps to type-only import |
| apps/common-app/src/legacy/release_tests/StylusData/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/recipes/scaleAndRotate/index.tsx | Reorders imports; converts handler event types to type-only imports |
| apps/common-app/src/legacy/recipes/panAndScroll/index.tsx | Reorders imports; converts handler event types to type-only imports |
| apps/common-app/src/legacy/index.tsx | Reorders example imports in the OLD_EXAMPLES index |
| apps/common-app/src/legacy/basic/panResponder/index.tsx | Reorders imports; converts RN gesture responder types to type-only imports |
| apps/common-app/src/legacy/basic/pagerAndDrawer/index.android.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/basic/multitap/index.tsx | Reorders imports; converts handler event types to type-only imports |
| apps/common-app/src/legacy/basic/forcetouch/index.tsx | Reorders imports; converts state change event type to type-only import |
| apps/common-app/src/legacy/basic/fling/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/legacy/basic/draggable/index.tsx | Reorders imports; converts StyleProp/ViewStyle to type-only imports |
| apps/common-app/src/legacy/basic/bouncing/index.tsx | Reorders imports; converts PropsWithChildren to type-only import |
| apps/common-app/src/images.d.ts | Adds TS module declaration for *.png imports |
| apps/common-app/src/empty/index.tsx | Reorders imports to satisfy lint rules |
| apps/common-app/src/common_assets/AnimatedCameraView/AnimatedCameraView.tsx | Reorders imports; converts reanimated and expo-camera props to type-only imports |
| apps/common-app/src/common.tsx | Reorders imports; introduces type-only imports for RN/React types |
| apps/common-app/src/ListWithHeader/ListWithHeader.tsx | Reorders imports; splits value vs type imports |
| apps/common-app/src/ListWithHeader/Header.tsx | Reorders imports; converts SharedValue to type-only import |
| apps/basic-example/src/Text.tsx | Reorders imports to satisfy lint rules |
| apps/basic-example/src/RuntimeDecoration.tsx | Reorders imports to satisfy lint rules |
| apps/basic-example/src/Navigator.tsx | Reorders imports to satisfy lint rules |
| apps/basic-example/src/NativeDetector.tsx | Reorders imports to satisfy lint rules |
| apps/basic-example/src/ContentsButton.tsx | Reorders imports to satisfy lint rules |
| apps/basic-example/src/App.tsx | Reorders imports to satisfy lint rules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes eslint errors in package after enabling new import rules
Note
images.d.tswas added because otherwise it is not possible to import*.pngasimportstatement.Test plan
yarn ts-checkyarn lint-js