Update/Fix Prettier + Eslint config for codebase

Run Prettier/Eslint on entire codebase, fix issues
This commit is contained in:
Adam Miskiewicz
2017-05-14 12:14:12 -07:00
committed by Adam Miskiewicz
parent a301b41479
commit f3a958dca1
94 changed files with 3630 additions and 3846 deletions

View File

@@ -6,6 +6,7 @@
"test": "jest"
},
"dependencies": {
"prop-types": "^15.5.10",
"react": "16.0.0-alpha.6",
"react-native": "0.43.3",
"react-redux": "5.0.4",

View File

@@ -22,7 +22,8 @@ const mapStateToProps = state => ({
const mapDispatchToProps = dispatch => ({
logout: () => dispatch({ type: 'Logout' }),
loginScreen: () => dispatch(NavigationActions.navigate({ routeName: 'Login' })),
loginScreen: () =>
dispatch(NavigationActions.navigate({ routeName: 'Login' })),
});
export default connect(mapStateToProps, mapDispatchToProps)(AuthButton);

View File

@@ -1,10 +1,5 @@
import React, { PropTypes } from 'react';
import {
Button,
StyleSheet,
Text,
View,
} from 'react-native';
import { Button, StyleSheet, Text, View } from 'react-native';
const styles = StyleSheet.create({
container: {

View File

@@ -1,11 +1,6 @@
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import {
Button,
StyleSheet,
Text,
View,
} from 'react-native';
import { Button, StyleSheet, Text, View } from 'react-native';
import { NavigationActions } from 'react-navigation';
const styles = StyleSheet.create({
@@ -26,7 +21,8 @@ const LoginStatusMessage = ({ isLoggedIn, dispatch }) => {
{'You are "logged in" right now'}
</Text>
<Button
onPress={() => dispatch(NavigationActions.navigate({ routeName: 'Profile' }))}
onPress={() =>
dispatch(NavigationActions.navigate({ routeName: 'Profile' }))}
title="Profile"
/>
</View>

View File

@@ -1,9 +1,5 @@
import React from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
import { StyleSheet, Text, View } from 'react-native';
const styles = StyleSheet.create({
container: {

View File

@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { addNavigationHelpers, StackNavigator } from 'react-navigation';

View File

@@ -7,16 +7,25 @@ import { AppNavigator } from '../navigators/AppNavigator';
const firstAction = AppNavigator.router.getActionForPathAndParams('Main');
const tempNavState = AppNavigator.router.getStateForAction(firstAction);
const secondAction = AppNavigator.router.getActionForPathAndParams('Login');
const initialNavState = AppNavigator.router.getStateForAction(secondAction, tempNavState);
const initialNavState = AppNavigator.router.getStateForAction(
secondAction,
tempNavState
);
function nav(state = initialNavState, action) {
let nextState;
switch (action.type) {
case 'Login':
nextState = AppNavigator.router.getStateForAction(NavigationActions.back(), state);
nextState = AppNavigator.router.getStateForAction(
NavigationActions.back(),
state
);
break;
case 'Logout':
nextState = AppNavigator.router.getStateForAction(NavigationActions.navigate({ routeName: 'Login' }), state);
nextState = AppNavigator.router.getStateForAction(
NavigationActions.navigate({ routeName: 'Login' }),
state
);
break;
default:
nextState = AppNavigator.router.getStateForAction(action, state);

View File

@@ -2471,7 +2471,7 @@ longest@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
loose-envify@^1.0.0, loose-envify@^1.1.0:
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
dependencies:
@@ -2908,6 +2908,13 @@ prop-types@^15.0.0, prop-types@^15.5.8:
dependencies:
fbjs "^0.8.9"
prop-types@^15.5.10:
version "15.5.10"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154"
dependencies:
fbjs "^0.8.9"
loose-envify "^1.3.1"
prr@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"