From 85ba4aef2b54cf7152f31cd82a84e48b4fea1f1a Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Fri, 5 Jan 2024 14:31:26 +0100 Subject: [PATCH 1/3] fix: lint issues with types import --- src/components/HoldMenuSectionList.tsx | 6 +++--- src/components/ProcessMoneyRequestHoldMenu.tsx | 4 ++-- src/components/TextPill.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/HoldMenuSectionList.tsx b/src/components/HoldMenuSectionList.tsx index 9a9857f037f2..145de4eb392d 100644 --- a/src/components/HoldMenuSectionList.tsx +++ b/src/components/HoldMenuSectionList.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import {ImageSourcePropType, View} from 'react-native'; -import {SvgProps} from 'react-native-svg'; +import {type ImageSourcePropType, View} from 'react-native'; +import type {SvgProps} from 'react-native-svg'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import variables from '@styles/variables'; -import {TranslationPaths} from '@src/languages/types'; +import type {TranslationPaths} from '@src/languages/types'; import Icon from './Icon'; import * as Illustrations from './Icon/Illustrations'; import Text from './Text'; diff --git a/src/components/ProcessMoneyRequestHoldMenu.tsx b/src/components/ProcessMoneyRequestHoldMenu.tsx index be72fdb98a8b..1b711633ed3b 100644 --- a/src/components/ProcessMoneyRequestHoldMenu.tsx +++ b/src/components/ProcessMoneyRequestHoldMenu.tsx @@ -4,9 +4,9 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Button from './Button'; import HoldMenuSectionList from './HoldMenuSectionList'; -import {PopoverAnchorPosition} from './Modal/types'; +import type {PopoverAnchorPosition} from './Modal/types'; import Popover from './Popover'; -import {AnchorAlignment} from './Popover/types'; +import type {AnchorAlignment} from './Popover/types'; import Text from './Text'; import TextPill from './TextPill'; diff --git a/src/components/TextPill.tsx b/src/components/TextPill.tsx index 035ae1dd42d8..6d473b189534 100644 --- a/src/components/TextPill.tsx +++ b/src/components/TextPill.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {StyleProp, TextStyle} from 'react-native'; +import type {StyleProp, TextStyle} from 'react-native'; // eslint-disable-next-line no-restricted-imports import useThemeStyles from '@hooks/useThemeStyles'; import colors from '@styles/theme/colors'; From 3d77a96fe12ec4579790ca264ee9093bebd72d76 Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Fri, 5 Jan 2024 14:39:27 +0100 Subject: [PATCH 2/3] fix: remove inline type specifier --- src/components/HoldMenuSectionList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HoldMenuSectionList.tsx b/src/components/HoldMenuSectionList.tsx index 145de4eb392d..f5c7e8cf3b94 100644 --- a/src/components/HoldMenuSectionList.tsx +++ b/src/components/HoldMenuSectionList.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {type ImageSourcePropType, View} from 'react-native'; +import {ImageSourcePropType, View} from 'react-native'; import type {SvgProps} from 'react-native-svg'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; From 02f7caa997507227c0494c8a9decb4ba3ecefd8d Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Fri, 5 Jan 2024 14:46:07 +0100 Subject: [PATCH 3/3] fix: split imports for components & types --- src/components/HoldMenuSectionList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/HoldMenuSectionList.tsx b/src/components/HoldMenuSectionList.tsx index f5c7e8cf3b94..aa5dd75ce159 100644 --- a/src/components/HoldMenuSectionList.tsx +++ b/src/components/HoldMenuSectionList.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import {ImageSourcePropType, View} from 'react-native'; +import {View} from 'react-native'; +import type {ImageSourcePropType} from 'react-native'; import type {SvgProps} from 'react-native-svg'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles';