From acfba8e6856f733949732c6e558230180f1e8bd0 Mon Sep 17 00:00:00 2001 From: Michael Amaral Date: Mon, 2 Mar 2020 00:07:15 -0300 Subject: [PATCH] removed relative paths --- src/components/Avatar/styles.ts | 2 +- src/components/Button/index.tsx | 4 ++-- src/components/Button/styles.ts | 4 ++-- src/components/CircleButton/index.tsx | 4 ++-- src/components/CircleButton/styles.ts | 4 ++-- src/components/FormContainer/styles.ts | 2 +- src/components/FormError/index.tsx | 2 +- src/components/FormError/styles.ts | 4 ++-- src/components/Icon/index.tsx | 6 +++--- src/components/KeyboardAvoidingView/index.tsx | 4 ++-- src/components/Link/index.tsx | 4 ++-- src/components/Link/styles.ts | 4 ++-- src/components/MenuRow/styles.tsx | 4 ++-- src/components/SceneWrapper/index.tsx | 2 +- src/components/SceneWrapper/styles.ts | 2 +- src/components/SelectableButton/styles.ts | 4 ++-- src/components/SelectableFlatButton/styles.ts | 4 ++-- src/components/SelectableRow/styles.tsx | 4 ++-- src/components/SettingsSection/styles.ts | 4 ++-- src/components/SettingsToggle/styles.ts | 4 ++-- .../SocialButtons/FacebookButton/index.tsx | 2 +- src/components/SocialButtons/GoogleButton/index.tsx | 2 +- src/components/Stepper/styles.tsx | 4 ++-- src/components/SummaryCard/styles.ts | 4 ++-- src/components/TextInput/MaskedTextInput/index.tsx | 2 +- src/components/TextInput/PasswordInput/index.tsx | 2 +- src/components/TextInput/index.tsx | 6 +++--- src/components/TextInput/styles.ts | 4 ++-- src/components/Touchable/index.tsx | 4 ++-- src/components/Typography/index.tsx | 2 +- tsconfig.json | 13 +------------ 31 files changed, 53 insertions(+), 64 deletions(-) diff --git a/src/components/Avatar/styles.ts b/src/components/Avatar/styles.ts index 5539db4..16b8852 100644 --- a/src/components/Avatar/styles.ts +++ b/src/components/Avatar/styles.ts @@ -1,5 +1,5 @@ import styled from 'styled-components/native'; -import { Touchable } from '~/components'; +import { Touchable } from '..'; interface WrapperProps { size: number; diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 92ac2bd..23ef142 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; -import { LoadingIndicator } from '~/components'; -import { isIOS } from '~/helpers'; +import { LoadingIndicator } from '..'; +import { isIOS } from '../../utils/helpers'; import { Icon, Touchable, ButtonWrapper, ButtonText } from './styles'; const shadowStyle = { diff --git a/src/components/Button/styles.ts b/src/components/Button/styles.ts index 3832cd6..f042399 100644 --- a/src/components/Button/styles.ts +++ b/src/components/Button/styles.ts @@ -3,8 +3,8 @@ import { Typography, Touchable as TouchableComponent, Icon as DefaultIcon, -} from '~/components'; -import { getTheme } from '~/helpers'; +} from '..'; +import { getTheme } from '../../utils/helpers'; const smallSpacing = getTheme('smallSpacing'); const mediumSpacing = getTheme('mediumSpacing'); diff --git a/src/components/CircleButton/index.tsx b/src/components/CircleButton/index.tsx index c94b80f..6765909 100644 --- a/src/components/CircleButton/index.tsx +++ b/src/components/CircleButton/index.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { Spring, config as springConfig } from 'react-spring/renderprops'; -import { LoadingIndicator } from '~/components'; -import { IconSets } from '~/types'; +import { LoadingIndicator } from '..'; +import { IconSets } from '../../utils/types'; import { Wrapper, Touch, Icon } from './styles'; const bigSize = 70; diff --git a/src/components/CircleButton/styles.ts b/src/components/CircleButton/styles.ts index 5e65f84..d44b8a0 100755 --- a/src/components/CircleButton/styles.ts +++ b/src/components/CircleButton/styles.ts @@ -1,6 +1,6 @@ import styled from 'styled-components/native'; -import { Touchable, Icon as IconComponent } from '~/components'; -import { getTheme, ifStyle } from '~/helpers'; +import { Touchable, Icon as IconComponent } from '..'; +import { getTheme, ifStyle } from '../../utils/helpers'; const isSelected = ifStyle('isSelected'); diff --git a/src/components/FormContainer/styles.ts b/src/components/FormContainer/styles.ts index 170051b..171ae28 100644 --- a/src/components/FormContainer/styles.ts +++ b/src/components/FormContainer/styles.ts @@ -1,4 +1,4 @@ import styled from 'styled-components/native'; -import { KeyboardAvoidingView } from '~/components'; +import { KeyboardAvoidingView } from '..'; export const Wrapper = styled(KeyboardAvoidingView)``; diff --git a/src/components/FormError/index.tsx b/src/components/FormError/index.tsx index 345b10b..0c7b761 100644 --- a/src/components/FormError/index.tsx +++ b/src/components/FormError/index.tsx @@ -1,5 +1,5 @@ import React, { FC, ReactNode } from 'react'; -import { FormError as FormErrorType } from '~/types'; +import { FormError as FormErrorType } from '../../utils/types'; import { ErrorText } from './styles'; interface Props { diff --git a/src/components/FormError/styles.ts b/src/components/FormError/styles.ts index bc4a119..661e9f2 100644 --- a/src/components/FormError/styles.ts +++ b/src/components/FormError/styles.ts @@ -1,6 +1,6 @@ import styled from 'styled-components/native'; -import { Typography } from '~/components'; -import { getTheme } from '~/helpers'; +import { Typography } from '..'; +import { getTheme } from '../../utils/helpers'; export const ErrorText = styled(Typography)` min-height: 17px; diff --git a/src/components/Icon/index.tsx b/src/components/Icon/index.tsx index 14160fa..ad6148a 100644 --- a/src/components/Icon/index.tsx +++ b/src/components/Icon/index.tsx @@ -2,9 +2,9 @@ import React, { PureComponent } from 'react'; import { Animated, View } from 'react-native'; import MaterialIcons from 'react-native-vector-icons/MaterialCommunityIcons'; import FontAwesomeIcons from 'react-native-vector-icons/FontAwesome'; -import { IconSets } from '~/types'; -import { Touchable } from '~/components'; -import * as Icons from '~/svg'; +import { IconSets } from '../../utils/types'; +import { Touchable } from '..'; +import * as Icons from '../../assets/svg'; interface Props { name: string; diff --git a/src/components/KeyboardAvoidingView/index.tsx b/src/components/KeyboardAvoidingView/index.tsx index 1b962fd..17cf15a 100644 --- a/src/components/KeyboardAvoidingView/index.tsx +++ b/src/components/KeyboardAvoidingView/index.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import { KeyboardAvoidingView as Wrapper } from 'react-native'; -import { KeyboardAvoiding as KeyboardAvoidingTypes } from '~/types'; -import { isIOS } from '~/helpers'; +import { KeyboardAvoiding as KeyboardAvoidingTypes } from '../../utils/types'; +import { isIOS } from '../../utils/helpers'; const defaultBehavior = isIOS() ? 'padding' : undefined; diff --git a/src/components/Link/index.tsx b/src/components/Link/index.tsx index fbccb5e..13d9c74 100644 --- a/src/components/Link/index.tsx +++ b/src/components/Link/index.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; -import { Touchable } from '~/components'; -import { Variants } from '~/types'; +import { Touchable } from '..'; +import { Variants } from '../../utils/types'; import { Text } from './styles'; interface Props { diff --git a/src/components/Link/styles.ts b/src/components/Link/styles.ts index c82a8c6..e3b3f79 100644 --- a/src/components/Link/styles.ts +++ b/src/components/Link/styles.ts @@ -1,6 +1,6 @@ import styled from 'styled-components/native'; -import { Typography } from '~/components'; -import { getTheme } from '~/helpers'; +import { Typography } from '..'; +import { getTheme } from '../../utils/helpers'; const primaryMain = getTheme('primary.main'); diff --git a/src/components/MenuRow/styles.tsx b/src/components/MenuRow/styles.tsx index bc0c18b..3bb205d 100644 --- a/src/components/MenuRow/styles.tsx +++ b/src/components/MenuRow/styles.tsx @@ -1,6 +1,6 @@ import styled from 'styled-components/native'; -import { getTheme } from '~/helpers'; -import { Touchable, Typography, Icon } from '~/components'; +import { getTheme } from '../../utils/helpers'; +import { Touchable, Typography, Icon } from '..'; const smallSpacing = getTheme('smallSpacing'); diff --git a/src/components/SceneWrapper/index.tsx b/src/components/SceneWrapper/index.tsx index f575200..63f270a 100644 --- a/src/components/SceneWrapper/index.tsx +++ b/src/components/SceneWrapper/index.tsx @@ -1,5 +1,5 @@ import React, { FC } from 'react'; -import { DismissKeyboardView } from '~/components'; +import { DismissKeyboardView } from '..'; import { ChildrenWrapper } from './styles'; interface Props { diff --git a/src/components/SceneWrapper/styles.ts b/src/components/SceneWrapper/styles.ts index 03c1a2d..fbf6e3c 100644 --- a/src/components/SceneWrapper/styles.ts +++ b/src/components/SceneWrapper/styles.ts @@ -4,7 +4,7 @@ import { getBottomSpace, isIphoneX, } from 'react-native-iphone-x-helper'; -import { getTheme, ifStyle } from '~/helpers'; +import { getTheme, ifStyle } from '../../utils/helpers'; const extraPadding = isIphoneX() ? 10 : 0; const statusBarHeight = getStatusBarHeight(); diff --git a/src/components/SelectableButton/styles.ts b/src/components/SelectableButton/styles.ts index f5be60f..f7bd651 100644 --- a/src/components/SelectableButton/styles.ts +++ b/src/components/SelectableButton/styles.ts @@ -1,6 +1,6 @@ import styled from 'styled-components/native'; -import { Touchable, Typography } from '~/components'; -import { getTheme, ifStyle } from '~/helpers'; +import { Touchable, Typography } from '..'; +import { getTheme, ifStyle } from '../../utils/helpers'; const isSelected = ifStyle('isSelected'); const isDisabled = ifStyle('isDisabled'); diff --git a/src/components/SelectableFlatButton/styles.ts b/src/components/SelectableFlatButton/styles.ts index 98b55e1..8b037c1 100644 --- a/src/components/SelectableFlatButton/styles.ts +++ b/src/components/SelectableFlatButton/styles.ts @@ -1,6 +1,6 @@ import styled from 'styled-components/native'; -import { Touchable, Typography } from '~/components'; -import { getTheme, ifStyle } from '~/helpers'; +import { Touchable, Typography } from '..'; +import { getTheme, ifStyle } from '../../utils/helpers'; const isSelected = ifStyle('isSelected'); const primaryContrast = getTheme('primary.contrast'); diff --git a/src/components/SelectableRow/styles.tsx b/src/components/SelectableRow/styles.tsx index 17b526b..93af8eb 100644 --- a/src/components/SelectableRow/styles.tsx +++ b/src/components/SelectableRow/styles.tsx @@ -1,7 +1,7 @@ import React from 'react'; import styled from 'styled-components/native'; -import { getTheme, ifStyle } from '~/helpers'; -import { Touchable, Typography, Icon } from '~/components'; +import { getTheme, ifStyle } from '../../utils/helpers'; +import { Touchable, Typography, Icon } from '..'; const smallIconSize = 24; const bigIconSize = 30; diff --git a/src/components/SettingsSection/styles.ts b/src/components/SettingsSection/styles.ts index ec4f1ca..f774b12 100644 --- a/src/components/SettingsSection/styles.ts +++ b/src/components/SettingsSection/styles.ts @@ -1,6 +1,6 @@ import styled from 'styled-components/native'; -import { Typography } from '~/components'; -import { getTheme } from '~/helpers'; +import { Typography } from '..'; +import { getTheme } from '../../utils/helpers'; const smallSpacing = getTheme('smallSpacing'); const mediumSpacing = getTheme('mediumSpacing'); diff --git a/src/components/SettingsToggle/styles.ts b/src/components/SettingsToggle/styles.ts index 467e0bc..ab13b03 100644 --- a/src/components/SettingsToggle/styles.ts +++ b/src/components/SettingsToggle/styles.ts @@ -1,7 +1,7 @@ import styled from 'styled-components/native'; import { Switch } from 'react-native'; -import { Typography } from '~/components'; -import { getTheme } from '~/helpers'; +import { Typography } from '..'; +import { getTheme } from '../../utils/helpers'; const labelColor = getTheme('primary.contrast'); const toggleColors = getTheme('outcome.light'); diff --git a/src/components/SocialButtons/FacebookButton/index.tsx b/src/components/SocialButtons/FacebookButton/index.tsx index 22cdc28..c63af08 100644 --- a/src/components/SocialButtons/FacebookButton/index.tsx +++ b/src/components/SocialButtons/FacebookButton/index.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import styled from 'styled-components/native'; -import { Button } from '~/components'; +import { Button } from '../..'; const Wrapper = styled(Button).attrs({ sound: true })` background-color: #2d4688; diff --git a/src/components/SocialButtons/GoogleButton/index.tsx b/src/components/SocialButtons/GoogleButton/index.tsx index ffd6f98..b173ff5 100644 --- a/src/components/SocialButtons/GoogleButton/index.tsx +++ b/src/components/SocialButtons/GoogleButton/index.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import styled from 'styled-components/native'; -import { Button } from '~/components'; +import { Button } from '../..'; const Wrapper = styled(Button).attrs({ sound: true })` background-color: #dd2a27; diff --git a/src/components/Stepper/styles.tsx b/src/components/Stepper/styles.tsx index 8d1a704..bcdd7ed 100644 --- a/src/components/Stepper/styles.tsx +++ b/src/components/Stepper/styles.tsx @@ -1,7 +1,7 @@ import React from 'react'; import styled from 'styled-components/native'; -import { Touchable, Typography, Icon as DefaultIcon } from '~/components'; -import { getTheme, ifStyle } from '~/helpers'; +import { Touchable, Typography, Icon as DefaultIcon } from '..'; +import { getTheme, ifStyle } from '../../utils/helpers'; const primaryContrast = getTheme('primary.contrast'); const isDisabled = ifStyle('isDisabled'); diff --git a/src/components/SummaryCard/styles.ts b/src/components/SummaryCard/styles.ts index 2007872..1482e06 100644 --- a/src/components/SummaryCard/styles.ts +++ b/src/components/SummaryCard/styles.ts @@ -1,6 +1,6 @@ import styled from 'styled-components/native'; -import { Typography, Icon as DefaultIcon } from '~/components'; -import { getTheme } from '~/helpers'; +import { Typography, Icon as DefaultIcon } from '..'; +import { getTheme } from '../../utils/helpers'; const mediumSpacing = getTheme('mediumSpacing'); const baseRadius = getTheme('baseRadius'); diff --git a/src/components/TextInput/MaskedTextInput/index.tsx b/src/components/TextInput/MaskedTextInput/index.tsx index 3b618c8..63bc540 100644 --- a/src/components/TextInput/MaskedTextInput/index.tsx +++ b/src/components/TextInput/MaskedTextInput/index.tsx @@ -1,5 +1,5 @@ import React, { FC } from 'react'; -import { MaskedInput as MaskedTextInputType } from '~/types'; +import { MaskedInput as MaskedTextInputType } from '../../../utils/types'; import { TextInput } from './styles'; const MaskedTextInput: FC = ({ diff --git a/src/components/TextInput/PasswordInput/index.tsx b/src/components/TextInput/PasswordInput/index.tsx index 2d45cac..2392a72 100644 --- a/src/components/TextInput/PasswordInput/index.tsx +++ b/src/components/TextInput/PasswordInput/index.tsx @@ -1,5 +1,5 @@ import React, { useState, FC, useCallback } from 'react'; -import { Input as TextInputType } from '~/types'; +import { Input as TextInputType } from '../../../utils/types'; import TextInput from '../index'; const PasswordInput: FC = (props) => { diff --git a/src/components/TextInput/index.tsx b/src/components/TextInput/index.tsx index f64f55a..21bcf5b 100644 --- a/src/components/TextInput/index.tsx +++ b/src/components/TextInput/index.tsx @@ -1,9 +1,9 @@ import React, { FC, useState, useEffect, useCallback } from 'react'; import { Animated, TextInputProps as RNTextInputProps } from 'react-native'; import { isEmpty } from 'lodash'; -import { colors } from '~/theme'; -import { usePrevious } from '~/hooks'; -import { Input as TextInputType, InputStatus } from '~/types'; +import { colors } from '../../theme'; +import { usePrevious } from '../../utils/hooks'; +import { Input as TextInputType, InputStatus } from '../../utils/types'; import MaskedTextInput from './MaskedTextInput'; import { Label, diff --git a/src/components/TextInput/styles.ts b/src/components/TextInput/styles.ts index b69dea3..60f4cb3 100644 --- a/src/components/TextInput/styles.ts +++ b/src/components/TextInput/styles.ts @@ -1,7 +1,7 @@ import styled from 'styled-components/native'; import { Animated } from 'react-native'; -import { ifStyle, switchStyle, getTheme } from '~/helpers'; -import { Input as TextInputType, InputStatus } from '~/types'; +import { ifStyle, switchStyle, getTheme } from '../../utils/helpers'; +import { Input as TextInputType, InputStatus } from '../../utils/types'; interface InputAreaWrapperProps { multiline: boolean; diff --git a/src/components/Touchable/index.tsx b/src/components/Touchable/index.tsx index e0d38ac..3b7848a 100644 --- a/src/components/Touchable/index.tsx +++ b/src/components/Touchable/index.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; -import { Touchable as TouchableType } from '~/types'; -import { generateHaptic } from '~/helpers'; +import { Touchable as TouchableType } from '../../utils/types'; +import { generateHaptic } from '../../utils/helpers'; import { Wrapper, TouchAnimation } from './styles'; const resetTouchableStyle = { diff --git a/src/components/Typography/index.tsx b/src/components/Typography/index.tsx index dfaf327..59c6923 100644 --- a/src/components/Typography/index.tsx +++ b/src/components/Typography/index.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import { human } from 'react-native-typography'; import { withTheme } from 'styled-components'; -import { Typography as TypographyType } from '~/types'; +import { Typography as TypographyType } from '../../utils/types'; import { Text } from './styles'; const Typography: FC = ({ diff --git a/tsconfig.json b/tsconfig.json index c9d3908..aef7d82 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,22 +25,11 @@ "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - "experimentalDecorators": true, /* Module Resolution Options */ "moduleResolution": "node", "allowSyntheticDefaultImports": true, "esModuleInterop": true, - "baseUrl": ".", - "paths": { - "~/svg": ["src/assets/svg"], - "~/images": ["src/assets/images"], - "~/components": ["src/components"], - "~/theme": ["src/theme"], - "~/types": ["src/utils/types"], - "~/hooks": ["src/utils/hooks"], - "~/modules": ["src/utils/modules"], - "~/helpers": ["src/utils/helpers"] - } + "baseUrl": "." }, "include": ["src"], "exclude": [