Skip to content

Commit 427ab63

Browse files
empyricalfacebook-github-bot
authored andcommitted
package.json: Add flow check commands for iOS and Android (facebook#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: facebook#21326 Differential Revision: D10055702 Pulled By: hramos fbshipit-source-id: e647f8d2995da0a9bd6af242218819fd5745df63
1 parent a9be96b commit 427ab63

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.circleci/config.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,13 @@ aliases:
185185
name: Lint code
186186
command: scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ~/react-native/reports/junit/eslint/results.xml
187187

188-
- &run-flow-checks
189-
name: Check for errors in code using Flow
190-
command: yarn flow check
188+
- &run-flow-checks-ios
189+
name: Check for errors in code using Flow (iOS)
190+
command: yarn flow-check-ios
191+
192+
- &run-flow-checks-android
193+
name: Check for errors in code using Flow (Android)
194+
command: yarn flow-check-android
191195

192196
- &run-sanity-checks
193197
name: Sanity checks
@@ -377,7 +381,8 @@ jobs:
377381
at: ~/react-native
378382

379383
- run: *run-lint-checks
380-
- run: *run-flow-checks
384+
- run: *run-flow-checks-ios
385+
- run: *run-flow-checks-android
381386

382387
- store_test_results:
383388
path: ~/react-native/reports/junit

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@
126126
"test": "jest",
127127
"test-ci": "JEST_JUNIT_OUTPUT=\"reports/junit/js-test-results.xml\" jest --maxWorkers=2 --ci --testResultsProcessor=\"jest-junit\"",
128128
"flow": "flow",
129+
"flow-check-ios": "flow check",
130+
"flow-check-android": "flow check --flowconfig-name .flowconfig.android",
129131
"lint": "eslint .",
130132
"prettier": "prettier \"./**/*.js\" --write",
131133
"docker-setup-android": "docker pull reactnativeci/android-base:latest",

0 commit comments

Comments
 (0)