diff --git a/.eslintrc.js b/.eslintrc.js index d945e89d..8023a86e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { parserOptions: { ...base.parserOptions, project: [ - './tsconfig.eslint.json' + './tsconfig.json' ] } }; diff --git a/package.json b/package.json index 64795b1d..95977870 100644 --- a/package.json +++ b/package.json @@ -31,12 +31,10 @@ "devDependencies": { "@babel/core": "^7.6.4", "@babel/runtime": "^7.6.3", - "@polkadot/dev-react": "^0.32.0-beta.10", - "@polkadot/ts": "^0.1.81", - "@types/react-native": "^0.60.21", + "@polkadot/dev-react": "^0.32.0-beta.11", + "@polkadot/ts": "^0.1.82", "babel-plugin-transform-vue-template": "^0.4.2", "empty": "^0.10.1", - "react-native": "^0.61.2", - "webpack-serve": "^3.2.0" + "react-native": "^0.61.2" } } diff --git a/packages/exampleReactNative/App.tsx b/packages/exampleReactNative/App.tsx index 58add3d4..6cce5be6 100644 --- a/packages/exampleReactNative/App.tsx +++ b/packages/exampleReactNative/App.tsx @@ -3,24 +3,12 @@ // of the Apache-2.0 license. See the LICENSE file for details. import React, { useEffect, useState } from 'react'; -import { - SafeAreaView, - StyleSheet, - ScrollView, - View, - Text, - StatusBar, - Button -} from 'react-native'; - -import { - Colors -} from 'react-native/Libraries/NewAppScreen'; - +import { Button, SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, View } from 'react-native'; +import { Colors } from 'react-native/Libraries/NewAppScreen'; import Identicon from '@polkadot/reactnative-identicon'; +import keyring from '@polkadot/ui-keyring'; import settings from '@polkadot/ui-settings'; import { mnemonicGenerate, cryptoWaitReady } from '@polkadot/util-crypto'; -import keyring from '@polkadot/ui-keyring'; const styles = StyleSheet.create({ scrollView: { @@ -56,9 +44,9 @@ const styles = StyleSheet.create({ } }); -const globalAny: any = global; +const globalAny = global as unknown as Window; -const App = () => { +export default function App (): React.ReactElement<{}> | null { const [ready, setReady] = useState(false); const [address, setAddress] = useState(null); const [phrase, setPhrase] = useState(null); @@ -138,7 +126,11 @@ const App = () => { {settings.availablePrefixes .filter((_, index): boolean => index !== 0) .map(({ text, value }): React.ReactNode => ( -