Skip to content

Commit 612341d

Browse files
committed
feat: update components and files to fix eslint issues
1 parent 6079a28 commit 612341d

File tree

12 files changed

+27
-35
lines changed

12 files changed

+27
-35
lines changed

env.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-env node */
12
/*
23
* Env file to load and validate env variables
34
* Be cautious; this file should not be imported into your source folder.

index.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

metro.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-env node */
2+
13
const { getDefaultConfig } = require('expo/metro-config');
24
const { withNativeWind } = require('nativewind/metro');
35

src/app/_layout.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
// Import global CSS file
2+
import '../../global.css';
3+
14
import { useReactNavigationDevTools } from '@dev-plugins/react-navigation';
25
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
36
import { ThemeProvider } from '@react-navigation/native';
47
import { SplashScreen, Stack, useNavigationContainerRef } from 'expo-router';
8+
import React from 'react';
59
import { StyleSheet } from 'react-native';
610
import FlashMessage from 'react-native-flash-message';
711
import { GestureHandlerRootView } from 'react-native-gesture-handler';
@@ -13,11 +17,6 @@ import { useThemeConfig } from '@/core/use-theme-config';
1317

1418
export { ErrorBoundary } from 'expo-router';
1519

16-
// Import global CSS file
17-
import '../../global.css';
18-
19-
import React from 'react';
20-
2120
export const unstable_settings = {
2221
initialRouteName: '(app)',
2322
};

src/components/inputs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react';
22

3-
import type { Option } from '@/ui';
3+
import type { OptionType } from '@/ui';
44
import { Input, Select, View } from '@/ui';
55
import { Checkbox, Radio, Switch } from '@/ui';
66

77
import { Title } from './title';
88

9-
const options: Option[] = [
9+
const options: OptionType[] = [
1010
{ value: 'chocolate', label: 'Chocolate' },
1111
{ value: 'strawberry', label: 'Strawberry' },
1212
{ value: 'vanilla', label: 'Vanilla' },

src/components/settings/items-container.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const ItemsContainer = ({ children, title }: Props) => {
1313
<>
1414
{title && <Text className="pb-2 pt-4 text-lg" tx={title} />}
1515
{
16-
<View className=" rounded-md border-[1px] border-neutral-200 dark:border-neutral-700 dark:bg-neutral-800">
16+
<View className=" rounded-md border border-neutral-200 dark:border-neutral-700 dark:bg-neutral-800">
1717
{children}
1818
</View>
1919
}

src/components/settings/language-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from 'react';
33
import { useSelectedLanguage } from '@/core';
44
import { translate } from '@/core';
55
import type { Language } from '@/core/i18n/resources';
6-
import type { Option } from '@/ui';
6+
import type { OptionType } from '@/ui';
77
import { Options, useModal } from '@/ui';
88

99
import { Item } from './item';
@@ -12,7 +12,7 @@ export const LanguageItem = () => {
1212
const { language, setLanguage } = useSelectedLanguage();
1313
const modal = useModal();
1414
const onSelect = React.useCallback(
15-
(option: Option) => {
15+
(option: OptionType) => {
1616
setLanguage(option.value as Language);
1717
modal.dismiss();
1818
},

src/components/settings/theme-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22

33
import type { ColorSchemeType } from '@/core';
44
import { translate, useSelectedTheme } from '@/core';
5-
import type { Option } from '@/ui';
5+
import type { OptionType } from '@/ui';
66
import { Options, useModal } from '@/ui';
77

88
import { Item } from './item';
@@ -12,7 +12,7 @@ export const ThemeItem = () => {
1212
const modal = useModal();
1313

1414
const onSelect = React.useCallback(
15-
(option: Option) => {
15+
(option: OptionType) => {
1616
setSelectedTheme(option.value as ColorSchemeType);
1717
modal.dismiss();
1818
},

src/ui/checkbox.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ export const SwitchIcon = ({ checked = false }: IconProps) => {
219219
/>
220220
</View>
221221
<MotiView
222-
// eslint-disable-next-line react-native/no-inline-styles
223-
style={{
222+
style={{
224223
height: THUMB_HEIGHT,
225224
width: THUMB_WIDTH,
226225
position: 'absolute',

src/ui/modal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ const CustomBackdrop = ({ style }: BottomSheetBackdropProps) => {
121121
onPress={() => close()}
122122
entering={FadeIn.duration(50)}
123123
exiting={FadeOut.duration(20)}
124-
// eslint-disable-next-line react-native/no-inline-styles
125124
style={[style, { backgroundColor: 'rgba(0, 0, 0, 0.4)' }]}
126125
/>
127126
);

0 commit comments

Comments
 (0)