Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit 7d3307e

Browse files
committed
Fix lint errors
1 parent eb043ed commit 7d3307e

7 files changed

Lines changed: 13 additions & 18 deletions

File tree

example/.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "../.eslintrc",
33

44
"settings": {
5-
"import/core-modules": [ "expo", "@react-navigation/core" ]
5+
"import/core-modules": [ "expo", "@react-navigation/core", "react-navigation-stack" ]
66
},
77

88
"rules": {

example/App.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import Expo from 'expo';
33
import { FlatList, I18nManager } from 'react-native';
44
import { createAppContainer } from '@react-navigation/native';
5+
56
import {
67
Assets as StackAssets,
78
createStackNavigator,
@@ -11,13 +12,13 @@ import { ListSection, Divider } from 'react-native-paper';
1112
import SimpleStack from './src/SimpleStack';
1213
import SimpleTabs from './src/SimpleTabs';
1314

14-
// Comment the following two lines to stop using react-native-screens
15-
import { useScreens } from 'react-native-screens';
15+
// Comment/uncomment the following two lines to toggle react-native-screens
16+
// import { useScreens } from 'react-native-screens';
17+
// useScreens();
1618

1719
// Uncomment the following line to force RTL. Requires closing and re-opening
1820
// your app after you first load it with this option enabled.
1921
I18nManager.forceRTL(false);
20-
// useScreens();
2122

2223
const data = [
2324
{ component: SimpleStack, title: 'Simple Stack', routeName: 'SimpleStack' },

example/src/SimpleStack.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
import React from 'react';
2-
import {
3-
Dimensions,
4-
Button,
5-
ScrollView,
6-
TouchableOpacity,
7-
View,
8-
Text,
9-
} from 'react-native';
2+
import { Button, ScrollView, TouchableOpacity, View, Text } from 'react-native';
103
import { MaterialIcons } from 'react-native-vector-icons';
11-
import { withNavigation } from '@react-navigation/core';
124
import { createStackNavigator } from 'react-navigation-stack';
135

146
const LOREM_PAGE_ONE = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in lacus malesuada tellus bibendum fringilla. Integer suscipit suscipit erat, sed molestie eros. Nullam fermentum odio vel mauris pulvinar accumsan. Duis blandit id nulla ac euismod. Nunc nec convallis mauris. Proin sit amet malesuada orci. Aliquam blandit mattis nisi ut eleifend. Morbi blandit ante neque, eu tincidunt est interdum in. Mauris pellentesque euismod nulla. Mauris posuere egestas nulla, sit amet eleifend quam egestas at. Maecenas odio erat, auctor eu consectetur eu, vulputate nec arcu. Praesent in felis massa. Nunc fermentum, massa vitae ultricies dictum, est mi posuere eros, sit amet posuere mi ante ac nulla. Etiam odio libero, tempor sit amet sagittis sed, fermentum ac lorem. Donec dignissim fermentum velit, ac ultrices nulla tristique vel.

example/src/SimpleTabs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Feather } from '@expo/vector-icons';
66
class Screen extends React.Component {
77
static navigationOptions = ({ navigation }) => ({
88
tabBarLabel: navigation.getParam('title'),
9-
tabBarIcon: ({ focused, tintColor }) => (
9+
tabBarIcon: ({ tintColor }) => (
1010
<Feather size={25} name={navigation.getParam('icon')} color={tintColor} />
1111
),
1212
});

src/getChildEventSubscriber.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,12 @@ export default function getChildEventSubscriber(addListener, key) {
169169
},
170170
emit(eventName, payload) {
171171
if (eventName !== 'refocus') {
172-
console.error(`navigation.emit only supports the 'refocus' event currently.`);
172+
console.error(
173+
`navigation.emit only supports the 'refocus' event currently.`
174+
);
173175
return;
174176
}
175177
emit(eventName, payload);
176-
}
178+
},
177179
};
178180
}

src/getNavigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function getNavigation(
3939
};
4040
},
4141
dangerouslyGetParent: () => null,
42-
_childrenNavigation: getChildrenNavigationCache(getCurrentNavigation())
42+
_childrenNavigation: getChildrenNavigationCache(getCurrentNavigation()),
4343
};
4444

4545
const actionCreators = {

src/routers/__tests__/StackRouter-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ describe('StackRouter', () => {
13071307
{
13081308
Foo: {
13091309
screen: FooScreen,
1310-
params: { foo: 'not-bar', meaning: 42 }
1310+
params: { foo: 'not-bar', meaning: 42 },
13111311
},
13121312
},
13131313
{ initialRouteName: 'Foo', initialRouteParams: { foo: 'bar' } }

0 commit comments

Comments
 (0)