Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"plugins": [
[
"react-intl", {
"messagesDir": "./intl/messages",
"messagesDir": "./src/intl/messages",
"enforceDescriptions": false
}
]
Expand Down
111 changes: 0 additions & 111 deletions .eslintrc

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ fastlane/screenshots
coverage/

flow-typed/npm

build/
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"vsicons.presets.angular": false,
"typescript.validate.enable": true,
"tslint.enable": true
}
11 changes: 11 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-w", "-p", "."],
"showOutput": "silent",
"isBackground": true,
"problemMatcher": "$tsc-watch"
}
2 changes: 1 addition & 1 deletion index.android.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import './src/main'
import './build/main'
2 changes: 1 addition & 1 deletion index.ios.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import './src/main'
import './build/main'
18 changes: 13 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"ios": "react-native run-ios && yarn run build:strings",
"install": "flow-typed update",
"lint": "eslint src __tests__",
"lint": "tslint",
"lint:fix": "eslint --fix src __tests__",
"start": "concurrently \"react-native run-ios\" \"ANDROID_HOME=/Users/$(whoami)/Library/Android/sdk react-native run-android\" && yarn run build:strings",
"test": "npm run lint && npm run test:jest-no-cache",
Expand All @@ -21,10 +21,18 @@
"test:update-snapshots": "jest --coverage --no-cache -u"
},
"dependencies": {
"@types/graphql": "^0.8.6",
"@types/react": "^15.0.12",
"@types/react-intl": "^2.2.2",
"@types/react-native": "^0.37.13",
"@types/react-redux": "^4.4.36",
"@types/redux": "^3.6.0",
"@types/redux-persist": "^4.0.0",
"apollo-client": "^0.5.25",
"graphql": "^0.6.1",
"graphql-tag": "^0.1.7",
"graphql-tools": "^0.6.2",
"graphql-typings": "^0.0.1-beta-2",
"react": "~15.4.0-rc.4",
"react-apollo": "^0.7.2",
"react-intl": "^2.2.3",
Expand All @@ -43,11 +51,9 @@
"babel-core": "^6.8.0",
"babel-eslint": "^6.1.0",
"babel-jest": "18.0.0",
"babel-loader": "^6.2.4",
"babel-plugin-react-intl": "^2.3.1",
"babel-preset-react-native": "1.9.1",
"concurrently": "^3.1.0",
"eslint": "^3.13.0",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-babel": "^3.3.0",
"eslint-plugin-flowtype": "^2.29.1",
Expand All @@ -61,7 +67,9 @@
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
"react-test-renderer": "15.4.1",
"redux-mock-store": "^1.2.1"
"redux-mock-store": "^1.2.1",
"tslint": "^4.5.1",
"typescript": "^2.2.1"
},
"jest": {
"preset": "react-native",
Expand All @@ -74,7 +82,7 @@
"/__tests__/__setup__.js"
],
"modulePaths": [
"src",
"build",
"/node_modules/"
],
"setupFiles": [
Expand Down
6 changes: 3 additions & 3 deletions scripts/buildLocalizedStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const fs = require('fs')
const globSync = require('glob').sync
const mkdirpSync = require('mkdirp').sync

const filePattern = './intl/messages/**/*.json'
const outputDir = './intl/locales/'
const filePattern = './src/intl/messages/**/*.json'
const outputDir = './src/intl/locales/'

const messages = globSync(filePattern)
.map((filename) => fs.readFileSync(filename, 'utf8'))
Expand All @@ -35,4 +35,4 @@ const defaultJson = JSON.stringify(JSON.parse(`{ "en": ${messagesJson} }`), null
// This is what we send for translations
fs.writeFileSync(outputDir + '_default.json', defaultJson, null, 2)
// This is `en`, our default locale
fs.writeFileSync(outputDir + 'default.js', `/* eslint-disable quotes */\nexport default ${messagesJson}\n`, null, 2)
fs.writeFileSync(outputDir + 'default.tsx', `/* eslint-disable quotes */\nexport default ${messagesJson}\n`, null, 2)
2 changes: 0 additions & 2 deletions src/app/Root.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* @flow */

// React
import React, { Component } from 'react' // eslint-disable-line no-unused-vars

Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* @flow */

// React
import React from 'react' // eslint-disable-line no-unused-vars
import { AppRegistry, AsyncStorage, Platform } from 'react-native'
Expand Down
7 changes: 4 additions & 3 deletions src/redux/ducks/config.js → src/redux/ducks/config.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* @flow */

import type { ConfigState } from '../../types'
export interface ConfigState {
appName: string,
appVersion: string
}

const initialState = {
appName: '',
Expand Down
8 changes: 0 additions & 8 deletions src/redux/ducks/constants.js

This file was deleted.

7 changes: 4 additions & 3 deletions src/redux/ducks/device.js → src/redux/ducks/device.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* @flow */

import type { DeviceState } from '../../types'
export interface DeviceState {
isReactNative: boolean,
platform: string
}

const initialState = {
isReactNative: false,
Expand Down
60 changes: 0 additions & 60 deletions src/redux/ducks/intl.js

This file was deleted.

Loading