Skip to content

Added eslint-plugin-flowtype-errors support, updated deps #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
8 changes: 5 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},

"plugins": [
"react"
"react",
"flowtype-errors"
],

// Map from global var to bool specifying if it can be redefined
Expand Down Expand Up @@ -62,6 +63,7 @@
"no-func-assign": 1, // disallow overwriting functions written as function declarations
"no-inner-declarations": 0, // disallow function or variable declarations in nested blocks
"no-invalid-regexp": 1, // disallow invalid regular expression strings in the RegExp constructor
"flowtype-errors/show-errors": 2, // Report Flowtype errors as ESLint errors
"no-negated-in-lhs": 1, // disallow negation of the left operand of an in expression
"no-obj-calls": 1, // disallow the use of object properties of the global object (Math and JSON) as functions
"no-regex-spaces": 1, // disallow multiple spaces in a regular expression literal
Expand Down Expand Up @@ -204,8 +206,8 @@
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 0,
"react/jsx-uses-vars": 1,
"react/no-did-mount-set-state": [1, "allow-in-func"],
"react/no-did-update-set-state": [1, "allow-in-func"],
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-multi-comp": 0,
"react/no-unknown-property": 0,
"react/prop-types": 0,
Expand Down
3 changes: 0 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,3 @@ suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-5]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-5]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

[version]
^0.25.0
2 changes: 1 addition & 1 deletion app/utils/data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @flow */
// @flow
exports.mock = [{
AfterHoursChangeRealtime: null,
AnnualizedGain: null,
Expand Down
2 changes: 1 addition & 1 deletion app/utils/finance.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @flow */
// @flow
exports.getStock = function(opts: Object, type: string) : Object {
var defs = {
baseURL: 'http://query.yahooapis.com/v1/public/yql?q=',
Expand Down
2 changes: 1 addition & 1 deletion app/utils/functions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @flow */
// @flow
exports.dynamicSort = function(property: string) : Function {
var sortOrder = 1;
if (property[0] === '-') {
Expand Down
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"lint": "eslint app android ios . *.js",
"build-android": "npm run release-android; osascript -e 'display notification \"DONE!\" with title \"Android built\"'",
"bundle-android": "$NVM_BIN/react-native bundle --platform android --dev false --entry-file ./index.android.js --bundle-output android/app/src/main/assets/index.android.bundle # --assets-dest android/app/src/main/res/",
"release-android": "cd android && ./gradlew assembleRelease && cd .."
Expand All @@ -28,19 +29,20 @@
},
"homepage": "https://github.com/7kfpun/FinanceReactNative#readme",
"dependencies": {
"alt": "^0.18.4",
"moment": "^2.13.0",
"react": "15.0.2",
"react-native": "0.26.3",
"react-native-navbar": "^1.5.0",
"react-native-router-flux": "^3.26.24",
"react-native-simple-store": "^1.0.1",
"react-native-vector-icons": "^2.0.3",
"rn-viewpager": "^1.1.2"
"alt": "^0.18.6",
"moment": "^2.15.1",
"react": "15.3.2",
"react-native": "0.34.1",
"react-native-navbar": "^1.5.4",
"react-native-router-flux": "^3.35.0",
"react-native-simple-store": "^1.1.0",
"react-native-vector-icons": "^2.1.0",
"rn-viewpager": "^1.1.3"
},
"devDependencies": {
"babel-eslint": "^6.0.4",
"eslint": "^2.11.1",
"eslint-plugin-react": "^5.1.1"
"babel-eslint": "^7.0.0",
"eslint": "^3.7.1",
"eslint-plugin-flowtype-errors": "^1.3.1",
"eslint-plugin-react": "^6.3.0"
}
}