react-native/Libraries
Brent Vatne a564af853f Throw flow error when trying to access a style that is not defined on a stylesheet
Summary:
I thought it would be useful to help clear out references to no longer used styles and also catch typos on style names to have flow error when we try to access a style that isn't defined.

Example:

```javascript
export default class AuthenticationScreen extends React.Component {
  render() {
    // This throws an error because `continer` is misspelled
    return (
      <View style={styles.continer} />
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
}
```

```javascript
export default class AuthenticationScreen extends React.Component {
  render() {
    // This throws an error because no fancyContainer style is defined
    return (
      <View style={[styles.container, styles.fancyContainer]} />
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
}
```

All credit goes to jeffmo in this tweet: https://twitter.com/lbljeffmo/status/755179096271888385

Also included in the PR is some cleanup on styles that
Closes https://github.com/facebook/react-native/pull/8876

Differential Revision: D3584983

Pulled By: yungsters

fbshipit-source-id: 0ee0e12ff3d976c137d932688e323c26690e0a52
2016-07-18 23:28:25 -07:00
..
ART Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
ActionSheetIOS Update RCTActionSheetManager.m 2016-06-04 16:28:19 -07:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated Delete AnimatedNative-test 2016-07-11 19:43:21 -07:00
AppRegistry Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
AppState iOS: Provide correct initial value for AppState.currentState 2016-07-12 23:28:22 -07:00
BatchedBridge Update some JS in preparation for some Jest updates. 2016-06-30 01:58:40 -07:00
BugReporting Unrevert D3518381 2016-07-06 12:58:41 -07:00
CameraRoll Automated changes to remove implicit capture of self in blocks: Libraries/FBReactKit/BUCK 2016-07-07 12:44:14 -07:00
Components Support RefreshControl in RecyclerViewBackedScrollView in Android 2016-07-14 14:43:24 -07:00
CustomComponents Adapt unit tests 2016-07-14 06:28:21 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Devtools Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
EventEmitter Fixes EventEmitter#once arguments not getting passed to the listener 2016-06-28 16:13:21 -07:00
Experimental Wrap native module I18nManager with a new RCTI18nManager.js and fix current use of native module I18nManager 2016-07-11 20:58:32 -07:00
Fetch Fixed what fetch.js exports 2016-07-14 11:13:27 -07:00
Geolocation Update RCTNetworking, RCTNetInfo and RCTLocationManager to use new events system 2016-05-25 04:28:36 -07:00
Image network congestion improvements (part 1) 2016-07-18 12:13:29 -07:00
Inspector open in editor button for yellow box 2016-07-13 04:43:25 -07:00
Interaction PanResponder should not hold stale handle for interaction. 2016-07-15 11:58:31 -07:00
JavaScriptAppEngine Remove exported constants from RCTTimers to allow lazy initialization 2016-07-15 13:58:40 -07:00
LayoutAnimation Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
Linking Hook up Android intent to Linking.js #7079 2016-06-05 18:58:24 -07:00
LinkingIOS Updated Linking and PushNotificationIOS modules to use NativeEventEmitter 2016-05-27 10:28:23 -07:00
Modal Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
NativeAnimation Harmonize native animation callback args with JS 2016-07-05 11:13:23 -07:00
NavigationExperimental Prevent race condition on immediate transition 2016-07-12 13:13:24 -07:00
Network fix new flow errors after D3561327 2016-07-14 04:58:43 -07:00
PushNotificationIOS Update deprecated comment in PushNotificationIOS 2016-07-14 00:13:34 -07:00
QuickPerformanceLogger added QPL for main interactions 2015-09-29 22:25:23 -07:00
RCTTest Add MessageQueue method for executing function and returning its result 2016-07-18 07:13:32 -07:00
RKBackendNode Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
ReactIOS open in editor button for yellow box 2016-07-13 04:43:25 -07:00
ReactNative Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Automated changes to remove implicit capture of self in blocks: Libraries/FBReactKit/BUCK 2016-07-07 12:44:14 -07:00
Storage update AsyncStorage.js documentation 2016-07-15 09:13:51 -07:00
StyleSheet Throw flow error when trying to access a style that is not defined on a stylesheet 2016-07-18 23:28:25 -07:00
Text Provide RTL support for RCTShadowText 2016-07-15 18:58:30 -07:00
Utilities Add MessageQueue method for executing function and returning its result 2016-07-18 07:13:32 -07:00
Vibration Add support for vibration patterns 2016-03-29 21:45:20 -07:00
WebSocket Add MessageQueue method for executing function and returning its result 2016-07-18 07:13:32 -07:00
react-native Fix Relay tests, fix React.js whitespace 2016-07-12 21:43:23 -07:00
vendor Fixed NativeEventListener deregistration 2016-05-16 04:13:56 -07:00
Promise.js Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00