diff --git a/components/AppInfoFooter.js b/components/AppInfoFooter.js index a8cccad..3c6d2a3 100644 --- a/components/AppInfoFooter.js +++ b/components/AppInfoFooter.js @@ -3,11 +3,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +import Constants from 'expo-constants'; import React, { useContext } from 'react'; +import { useTranslation } from 'react-i18next'; import { StyleSheet, View } from 'react-native'; import { Text, ThemeContext } from 'react-native-elements'; -import Constants from 'expo-constants'; -import { useTranslation } from 'react-i18next'; import { getAppName } from '../utils/Device'; diff --git a/components/BrowserListItem.js b/components/BrowserListItem.js index 40b1855..2233dc1 100644 --- a/components/BrowserListItem.js +++ b/components/BrowserListItem.js @@ -3,9 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { Icon, ListItem } from 'react-native-elements'; import PropTypes from 'prop-types'; import React from 'react'; +import { Icon, ListItem } from 'react-native-elements'; import { openBrowser } from '../utils/WebBrowser'; diff --git a/components/ButtonListItem.js b/components/ButtonListItem.js index 516b36c..6692369 100644 --- a/components/ButtonListItem.js +++ b/components/ButtonListItem.js @@ -3,10 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { Button, ListItem } from 'react-native-elements'; import PropTypes from 'prop-types'; import React from 'react'; import { StyleSheet } from 'react-native'; +import { Button, ListItem } from 'react-native-elements'; const ButtonListItem = ({ item, index }) => ( ( { diff --git a/components/__tests__/AppInfoFooter.test.js b/components/__tests__/AppInfoFooter.test.js index bb160fc..7cdd5cf 100644 --- a/components/__tests__/AppInfoFooter.test.js +++ b/components/__tests__/AppInfoFooter.test.js @@ -3,10 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import * as Device from 'expo-device'; -import Constants from 'expo-constants'; -import React from 'react'; import { render } from '@testing-library/react-native'; +import Constants from 'expo-constants'; +import * as Device from 'expo-device'; +import React from 'react'; import AppInfoFooter from '../AppInfoFooter'; import '../../i18n'; diff --git a/components/__tests__/BrowserListItem.test.js b/components/__tests__/BrowserListItem.test.js index ca5a5a3..1905942 100644 --- a/components/__tests__/BrowserListItem.test.js +++ b/components/__tests__/BrowserListItem.test.js @@ -6,8 +6,8 @@ import { fireEvent, render } from '@testing-library/react-native'; import React from 'react'; -import BrowserListItem from '../BrowserListItem'; import { openBrowser } from '../../utils/WebBrowser'; +import BrowserListItem from '../BrowserListItem'; jest.mock('react-native-elements/src/icons/Icon', () => { const mockComponent = require('react-native/jest/mockComponent'); diff --git a/components/__tests__/SwitchListItem.test.js b/components/__tests__/SwitchListItem.test.js index f87bf4c..eb61274 100644 --- a/components/__tests__/SwitchListItem.test.js +++ b/components/__tests__/SwitchListItem.test.js @@ -5,6 +5,7 @@ */ import { fireEvent, render } from '@testing-library/react-native'; import React from 'react'; + import SwitchListItem from '../SwitchListItem'; describe('SwitchListItem', () => { diff --git a/i18n.js b/i18n.js index 4a5828d..c117d59 100644 --- a/i18n.js +++ b/i18n.js @@ -5,15 +5,15 @@ */ import * as Localization from 'expo-localization'; import i18next from 'i18next'; -import { I18nManager } from 'react-native'; import { initReactI18next } from 'react-i18next'; +import { I18nManager } from 'react-native'; -import en from './langs/en.json'; import ar from './langs/ar.json'; import bg from './langs/bg.json'; import cs from './langs/cs.json'; import da from './langs/da.json'; import de from './langs/de.json'; +import en from './langs/en.json'; import es from './langs/es.json'; import es_419 from './langs/es_419.json'; import es_AR from './langs/es_AR.json'; diff --git a/jest.setup.js b/jest.setup.js index 7b59908..92ad180 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -3,8 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import AbortController from 'node-abort-controller'; -global.AbortController = AbortController; import { enableFetchMocks } from 'jest-fetch-mock'; +import AbortController from 'node-abort-controller'; + +global.AbortController = AbortController; + enableFetchMocks(); diff --git a/navigation/HomeNavigator.js b/navigation/HomeNavigator.js index c41a6bd..01576a0 100644 --- a/navigation/HomeNavigator.js +++ b/navigation/HomeNavigator.js @@ -3,15 +3,15 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import React, { useEffect } from 'react'; +import { useNavigation } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import { observer } from 'mobx-react'; -import { useNavigation } from '@react-navigation/native'; +import React, { useEffect } from 'react'; -import ErrorScreen from '../screens/ErrorScreen'; -import HomeScreen from '../screens/HomeScreen'; import Screens from '../constants/Screens'; import { useStores } from '../hooks/useStores'; +import ErrorScreen from '../screens/ErrorScreen'; +import HomeScreen from '../screens/HomeScreen'; const HomeStack = createStackNavigator(); diff --git a/navigation/TabNavigator.js b/navigation/TabNavigator.js index 6c07aeb..829cb42 100644 --- a/navigation/TabNavigator.js +++ b/navigation/TabNavigator.js @@ -3,19 +3,20 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import React, { useContext } from 'react'; -import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { Ionicons } from '@expo/vector-icons'; +import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { observer } from 'mobx-react'; +import React, { useContext } from 'react'; +import { useTranslation } from 'react-i18next'; import { ThemeContext } from 'react-native-elements'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useTranslation } from 'react-i18next'; -import { getIconName } from '../utils/Icons'; -import HomeNavigator from './HomeNavigator'; import Screens from '../constants/Screens'; -import SettingsScreen from '../screens/SettingsScreen'; import { useStores } from '../hooks/useStores'; +import SettingsScreen from '../screens/SettingsScreen'; +import { getIconName } from '../utils/Icons'; + +import HomeNavigator from './HomeNavigator'; function TabIcon(routeName, color, size) { let iconName = null; diff --git a/screens/ErrorScreen.js b/screens/ErrorScreen.js index 3e45d23..c13ce02 100644 --- a/screens/ErrorScreen.js +++ b/screens/ErrorScreen.js @@ -3,12 +3,12 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +import { useNavigation, useRoute } from '@react-navigation/native'; import React, { useContext, useState } from 'react'; import { Platform, RefreshControl, StyleSheet, View } from 'react-native'; import { ThemeContext } from 'react-native-elements'; import { ScrollView } from 'react-native-gesture-handler'; import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useNavigation, useRoute } from '@react-navigation/native'; import ErrorView from '../components/ErrorView'; import Screens from '../constants/Screens'; diff --git a/screens/HomeScreen.js b/screens/HomeScreen.js index 2513320..a334f7b 100644 --- a/screens/HomeScreen.js +++ b/screens/HomeScreen.js @@ -3,21 +3,21 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +import { useFocusEffect, useNavigation } from '@react-navigation/native'; +import { observer } from 'mobx-react'; import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { BackHandler, Platform, StyleSheet, View } from 'react-native'; import { ThemeContext } from 'react-native-elements'; import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useFocusEffect, useNavigation } from '@react-navigation/native'; -import { observer } from 'mobx-react'; -import { useStores } from '../hooks/useStores'; -import NativeShellWebView from '../components/NativeShellWebView'; import ErrorView from '../components/ErrorView'; +import NativeShellWebView from '../components/NativeShellWebView'; +import VideoPlayer from '../components/VideoPlayer'; import Colors from '../constants/Colors'; import Screens from '../constants/Screens'; +import { useStores } from '../hooks/useStores'; import { getIconName } from '../utils/Icons'; -import VideoPlayer from '../components/VideoPlayer'; const HomeScreen = observer(() => { const { rootStore } = useStores(); diff --git a/screens/LoadingScreen.js b/screens/LoadingScreen.js index 7a28e92..6eb7660 100644 --- a/screens/LoadingScreen.js +++ b/screens/LoadingScreen.js @@ -3,9 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +import * as SplashScreen from 'expo-splash-screen'; import * as React from 'react'; import { ActivityIndicator, Image, StyleSheet, View } from 'react-native'; -import * as SplashScreen from 'expo-splash-screen'; import Colors from '../constants/Colors'; diff --git a/themes/dark/elements.js b/themes/dark/elements.js index da7c432..9de7a24 100644 --- a/themes/dark/elements.js +++ b/themes/dark/elements.js @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import BaseTheme from '../base/elements'; import Colors from '../../constants/Colors'; +import BaseTheme from '../base/elements'; export default { ...BaseTheme, diff --git a/themes/light/elements.js b/themes/light/elements.js index 4f2c894..63d0dde 100644 --- a/themes/light/elements.js +++ b/themes/light/elements.js @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import BaseTheme from '../base/elements'; import Colors from '../../constants/Colors'; +import BaseTheme from '../base/elements'; export default { ...BaseTheme, diff --git a/themes/light/navigation.js b/themes/light/navigation.js index 43d3021..c4258fa 100644 --- a/themes/light/navigation.js +++ b/themes/light/navigation.js @@ -4,6 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { DefaultTheme } from '@react-navigation/native'; + import Colors from '../../constants/Colors'; export default {