From 99cacf4830caef093dac7c90ba5c8a819729055e Mon Sep 17 00:00:00 2001 From: empyrical Date: Wed, 26 Sep 2018 16:49:07 -0700 Subject: [PATCH] package.json: Add flow check commands for iOS and Android (#21326) Summary: This PR adds these two scripts to `package.json`: * `flow-check-ios` - for running `flow check` on `.ios.js` files * `flow-check-android` - for running `flow check` on `.android.js` files The Android command makes use of the new `--flowconfig-name` option added to Flow in `0.80.0` Pull Request resolved: https://github.com/facebook/react-native/pull/21326 Differential Revision: D10055702 Pulled By: hramos fbshipit-source-id: e647f8d2995da0a9bd6af242218819fd5745df63 --- .circleci/config.yml | 13 +++++++++---- package.json | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a8a4a8b4d..1b28b421d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -185,9 +185,13 @@ aliases: name: Lint code command: scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ~/react-native/reports/junit/eslint/results.xml - - &run-flow-checks - name: Check for errors in code using Flow - command: yarn flow check + - &run-flow-checks-ios + name: Check for errors in code using Flow (iOS) + command: yarn flow-check-ios + + - &run-flow-checks-android + name: Check for errors in code using Flow (Android) + command: yarn flow-check-android - &run-sanity-checks name: Sanity checks @@ -377,7 +381,8 @@ jobs: at: ~/react-native - run: *run-lint-checks - - run: *run-flow-checks + - run: *run-flow-checks-ios + - run: *run-flow-checks-android - store_test_results: path: ~/react-native/reports/junit diff --git a/package.json b/package.json index 5644e56ad..baa7657ae 100644 --- a/package.json +++ b/package.json @@ -126,6 +126,8 @@ "test": "jest", "test-ci": "JEST_JUNIT_OUTPUT=\"reports/junit/js-test-results.xml\" jest --maxWorkers=2 --ci --testResultsProcessor=\"jest-junit\"", "flow": "flow", + "flow-check-ios": "flow check", + "flow-check-android": "flow check --flowconfig-name .flowconfig.android", "lint": "eslint .", "prettier": "prettier \"./**/*.js\" --write", "docker-setup-android": "docker pull reactnativeci/android-base:latest",