react-native/Libraries/StyleSheet
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
..
__tests__ Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
ColorPropType.js Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
EdgeInsetsPropType.js Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
LayoutPropTypes.js Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
PointPropType.js Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
StyleSheet.js Throw flow error when trying to access a style that is not defined on a stylesheet 2016-07-18 23:28:25 -07:00
StyleSheetPropType.js
StyleSheetTypes.js Unrevert D3518381 2016-07-06 12:58:41 -07:00
StyleSheetValidation.js Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
TransformPropTypes.js Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
flattenStyle.js Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
normalizeColor.js Add support for number as colors 2016-02-08 04:04:38 -08:00
processColor.js Change internal format from 0xaarrggbb to 0xrrggbbaa 2016-02-07 10:14:29 -08:00
processTransform.js Decompose transform matrix in native (for android). 2016-06-21 11:28:29 -07:00
setNormalizedColorAlpha.js Replace usages of hexToRgb with setNormalizedColorAlpha 2016-02-09 14:58:34 -08:00