mirror of
https://github.com/expo/react-native-community-cli.git
synced 2026-11-14 19:11:48 -10:00
Fixes #107 Summary: --------- Bugs fixed: - "CFBundleIdentifier" printed every time "run-ios" fails, shadowing the real cause for the problem - "run-ios" running a previous/cached version of an app (usually when there was an error during build step that was ignored) Changes made: - Decided to turn Flow and ESLint and apply all the changes as I am working on it. I know the diff might be strange at first sight, but if you look closely, it's just cosmetics to satisfy various rules - I also extracted some blocks to separate utilities for better readability - I also removed a no longer needed check for CRNA which is deprecated (and IMO, is not needed) - Converted few functions to "async" form for better readability - Started capturing the "stderr" of "xcodebuild" and started relying on its error code in order to avoid going to next step when it fails - Added a new type of error to differentiate from other errors and also be able to capture additional data. Logic and styling subject to change, encapsulated inside Logger. Test Plan: ---------- Here's how the error messages look before/now: While try to build a project with a wrong "schema" : Before: <img width="882" alt="screenshot 2019-01-31 at 18 07 43" src="https://user-images.githubusercontent.com/2464966/52071369-200a4c00-2583-11e9-8700-28766daae122.png"> After: <img width="880" alt="screenshot 2019-01-31 at 18 05 23" src="https://user-images.githubusercontent.com/2464966/52071244-d91c5680-2582-11e9-83e7-e9e549a570cc.png"> While building a project that has a typo in "AppDelegate.m": Before: <img width="885" alt="screenshot 2019-01-31 at 18 08 19" src="https://user-images.githubusercontent.com/2464966/52071411-344e4900-2583-11e9-8613-96ddf6c68006.png"> After: <img width="886" alt="screenshot 2019-01-31 at 18 06 36" src="https://user-images.githubusercontent.com/2464966/52071300-f6e9bb80-2582-11e9-9c9f-3a4b67318119.png"> You can try it out by running `run-ios` command on a broken project (typo, wrong configuration) or by passing a non-existing `schema`
68 lines
1.7 KiB
Plaintext
68 lines
1.7 KiB
Plaintext
[ignore]
|
|
|
|
; Ignore templates for 'react-native init'
|
|
.*/templates/.*
|
|
|
|
; Ignore "BUCK" generated dirs
|
|
<PROJECT_ROOT>/\.buckd/
|
|
|
|
; Ignore unexpected extra "@providesModule"
|
|
.*/node_modules/.*/node_modules/fbjs/.*
|
|
|
|
; These should not be required directly
|
|
; require from fbjs/lib instead: require('fbjs/lib/invariant')
|
|
.*/node_modules/invariant/.*
|
|
.*/node_modules/warning/.*
|
|
|
|
[untyped]
|
|
.*/node_modules/metro.*/.*
|
|
|
|
[include]
|
|
flow-typed
|
|
|
|
[options]
|
|
emoji=true
|
|
|
|
esproposal.optional_chaining=enable
|
|
esproposal.nullish_coalescing=enable
|
|
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
|
|
|
suppress_type=$FlowIssue
|
|
suppress_type=$FlowFixMe
|
|
suppress_type=$FlowFixMeProps
|
|
suppress_type=$FlowFixMeState
|
|
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
|
|
|
module.ignore_non_literal_requires=true
|
|
|
|
[lints]
|
|
all=warn
|
|
unnecessary-optional-chain=off
|
|
|
|
# There is an ESLint rule for this
|
|
unclear-type=off
|
|
|
|
sketchy-null=off
|
|
sketchy-null-number=warn
|
|
sketchy-null-mixed=warn
|
|
|
|
# This is noisy for now. We *do* still want to warn on importing types
|
|
# from untyped files, which is covered by untyped-type-import
|
|
untyped-import=off
|
|
|
|
[strict]
|
|
deprecated-type
|
|
nonstrict-import
|
|
sketchy-null
|
|
unclear-type
|
|
unsafe-getters-setters
|
|
untyped-import
|
|
untyped-type-import
|
|
|
|
[version]
|
|
^0.87.0
|