mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:54:57 -06:00
linting and type checking stuff
This commit is contained in:
parent
5d5ce50793
commit
bb9bc5ab7e
5 changed files with 4442 additions and 30 deletions
17
.eslintrc
Normal file
17
.eslintrc
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"plugins": [
|
||||
"react",
|
||||
"react-native"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"rules": {
|
||||
// overrides
|
||||
}
|
||||
}
|
||||
2
.flowconfig
Normal file
2
.flowconfig
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[library]
|
||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
||||
|
|
@ -4,27 +4,17 @@
|
|||
* @flow
|
||||
*/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import {
|
||||
AppRegistry,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View
|
||||
} from 'react-native';
|
||||
import React, { Component } from "react";
|
||||
import { AppRegistry, StyleSheet, Text, View, Navigator } from "react-native";
|
||||
|
||||
class WelcomeView extends Component {
|
||||
props: { title: string };
|
||||
|
||||
export default class AreThereCookies extends Component {
|
||||
render() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.welcome}>
|
||||
Welcome to React Native!
|
||||
</Text>
|
||||
<Text style={styles.instructions}>
|
||||
To get started, edit index.android.js
|
||||
</Text>
|
||||
<Text style={styles.instructions}>
|
||||
Double tap R on your keyboard to reload,{'\n'}
|
||||
Shake or press menu button for dev menu
|
||||
{this.props.title}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
|
|
@ -34,20 +24,23 @@ export default class AreThereCookies extends Component {
|
|||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#F5FCFF',
|
||||
},
|
||||
welcome: {
|
||||
fontSize: 20,
|
||||
textAlign: 'center',
|
||||
margin: 10,
|
||||
},
|
||||
instructions: {
|
||||
textAlign: 'center',
|
||||
color: '#333333',
|
||||
marginBottom: 5,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
backgroundColor: "#F5FCFF"
|
||||
},
|
||||
welcome: { fontSize: 20, textAlign: "center", margin: 10 },
|
||||
instructions: { textAlign: "center", color: "#333333", marginBottom: 5 }
|
||||
});
|
||||
|
||||
AppRegistry.registerComponent('AreThereCookies', () => AreThereCookies);
|
||||
export default class AreThereCookies extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Navigator
|
||||
initialRoute={{ title: "AreThereCookies?", index: 0 }}
|
||||
renderScene={(route, navigator) => <WelcomeView title={route.title} />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
AppRegistry.registerComponent("AreThereCookies", () => AreThereCookies);
|
||||
|
|
|
|||
|
|
@ -12,9 +12,15 @@
|
|||
"react-native": "^0.40.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^7.1.1",
|
||||
"babel-jest": "18.0.0",
|
||||
"babel-preset-react-native": "1.9.1",
|
||||
"eslint": "^3.14.1",
|
||||
"eslint-plugin-react": "^6.9.0",
|
||||
"eslint-plugin-react-native": "^2.2.1",
|
||||
"flow-bin": "^0.38.0",
|
||||
"jest": "18.1.0",
|
||||
"jshint": "^2.9.4",
|
||||
"react-test-renderer": "15.4.2"
|
||||
},
|
||||
"jest": {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue