diff --git a/benchmarks/src/components/AspectRatio/index.js b/benchmarks/src/components/AspectRatio/index.js
index be85624e..5d92768b 100644
--- a/benchmarks/src/components/AspectRatio/index.js
+++ b/benchmarks/src/components/AspectRatio/index.js
@@ -21,7 +21,9 @@ class AspectRatio extends PureComponent {
return (
- {children}
+
+ {children}
+
);
}
diff --git a/benchmarks/src/components/NestedTree/index.js b/benchmarks/src/components/NestedTree/index.js
index ace872d4..5ebcf416 100644
--- a/benchmarks/src/components/NestedTree/index.js
+++ b/benchmarks/src/components/NestedTree/index.js
@@ -30,7 +30,11 @@ class DeepTree extends Component {
);
for (let i = 0; i < wrap; i++) {
- result = {result};
+ result = (
+
+ {result}
+
+ );
}
return result;
}
diff --git a/benchmarks/src/components/Tweet/index.js b/benchmarks/src/components/Tweet/index.js
index fc4a05df..1c99ce71 100644
--- a/benchmarks/src/components/Tweet/index.js
+++ b/benchmarks/src/components/Tweet/index.js
@@ -61,7 +61,6 @@ export class Tweet extends Component {
: null}
-
{getIcon(displayMode, highlighted)}
- {count > 0 ? {count} : null}
+ {count > 0
+ ?
+ {count}
+
+ : null}
);
diff --git a/benchmarks/src/components/UserNames/index.js b/benchmarks/src/components/UserNames/index.js
index 4f5b2075..aa2306e4 100644
--- a/benchmarks/src/components/UserNames/index.js
+++ b/benchmarks/src/components/UserNames/index.js
@@ -28,7 +28,9 @@ class UserNames extends PureComponent {
onPress={onPress}
style={[styles.root, style]}
>
- {fullName}
+
+ {fullName}
+
{layout === 'stack' ? ' \u000A' : ' '}
{`@${screenName}`}
diff --git a/benchmarks/src/components/theme.js b/benchmarks/src/components/theme.js
index 1dc78152..219d2cc5 100644
--- a/benchmarks/src/components/theme.js
+++ b/benchmarks/src/components/theme.js
@@ -27,7 +27,7 @@ module.exports = {
colors,
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif, ' +
- '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', // emoji fonts
+ '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', // emoji fonts
fontSize,
lineHeight: 1.3125,
spaceX: 0.6,
diff --git a/docs/storybook/1-components/Button/ButtonDocs.js b/docs/storybook/1-components/Button/ButtonDocs.js
index d67ac93d..dae9f25b 100644
--- a/docs/storybook/1-components/Button/ButtonDocs.js
+++ b/docs/storybook/1-components/Button/ButtonDocs.js
@@ -63,8 +63,8 @@ storiesOf('Components', module).add('Button', () =>
- A basic button component. Supports a minimal level of customization.
- You can build your own custom button using TouchableOpacity
+ A basic button component. Supports a minimal level of customization. You can build your own
+ custom button using TouchableOpacity
or TouchableNativeFeedback.
]}
diff --git a/docs/storybook/1-components/Image/examples/NetworkImage.js b/docs/storybook/1-components/Image/examples/NetworkImage.js
index 5d36d8f4..5dc0a702 100644
--- a/docs/storybook/1-components/Image/examples/NetworkImage.js
+++ b/docs/storybook/1-components/Image/examples/NetworkImage.js
@@ -43,7 +43,10 @@ class NetworkImageExample extends PureComponent {
>
{loader}
- {this.state.message && {this.state.message}}
+ {this.state.message &&
+
+ {this.state.message}
+ }
);
}
diff --git a/docs/storybook/1-components/Image/examples/PropChildren.js b/docs/storybook/1-components/Image/examples/PropChildren.js
index a43426de..66971741 100644
--- a/docs/storybook/1-components/Image/examples/PropChildren.js
+++ b/docs/storybook/1-components/Image/examples/PropChildren.js
@@ -8,9 +8,7 @@ import { Image, StyleSheet, Text } from 'react-native';
const ImageChildrenExample = () =>
-
- React
-
+ React;
const styles = StyleSheet.create({
diff --git a/docs/storybook/1-components/Image/examples/PropResizeMode.js b/docs/storybook/1-components/Image/examples/PropResizeMode.js
index 11e0f616..a5427d06 100644
--- a/docs/storybook/1-components/Image/examples/PropResizeMode.js
+++ b/docs/storybook/1-components/Image/examples/PropResizeMode.js
@@ -13,9 +13,7 @@ const ImageResizeModeExample = () =>
-
- Contain
-
+ Contain
/>
-
- Cover
-
+ Cover
/>
-
- Stretch
-
+ Stretch
/>
-
- Repeat
-
+ Repeat
-
- Center
-
+ Center
diff --git a/docs/storybook/1-components/Image/examples/StaticPrefetch.js b/docs/storybook/1-components/Image/examples/StaticPrefetch.js
index 91ba532e..c937cc29 100644
--- a/docs/storybook/1-components/Image/examples/StaticPrefetch.js
+++ b/docs/storybook/1-components/Image/examples/StaticPrefetch.js
@@ -30,7 +30,9 @@ class ImagePrefetchExample extends PureComponent {
: null}
{startLoad
?
- {this.state.events.join('\n')}
+
+ {this.state.events.join('\n')}
+
- Called when scrollable content view of the ScrollView changes.
- It's implemented using the onLayout handler
- attached to the content container which this ScrollView renders.
+ Called when scrollable content view of the ScrollView changes. It's
+ implemented using the onLayout handler attached to the content container
+ which this ScrollView renders.
}
/>,
@@ -72,12 +72,10 @@ const sections = [
typeInfo="?function"
description={[
- Fires at most once per frame during scrolling. The frequency of the events can
- be contolled using the scrollEventThrottle prop.
- ,
-
- Invoked on scroll with the following event:
+ Fires at most once per frame during scrolling. The frequency of the events can be
+ contolled using the scrollEventThrottle prop.
,
+ Invoked on scroll with the following event:,
{`{
nativeEvent: {
contentOffset: { x, y },
@@ -99,11 +97,11 @@ const sections = [
typeInfo="?number = 0"
description={
- This controls how often the scroll event will be fired while scrolling (as a
- time interval in ms). A lower number yields better accuracy for code that is
- tracking the scroll position, but can lead to scroll performance problems. The
- default value is 0, which means the scroll event will be sent only once
- each time the view is scrolled.
+ This controls how often the scroll event will be fired while scrolling (as a time
+ interval in ms). A lower number yields better accuracy for code that is tracking the
+ scroll position, but can lead to scroll performance problems. The default value is{' '}
+ 0, which means the scroll event will be sent only once each time the view
+ is scrolled.
}
/>
@@ -129,10 +127,10 @@ const sections = [
typeInfo="() => ScrollResponder"
description={
- Returns a reference to the underlying scroll responder, which supports
- operations like scrollTo. All ScrollView-like components
- should implement this method so that they can be composed while providing access to the
- underlying scroll responder's methods.
+ Returns a reference to the underlying scroll responder, which supports operations like{' '}
+ scrollTo. All ScrollView-like components should implement this
+ method so that they can be composed while providing access to the underlying scroll
+ responder's methods.
}
/>,
diff --git a/docs/storybook/1-components/ScrollView/examples/Horizontal.js b/docs/storybook/1-components/ScrollView/examples/Horizontal.js
index 7e24668f..a94e3c8d 100644
--- a/docs/storybook/1-components/ScrollView/examples/Horizontal.js
+++ b/docs/storybook/1-components/ScrollView/examples/Horizontal.js
@@ -20,7 +20,9 @@ const VerticalExample = () =>
>
{Array.from({ length: 50 }).map((item, i) =>
- {i}
+
+ {i}
+
)}
@@ -37,7 +39,9 @@ const HorizontalExample = () =>
>
{Array.from({ length: 50 }).map((item, i) =>
- {i}
+
+ {i}
+
)}
diff --git a/docs/storybook/1-components/ScrollView/examples/ScrollTo.js b/docs/storybook/1-components/ScrollView/examples/ScrollTo.js
index e27d1c50..0aba8d99 100644
--- a/docs/storybook/1-components/ScrollView/examples/ScrollTo.js
+++ b/docs/storybook/1-components/ScrollView/examples/ScrollTo.js
@@ -21,7 +21,9 @@ export default class ScrollToExample extends PureComponent {
>
{Array.from({ length: 50 }).map((item, i) =>
- {i}
+
+ {i}
+
)}
diff --git a/docs/storybook/1-components/ScrollView/examples/ScrollToEnd.js b/docs/storybook/1-components/ScrollView/examples/ScrollToEnd.js
index 0c4d1fa5..4e821c72 100644
--- a/docs/storybook/1-components/ScrollView/examples/ScrollToEnd.js
+++ b/docs/storybook/1-components/ScrollView/examples/ScrollToEnd.js
@@ -21,7 +21,9 @@ export default class ScrollToEndExample extends PureComponent {
>
{Array.from({ length: 50 }).map((item, i) =>
- {i}
+
+ {i}
+
)}
diff --git a/docs/storybook/1-components/Switch/SwitchDocs.js b/docs/storybook/1-components/Switch/SwitchDocs.js
index 14e44f1b..d9388742 100644
--- a/docs/storybook/1-components/Switch/SwitchDocs.js
+++ b/docs/storybook/1-components/Switch/SwitchDocs.js
@@ -126,10 +126,10 @@ storiesOf('Components', module).add('Switch', () =>
- This is a controlled component that requires an onValueChange callback
- that updates the value prop in order for the component to reflect user actions. If
- the value prop is not updated, the component will continue to render the
- supplied value prop instead of the expected result of any user actions.
+ This is a controlled component that requires an onValueChange callback that
+ updates the value prop in order for the component to reflect user actions. If the{' '}
+ value prop is not updated, the component will continue to render the supplied{' '}
+ value prop instead of the expected result of any user actions.
}
sections={sections}
diff --git a/docs/storybook/1-components/Switch/examples/PropOnValueChange.js b/docs/storybook/1-components/Switch/examples/PropOnValueChange.js
index d893e21e..55860e54 100644
--- a/docs/storybook/1-components/Switch/examples/PropOnValueChange.js
+++ b/docs/storybook/1-components/Switch/examples/PropOnValueChange.js
@@ -28,7 +28,9 @@ class SwitchOnValueChangeExample extends PureComponent {
style={styles.marginBottom}
value={eventSwitchIsOn}
/>
- {eventSwitchIsOn ? 'On' : 'Off'}
+
+ {eventSwitchIsOn ? 'On' : 'Off'}
+
- {eventSwitchRegressionIsOn ? 'On' : 'Off'}
+
+ {eventSwitchRegressionIsOn ? 'On' : 'Off'}
+
);
diff --git a/docs/storybook/1-components/Text/TextDocs.js b/docs/storybook/1-components/Text/TextDocs.js
index 5feb18d5..26d93993 100644
--- a/docs/storybook/1-components/Text/TextDocs.js
+++ b/docs/storybook/1-components/Text/TextDocs.js
@@ -128,14 +128,10 @@ const sections = [
description={
Indicates to assistive technologies whether to notify the user when the view changes.
- The values of
- this attribute are expressed in degrees of importance. When regions are specified as{
- ' '
- }
- polite (recommended),
- updates take low priority. When regions are specified as assertive,
- assistive technologies will
- interrupt and immediately notify the user. (This is implemented using 'aria-live'.)
+ The values of this attribute are expressed in degrees of importance. When regions are
+ specified as polite (recommended), updates take low priority. When regions
+ are specified as assertive, assistive technologies will interrupt and
+ immediately notify the user. (This is implemented using 'aria-live'.)
}
/>,
@@ -147,13 +143,10 @@ const sections = [
description={
Allows assistive technologies to present and support interaction with the view in a
- manner that is
- consistent with user expectations for similar views of that type. For example, marking a
- touchable
- view with an accessibilityRole of button. For compatibility
- with React
- Native accessibilityTraits and accessibilityComponentType are
- mapped
+ manner that is consistent with user expectations for similar views of that type. For
+ example, marking a touchable view with an accessibilityRole of{' '}
+ button. For compatibility with React Native{' '}
+ accessibilityTraits and accessibilityComponentType are mapped
to accessibilityRole. (This is implemented using ARIA roles.)
}
@@ -165,11 +158,9 @@ const sections = [
description={
When true, indicates that the view is an accessibility element (i.e.,
- focusable) and
- groups its child content. By default, all the touchable elements and elements
- with accessibilityRole of button and link are
- accessible.
- (This is implemented using 'tabindex'.)
+ focusable) and groups its child content. By default, all the touchable elements and
+ elements with accessibilityRole of button and{' '}
+ link are accessible. (This is implemented using 'tabindex'.)
}
/>,
@@ -246,15 +237,12 @@ storiesOf('Components', module).add('Text', () =>
description={[
Text is component for displaying text. It supports style, basic touch handling, and inherits
- typographic
- styles from ancestor elements.
+ typographic styles from ancestor elements.
,
Text is unique relative to layout: child elements use text layout ("inline") rather than
- flexbox layout.
- This means that elements inside of a Text are not rectangles, as they wrap when reaching the
- edge of
- their container.
+ flexbox layout. This means that elements inside of a Text are not rectangles, as they wrap
+ when reaching the edge of their container.
,
NOTE: Text will transfer all other props to the rendered HTML element.
]}
diff --git a/docs/storybook/1-components/Text/examples/PropChildren.js b/docs/storybook/1-components/Text/examples/PropChildren.js
index f1dab7e7..e2d8454f 100644
--- a/docs/storybook/1-components/Text/examples/PropChildren.js
+++ b/docs/storybook/1-components/Text/examples/PropChildren.js
@@ -15,13 +15,8 @@ const Entity = ({ children }) =>
const TextChildrenExample = () =>
- This text contains an inline blue view
- {' '}
-
- {' '}
- and
- an inline image
- {' '}
+ This text contains an inline blue view{' '}
+ and an inline image{' '}
(Normal text,
(and bold
-
- (and tiny inherited bold blue)
-
+ (and tiny inherited bold blue)
)
)
@@ -47,9 +40,7 @@ const TextChildrenExample = () =>
(is inherited
(and accumulated
-
- (and also applies to the background)
-
+ (and also applies to the background)
)
)
@@ -60,7 +51,6 @@ const TextChildrenExample = () =>
Entity Name
-
;
export default TextChildrenExample;
diff --git a/docs/storybook/1-components/Text/examples/PropOnPress.js b/docs/storybook/1-components/Text/examples/PropOnPress.js
index 3c0ae0e1..609e5b4f 100644
--- a/docs/storybook/1-components/Text/examples/PropOnPress.js
+++ b/docs/storybook/1-components/Text/examples/PropOnPress.js
@@ -22,7 +22,9 @@ class TextOnPressExample extends React.Component {
Text has built-in onPress handling
- {textLog}
+
+ {textLog}
+
);
diff --git a/docs/storybook/1-components/TextInput/TextInputDocs.js b/docs/storybook/1-components/TextInput/TextInputDocs.js
index a08a2644..c7bd363b 100644
--- a/docs/storybook/1-components/TextInput/TextInputDocs.js
+++ b/docs/storybook/1-components/TextInput/TextInputDocs.js
@@ -38,8 +38,12 @@ const sections = [
characters: Automatically capitalize all characters.,
- none: Completely disables automatic capitalization.,
+
+ characters: Automatically capitalize all characters.
+ ,
+
+ none: Completely disables automatic capitalization.
+ ,
sentences: Automatically capitalize the first letter of sentences.
,
@@ -61,14 +65,13 @@ const sections = [
typeInfo="?string"
description={
- Indicates whether the value of the control can be automatically
- completed by the browser.{' '}
+ Indicates whether the value of the control can be automatically completed by the
+ browser.{' '}
- Accepted
- values.
+ Accepted values.
}
@@ -91,13 +94,11 @@ const sections = [
typeInfo="?boolean"
description={
- If true, the text field will blur when submitted. The
- default value is true for single-line fields and
- {' '}false for multiline fields. Note, for multiline fields
- setting blurOnSubmit to true means that
- pressing return will blur the field and trigger the onSubmitEditing{' '}
- event instead of inserting a newline
- into the field.
+ If true, the text field will blur when submitted. The default value is{' '}
+ true for single-line fields and false for multiline fields.
+ Note, for multiline fields setting blurOnSubmit to true means
+ that pressing return will blur the field and trigger the onSubmitEditing{' '}
+ event instead of inserting a newline into the field.
}
example={{
@@ -119,9 +120,9 @@ const sections = [
typeInfo="?string"
description={
- Provides an initial value that will change when the user starts typing. Useful
- for simple use-cases where you don't want to deal with listening to events and
- updating the value prop to keep the controlled state in sync.
+ Provides an initial value that will change when the user starts typing. Useful for
+ simple use-cases where you don't want to deal with listening to events and updating the{' '}
+ value prop to keep the controlled state in sync.
}
/>,
@@ -208,10 +209,10 @@ const sections = [
Callback that is called when a key is pressed. This will be called with{' '}
{`{
nativeEvent: { key: keyValue } }`}{' '}
- where keyValue is Enter or Backspace for
- respective keys and the typed-in character otherwise including ' '
- for space. Modifier keys (e.g., shiftKey) are also included in
- the nativeEvent. Fires before onChange callbacks.
+ where keyValue is Enter or Backspace for respective keys and
+ the typed-in character otherwise including ' '
+ for space. Modifier keys (e.g., shiftKey) are also included in the{' '}
+ nativeEvent. Fires before onChange callbacks.
}
/>,
@@ -304,8 +305,7 @@ nativeEvent: { key: keyValue } }`}{' '}
href="https://facebook.github.io/react/docs/forms.html"
target="_blank"
/>{' '}
- work. To prevent
- user edits to the value set {'editable={false}'}.
+ work. To prevent user edits to the value set {'editable={false}'}.
}
/>
diff --git a/docs/storybook/1-components/TextInput/examples/PropOnSelectionChange.js b/docs/storybook/1-components/TextInput/examples/PropOnSelectionChange.js
index cad326cf..98d5dc1a 100644
--- a/docs/storybook/1-components/TextInput/examples/PropOnSelectionChange.js
+++ b/docs/storybook/1-components/TextInput/examples/PropOnSelectionChange.js
@@ -87,21 +87,13 @@ class OnSelectionChangeExample extends React.Component {
selection = {JSON.stringify(this.state.selection)}
-
- Place at Start (0, 0)
-
+ Place at Start (0, 0)
Place at End ({length}, {length})
-
- Place at Random
-
-
- Select All
-
-
- Select Random
-
+ Place at Random
+ Select All
+ Select Random
);
diff --git a/docs/storybook/1-components/TextInput/examples/TextInputEvents.js b/docs/storybook/1-components/TextInput/examples/TextInputEvents.js
index 927fc7a3..c73d52bd 100644
--- a/docs/storybook/1-components/TextInput/examples/TextInputEvents.js
+++ b/docs/storybook/1-components/TextInput/examples/TextInputEvents.js
@@ -53,7 +53,8 @@ export default class TextEventsExample extends React.Component {
style={[helperStyles.textinput, { maxWidth: 200 }]}
/>
- {this.state.curText}{'\n'}
+ {this.state.curText}
+ {'\n'}
(prev: {this.state.prevText}){'\n'}
(prev2: {this.state.prev2Text}){'\n'}
(prev3: {this.state.prev3Text})
diff --git a/docs/storybook/1-components/TextInput/helpers.js b/docs/storybook/1-components/TextInput/helpers.js
index b2e2e9a8..800909f1 100644
--- a/docs/storybook/1-components/TextInput/helpers.js
+++ b/docs/storybook/1-components/TextInput/helpers.js
@@ -37,7 +37,9 @@ export class WithLabel extends React.Component {
return (
- {this.props.label}
+
+ {this.props.label}
+
{this.props.children}
diff --git a/docs/storybook/1-components/Touchable/TouchableHighlightDocs.js b/docs/storybook/1-components/Touchable/TouchableHighlightDocs.js
index 9697391d..8ed915db 100644
--- a/docs/storybook/1-components/Touchable/TouchableHighlightDocs.js
+++ b/docs/storybook/1-components/Touchable/TouchableHighlightDocs.js
@@ -67,19 +67,18 @@ storiesOf('Components', module).add('TouchableHighlight', () =>
- A wrapper for making views respond properly to touches. On press down, the
- opacity of the wrapped view is decreased, which allows the underlay color to
- show through, darkening or tinting the view.
+ A wrapper for making views respond properly to touches. On press down, the opacity of the
+ wrapped view is decreased, which allows the underlay color to show through, darkening or
+ tinting the view.
,
- The underlay comes from wrapping the child in a new View, which can affect
- layout, and sometimes cause unwanted visual artifacts if not used correctly,
- for example if the backgroundColor of the wrapped view isn't explicitly set to
- an opaque color.
+ The underlay comes from wrapping the child in a new View, which can affect layout, and
+ sometimes cause unwanted visual artifacts if not used correctly, for example if the
+ backgroundColor of the wrapped view isn't explicitly set to an opaque color.
,
- TouchableHighlight must have one child (not zero or more than one). If you wish
- to have several child components, wrap them in a View.
+ TouchableHighlight must have one child (not zero or more than one). If you wish to have
+ several child components, wrap them in a View.
]}
sections={sections}
diff --git a/docs/storybook/1-components/Touchable/TouchableWithoutFeedbackDocs.js b/docs/storybook/1-components/Touchable/TouchableWithoutFeedbackDocs.js
index 6404db9b..c4ec9417 100644
--- a/docs/storybook/1-components/Touchable/TouchableWithoutFeedbackDocs.js
+++ b/docs/storybook/1-components/Touchable/TouchableWithoutFeedbackDocs.js
@@ -49,7 +49,9 @@ const sections = [
name="disabled"
typeInfo="?boolean"
description={
- If true, disable all interactions for this component.
+
+ If true, disable all interactions for this component.
+
}
/>,
@@ -89,9 +91,9 @@ storiesOf('Components', module).add('TouchableWithoutFeedback', () =>
- Do not use unless you have a very good reason. All the elements that respond to
- press should have a visual feedback when touched. This is one of the primary
- reason a "web" app doesn't feel "native".
+ Do not use unless you have a very good reason. All the elements that respond to press should
+ have a visual feedback when touched. This is one of the primary reason a "web" app doesn't
+ feel "native".
,
NOTE: TouchableWithoutFeedback supports only one child. If you wish to have
diff --git a/docs/storybook/1-components/Touchable/examples/PropDisabled.js b/docs/storybook/1-components/Touchable/examples/PropDisabled.js
index f158f7ca..12e3ce52 100644
--- a/docs/storybook/1-components/Touchable/examples/PropDisabled.js
+++ b/docs/storybook/1-components/Touchable/examples/PropDisabled.js
@@ -17,9 +17,7 @@ class TouchableHighlightDisabled extends React.Component {
style={[styles.row, styles.block]}
underlayColor="rgb(210, 230, 255)"
>
-
- Disabled TouchableHighlight
-
+ Disabled TouchableHighlight
-
- Enabled TouchableHighlight
-
+ Enabled TouchableHighlight
);
diff --git a/docs/storybook/1-components/Touchable/examples/PropHitSlop.js b/docs/storybook/1-components/Touchable/examples/PropHitSlop.js
index 06a484c4..2705bb52 100644
--- a/docs/storybook/1-components/Touchable/examples/PropHitSlop.js
+++ b/docs/storybook/1-components/Touchable/examples/PropHitSlop.js
@@ -39,7 +39,9 @@ export default class TouchableHitSlopExample extends React.Component {
- {log}
+
+ {log}
+
);
diff --git a/docs/storybook/1-components/View/ViewDocs.js b/docs/storybook/1-components/View/ViewDocs.js
index 075a081b..0c8e3cd4 100644
--- a/docs/storybook/1-components/View/ViewDocs.js
+++ b/docs/storybook/1-components/View/ViewDocs.js
@@ -537,14 +537,10 @@ const sections = [
description={
Indicates to assistive technologies whether to notify the user when the view changes.
- The values of
- this attribute are expressed in degrees of importance. When regions are specified as{
- ' '
- }
- polite (recommended),
- updates take low priority. When regions are specified as assertive,
- assistive technologies will
- interrupt and immediately notify the user. (This is implemented using 'aria-live'.)
+ The values of this attribute are expressed in degrees of importance. When regions are
+ specified as polite (recommended), updates take low priority. When regions
+ are specified as assertive, assistive technologies will interrupt and
+ immediately notify the user. (This is implemented using 'aria-live'.)
}
/>,
@@ -556,13 +552,10 @@ const sections = [
description={
Allows assistive technologies to present and support interaction with the view in a
- manner that is
- consistent with user expectations for similar views of that type. For example, marking a
- touchable
- view with an accessibilityRole of button. For compatibility
- with React
- Native accessibilityTraits and accessibilityComponentType are
- mapped
+ manner that is consistent with user expectations for similar views of that type. For
+ example, marking a touchable view with an accessibilityRole of{' '}
+ button. For compatibility with React Native{' '}
+ accessibilityTraits and accessibilityComponentType are mapped
to accessibilityRole. (This is implemented using ARIA roles.)
}
@@ -574,11 +567,9 @@ const sections = [
description={
When true, indicates that the view is an accessibility element (i.e.,
- focusable) and
- groups its child content. By default, all the touchable elements and elements
- with accessibilityRole of button and link are
- accessible.
- (This is implemented using 'tabindex'.)
+ focusable) and groups its child content. By default, all the touchable elements and
+ elements with accessibilityRole of button and{' '}
+ link are accessible. (This is implemented using 'tabindex'.)
}
/>,
@@ -731,14 +722,12 @@ storiesOf('Components', module).add('View', () =>
description={[
View is the fundamental UI building block. It is a component that supports style, layout
- with flexbox,
- and accessibility controls. It can be nested inside another View and has 0-to-many children
- of any type.
+ with flexbox, and accessibility controls. It can be nested inside another View and has
+ 0-to-many children of any type.
,
Also, refer to React Native's documentation about the Gesture Responder System. NOTE: View
- will
- transfer all other props to the rendered HTML element.
+ will transfer all other props to the rendered HTML element.
]}
sections={sections}
diff --git a/docs/storybook/1-components/View/examples/PropPointerEvents.js b/docs/storybook/1-components/View/examples/PropPointerEvents.js
index 76a15d50..e02ae95f 100644
--- a/docs/storybook/1-components/View/examples/PropPointerEvents.js
+++ b/docs/storybook/1-components/View/examples/PropPointerEvents.js
@@ -9,7 +9,9 @@ import { Text, TouchableHighlight, View } from 'react-native';
const ViewStyleExample = () =>
- none
+
+ none
+ auto
diff --git a/docs/storybook/1-components/View/examples/ZIndex.js b/docs/storybook/1-components/View/examples/ZIndex.js
index 87934570..01c637b2 100644
--- a/docs/storybook/1-components/View/examples/ZIndex.js
+++ b/docs/storybook/1-components/View/examples/ZIndex.js
@@ -22,7 +22,9 @@ export default class ZIndex extends React.Component {
{ marginTop: 0, backgroundColor: '#E57373', zIndex: indices[0] }
]}
>
- ZIndex {indices[0]}
+
+ ZIndex {indices[0]}
+
- ZIndex {indices[1]}
+
+ ZIndex {indices[1]}
+
- ZIndex {indices[2]}
+
+ ZIndex {indices[2]}
+
- ZIndex {indices[3]}
+
+ ZIndex {indices[3]}
+
diff --git a/docs/storybook/1-components/View/examples/transforms.js b/docs/storybook/1-components/View/examples/transforms.js
index 672d1d80..d18863b4 100644
--- a/docs/storybook/1-components/View/examples/transforms.js
+++ b/docs/storybook/1-components/View/examples/transforms.js
@@ -64,9 +64,7 @@ class Flip extends React.Component {
}
]}
>
-
- This text is flipping great.
-
+ This text is flipping great.
-
- On the flip side...
-
+ On the flip side...
);
diff --git a/docs/storybook/2-apis/AppRegistry/AppRegistryDocs.js b/docs/storybook/2-apis/AppRegistry/AppRegistryDocs.js
index 2673cda2..89eeedd2 100644
--- a/docs/storybook/2-apis/AppRegistry/AppRegistryDocs.js
+++ b/docs/storybook/2-apis/AppRegistry/AppRegistryDocs.js
@@ -19,7 +19,9 @@ const sections = [
Register multiple applications. AppConfig type is:,
+
+ Register multiple applications. AppConfig type is:
+ ,
{`{
appKey: string;
component: ComponentProvider;
@@ -32,7 +34,9 @@ const sections = [
Register a component provider under the given appKey.
+
+ Register a component provider under the given appKey.
+
}
example={{
code: 'AppRegistry.registerComponent("MyApp", () => AppComponent)'
@@ -44,9 +48,8 @@ const sections = [
- Register a custom render function for an application. The
- function will receive the appParameters passed
- to runApplication.
+ Register a custom render function for an application. The function will receive the{' '}
+ appParameters passed to runApplication.
}
name="static registerRunnable"
@@ -64,8 +67,7 @@ const sections = [
Runs the application that was registered under appKey. The{' '}
appParameters must include the rootTag into which the
- application is rendered, and optionally
- any initialProps.
+ application is rendered, and optionally any initialProps.
}
example={{
@@ -97,10 +99,10 @@ storiesOf('APIs', module).add('AppRegistry', () =>
- AppRegistry is the control point for registering, running,
- prerendering, and unmounting all apps. App root components should
- register themselves with AppRegistry.registerComponent. Apps can be
- run by invoking AppRegistry.runApplication
+ AppRegistry is the control point for registering, running, prerendering, and unmounting all
+ apps. App root components should register themselves with{' '}
+ AppRegistry.registerComponent. Apps can be run by invoking{' '}
+ AppRegistry.runApplication
}
sections={sections}
diff --git a/docs/storybook/2-apis/AppState/AppStateDocs.js b/docs/storybook/2-apis/AppState/AppStateDocs.js
index b7b747b6..9a2b3cc2 100644
--- a/docs/storybook/2-apis/AppState/AppStateDocs.js
+++ b/docs/storybook/2-apis/AppState/AppStateDocs.js
@@ -33,8 +33,8 @@ const sections = [
description={
Add a handler to AppState changes by listening to the
- change event type and providing the handler. The
- handler is called with the app state value.
+ change event type and providing the handler. The handler is
+ called with the app state value.
}
/>,
@@ -67,10 +67,10 @@ storiesOf('APIs', module).add('AppState', () =>
- AppState can tell you if the app is in the foreground or background,
- and notify you when the state changes. States: active (the app is
- running in the foreground), background (the app is running in the
- background, i.e., the user has not focused the app's tab).
+ AppState can tell you if the app is in the foreground or background, and notify you when the
+ state changes. States: active (the app is running in the foreground),{' '}
+ background (the app is running in the background, i.e., the user has not
+ focused the app's tab).
}
sections={sections}
diff --git a/docs/storybook/2-apis/AppState/examples/StateChanges.js b/docs/storybook/2-apis/AppState/examples/StateChanges.js
index f7167281..ef37907e 100644
--- a/docs/storybook/2-apis/AppState/examples/StateChanges.js
+++ b/docs/storybook/2-apis/AppState/examples/StateChanges.js
@@ -30,9 +30,15 @@ export default class StateChanges extends PureComponent {
render() {
return (
- Active count: {this.state.active}
- Background count: {this.state.background}
- Current state is: {this.state.currentState}
+
+ Active count: {this.state.active}
+
+
+ Background count: {this.state.background}
+
+
+ Current state is: {this.state.currentState}
+
);
}
diff --git a/docs/storybook/2-apis/AsyncStorage/AsyncStorageDocs.js b/docs/storybook/2-apis/AsyncStorage/AsyncStorageDocs.js
index 0af4796f..00955c35 100644
--- a/docs/storybook/2-apis/AsyncStorage/AsyncStorageDocs.js
+++ b/docs/storybook/2-apis/AsyncStorage/AsyncStorageDocs.js
@@ -14,8 +14,8 @@ const sections = [
description={
Erases all AsyncStorage. You probably don't want to call this - use
- removeItem or multiRemove to clear only
- your own keys instead. Returns a Promise object.
+ removeItem or multiRemove to clear only your own keys instead.
+ Returns a Promise object.
}
name="static clear"
@@ -43,9 +43,8 @@ const sections = [
- multiGet results in an array of key-value pair arrays
- that matches the input format of multiSet. Returns a
- Promise object.
+ multiGet results in an array of key-value pair arrays that matches the
+ input format of multiSet. Returns a Promise object.
}
example={{
@@ -59,9 +58,8 @@ const sections = [
description={
multiMerge takes an array of key-value array pairs that match the output of{' '}
- multiGet.
- It merges existing values with input values, assuming they are stringified JSON. Returns
- a Promise object.
+ multiGet. It merges existing values with input values, assuming they are
+ stringified JSON. Returns a Promise object.
}
name="static multiMerge"
@@ -77,9 +75,8 @@ const sections = [
- multiSet takes an array of key-value array pairs that
- match the output of multiGet. Returns a Promise
- object.
+ multiSet takes an array of key-value array pairs that match the output of{' '}
+ multiGet. Returns a Promise object.
}
example={{
@@ -108,21 +105,20 @@ storiesOf('APIs', module).add('AsyncStorage', () =>
- AsyncStorage is a simple, unencrypted, asynchronous, persistent,
- key-value storage system that is global to the domain. It's a facade
- over, and should be used instead of window.localStorage to
- provide an asynchronous API and multi functions. Each method returns
- a Promise object.
+ AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage system
+ that is global to the domain. It's a facade over, and should be used instead of{' '}
+ window.localStorage to provide an asynchronous API and multi functions. Each
+ method returns a Promise object.
,
- It is recommended that you use an abstraction on top
- of AsyncStorage instead of AsyncStorage directly
- for anything more than light usage since it operates globally.
+ It is recommended that you use an abstraction on top of AsyncStorage instead of{' '}
+ AsyncStorage directly for anything more than light usage since it operates
+ globally.
,
- The batched functions are useful for executing a lot of operations at
- once, allowing for optimizations to provide the convenience of a
- single promise after all operations are complete.
+ The batched functions are useful for executing a lot of operations at once, allowing for
+ optimizations to provide the convenience of a single promise after all operations are
+ complete.
]}
sections={sections}
diff --git a/docs/storybook/2-apis/Dimensions/DimensionsDocs.js b/docs/storybook/2-apis/Dimensions/DimensionsDocs.js
index 50905b7c..8f048cac 100644
--- a/docs/storybook/2-apis/Dimensions/DimensionsDocs.js
+++ b/docs/storybook/2-apis/Dimensions/DimensionsDocs.js
@@ -30,10 +30,9 @@ const sections = [
items={[
change: Fires when a property within the Dimensions object
- changes. The argument to the event handler is an object
- with window and screen properties whose values are the
- same as the return values of Dimensions.get('window') and{' '}
- Dimensions.get('screen'),
+ changes. The argument to the event handler is an object with window and{' '}
+ screen properties whose values are the same as the return values of{' '}
+ Dimensions.get('window') and Dimensions.get('screen'),
respectively.
]}
diff --git a/docs/storybook/2-apis/Dimensions/examples/DimensionsChange.js b/docs/storybook/2-apis/Dimensions/examples/DimensionsChange.js
index 4b2379ab..906ee224 100644
--- a/docs/storybook/2-apis/Dimensions/examples/DimensionsChange.js
+++ b/docs/storybook/2-apis/Dimensions/examples/DimensionsChange.js
@@ -18,7 +18,11 @@ export default class ChangeEventExample extends Component {
- {logs.map((log, i) => {log})}
+ {logs.map((log, i) =>
+
+ {log}
+
+ )}
);
diff --git a/docs/storybook/2-apis/I18nManager/examples/RTLToggle.js b/docs/storybook/2-apis/I18nManager/examples/RTLToggle.js
index bf4f7b5f..9ec7fdd0 100644
--- a/docs/storybook/2-apis/I18nManager/examples/RTLToggle.js
+++ b/docs/storybook/2-apis/I18nManager/examples/RTLToggle.js
@@ -21,12 +21,8 @@ export default class RTLToggle extends PureComponent {
The writing direction of text is automatically determined by the browser, independent of
the global writing direction of the app.
-
- أحب اللغة العربية
-
-
- textAlign toggles
-
+ أحب اللغة العربية
+ textAlign togglesOne
diff --git a/docs/storybook/2-apis/Linking/examples/OpenURL.js b/docs/storybook/2-apis/Linking/examples/OpenURL.js
index e956867b..b6e99ffd 100644
--- a/docs/storybook/2-apis/Linking/examples/OpenURL.js
+++ b/docs/storybook/2-apis/Linking/examples/OpenURL.js
@@ -17,7 +17,9 @@ export default class OpenURL extends PureComponent {
render() {
return (
- Linking.openURL
+
+ Linking.openURL
+
,
Note that support for retrieving the connection type depends upon browswer support (and is
- limited to mobile browsers).
- It will default to unknown when support is missing.
+ limited to mobile browsers). It will default to unknown when support is
+ missing.
]}
sections={sections}
diff --git a/docs/storybook/2-apis/PixelRatio/PixelRatioDocs.js b/docs/storybook/2-apis/PixelRatio/PixelRatioDocs.js
index 3e52112e..67a6688e 100644
--- a/docs/storybook/2-apis/PixelRatio/PixelRatioDocs.js
+++ b/docs/storybook/2-apis/PixelRatio/PixelRatioDocs.js
@@ -39,10 +39,9 @@ const sections = [
description={
Rounds a layout size (dp) to the nearest layout size that corresponds to an integer
- number of pixels.
- For example, on a device with a PixelRatio of 3,{' '}
- PixelRatio.roundToNearestPixel(8.4) = 8.33,
- which corresponds to exactly (8.33 * 3) = 25 pixels.
+ number of pixels. For example, on a device with a PixelRatio of 3,{' '}
+ PixelRatio.roundToNearestPixel(8.4) = 8.33, which corresponds to exactly{' '}
+ (8.33 * 3) = 25 pixels.
}
name="static roundToNearestPixel"
diff --git a/docs/storybook/2-apis/StyleSheet/StyleSheetDocs.js b/docs/storybook/2-apis/StyleSheet/StyleSheetDocs.js
index 59ae6c69..93e618c6 100644
--- a/docs/storybook/2-apis/StyleSheet/StyleSheetDocs.js
+++ b/docs/storybook/2-apis/StyleSheet/StyleSheetDocs.js
@@ -42,8 +42,8 @@ StyleSheet.flatten([styles.listItem, styles.selectedListItem]);`
- Returns an array of stylesheets of the form {'{ id, textContent }'}.
- Useful for compile-time or server-side rendering if you are not using AppRegistry.
+ Returns an array of stylesheets of the form {'{ id, textContent }'}. Useful
+ for compile-time or server-side rendering if you are not using AppRegistry.
}
label="web"
diff --git a/docs/storybook/2-apis/Vibration/VibrationDocs.js b/docs/storybook/2-apis/Vibration/VibrationDocs.js
index 9c59882b..3093b468 100644
--- a/docs/storybook/2-apis/Vibration/VibrationDocs.js
+++ b/docs/storybook/2-apis/Vibration/VibrationDocs.js
@@ -44,15 +44,14 @@ storiesOf('APIs', module).add('Vibration', () =>
- Vibration is described as a pattern of on-off pulses, which may be of
- varying lengths. The pattern may consist of either a single integer,
- describing the number of milliseconds to vibrate, or an array of
- integers describing a pattern of vibrations and pauses. Vibration is
+ Vibration is described as a pattern of on-off pulses, which may be of varying lengths. The
+ pattern may consist of either a single integer, describing the number of milliseconds to
+ vibrate, or an array of integers describing a pattern of vibrations and pauses. Vibration is
controlled with a single method: Vibration.vibrate().
,
- The vibration is asynchronous so this method will return immediately. There
- will be no effect on devices that do not support vibration.
+ The vibration is asynchronous so this method will return immediately. There will be no
+ effect on devices that do not support vibration.
]}
sections={sections}
diff --git a/docs/storybook/3-demos/Game2048/Game2048.js b/docs/storybook/3-demos/Game2048/Game2048.js
index 1591b57e..426fec52 100644
--- a/docs/storybook/3-demos/Game2048/Game2048.js
+++ b/docs/storybook/3-demos/Game2048/Game2048.js
@@ -39,10 +39,30 @@ class Board extends React.Component {
render() {
return (
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{this.props.children}
);
@@ -115,7 +135,9 @@ class Tile extends React.Component {
return (
- {tile.value}
+
+ {tile.value}
+
);
}
@@ -138,7 +160,9 @@ class GameEndOverlay extends React.Component {
return (
- {message}
+
+ {message}
+ Try Again?
diff --git a/docs/storybook/3-demos/TicTacToe/TicTacToe.js b/docs/storybook/3-demos/TicTacToe/TicTacToe.js
index 788fe93c..869f8a1f 100644
--- a/docs/storybook/3-demos/TicTacToe/TicTacToe.js
+++ b/docs/storybook/3-demos/TicTacToe/TicTacToe.js
@@ -171,7 +171,9 @@ const GameEndOverlay = createReactClass({
return (
- {message}
+
+ {message}
+
{Array.isArray(description)
? insertBetween(, description)
- : {description}}
+ :
+ {description}
+ }
}
{(example.render || example.code) &&
Example
- {example.render && {example.render()}}
+ {example.render &&
+
+ {example.render()}
+ }
{example.render && example.code && }
- {example.code && {example.code}}
+ {example.code &&
+
+ {example.code}
+ }
}
;
@@ -38,8 +46,16 @@ const PropText = ({ label, name, typeInfo }) =>
{label}
}
- {name}
- {typeInfo && {': '}{typeInfo}}
+
+ {name}
+
+ {typeInfo &&
+
+ {': '}
+
+ {typeInfo}
+
+ }
;
const styles = StyleSheet.create({
diff --git a/docs/storybook/ui-explorer/StyleList.js b/docs/storybook/ui-explorer/StyleList.js
index 3aa12884..574a0e98 100644
--- a/docs/storybook/ui-explorer/StyleList.js
+++ b/docs/storybook/ui-explorer/StyleList.js
@@ -8,10 +8,18 @@ const StyleList = ({ stylePropTypes }) =>
{stylePropTypes.map(({ label, name, typeInfo }, i) =>
- {label ? {label} : null}
- {name}
+ {label
+ ?
+ {label}
+
+ : null}
+
+ {name}
+
{': '}
- {typeInfo}
+
+ {typeInfo}
+
)}
;
diff --git a/docs/storybook/ui-explorer/UIExplorer.js b/docs/storybook/ui-explorer/UIExplorer.js
index 8c0e11c8..283a40f0 100644
--- a/docs/storybook/ui-explorer/UIExplorer.js
+++ b/docs/storybook/ui-explorer/UIExplorer.js
@@ -9,9 +9,18 @@ import insertBetween from './insertBetween';
import React from 'react';
import { StyleSheet, View } from 'react-native';
-const Title = ({ children }) => {children};
-const Description = ({ children }) => {children};
-const SectionTitle = ({ children }) => {children};
+const Title = ({ children }) =>
+
+ {children}
+ ;
+const Description = ({ children }) =>
+
+ {children}
+ ;
+const SectionTitle = ({ children }) =>
+
+ {children}
+ ;
const Divider = () => ;
@@ -27,14 +36,18 @@ const SourceLink = ({ uri }) =>
const UIExplorer = ({ description, sections, title, url }) =>
- {title}
+
+ {title}
+
{description &&
{Array.isArray(description) ? insertBetween(, description) : description}
}
{sections.map(({ entries, title }, i) =>
- {title}
+
+ {title}
+
{entries}
)}
diff --git a/package.json b/package.json
index 2e6093c1..3b0a2897 100644
--- a/package.json
+++ b/package.json
@@ -79,15 +79,15 @@
"del-cli": "^1.0.0",
"enzyme": "^2.8.2",
"enzyme-to-json": "^1.5.1",
- "eslint": "^4.0.0",
- "eslint-config-prettier": "^2.2.0",
+ "eslint": "^4.2.0",
+ "eslint-config-prettier": "^2.3.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-react": "^7.1.0",
"file-loader": "^0.11.2",
"flow-bin": "^0.48.0",
"jest": "^20.0.4",
- "lint-staged": "^4.0.0",
- "prettier": "^1.4.4",
+ "lint-staged": "^4.0.1",
+ "prettier": "^1.5.2",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1",
diff --git a/src/components/Touchable/Touchable.js b/src/components/Touchable/Touchable.js
index e1ccc95c..f975de84 100644
--- a/src/components/Touchable/Touchable.js
+++ b/src/components/Touchable/Touchable.js
@@ -376,9 +376,10 @@ const TouchableMixin = {
this.state.touchable.touchState = States.NOT_RESPONDER;
this.state.touchable.responderID = dispatchID;
this._receiveSignal(Signals.RESPONDER_GRANT, e);
- let delayMS = this.touchableGetHighlightDelayMS !== undefined
- ? Math.max(this.touchableGetHighlightDelayMS(), 0)
- : HIGHLIGHT_DELAY_MS;
+ let delayMS =
+ this.touchableGetHighlightDelayMS !== undefined
+ ? Math.max(this.touchableGetHighlightDelayMS(), 0)
+ : HIGHLIGHT_DELAY_MS;
delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS;
if (delayMS !== 0) {
this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS);
@@ -386,9 +387,10 @@ const TouchableMixin = {
this._handleDelay(e);
}
- let longDelayMS = this.touchableGetLongPressDelayMS !== undefined
- ? Math.max(this.touchableGetLongPressDelayMS(), 10)
- : LONG_PRESS_DELAY_MS;
+ let longDelayMS =
+ this.touchableGetLongPressDelayMS !== undefined
+ ? Math.max(this.touchableGetLongPressDelayMS(), 10)
+ : LONG_PRESS_DELAY_MS;
longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS;
this.longPressDelayTimeout = setTimeout(
this._handleLongDelay.bind(this, e),
diff --git a/src/components/Touchable/TouchableWithoutFeedback.js b/src/components/Touchable/TouchableWithoutFeedback.js
index b3ecc30a..873acfae 100644
--- a/src/components/Touchable/TouchableWithoutFeedback.js
+++ b/src/components/Touchable/TouchableWithoutFeedback.js
@@ -180,9 +180,10 @@ const TouchableWithoutFeedback = createReactClass({
children = React.Children.toArray(children);
children.push(Touchable.renderDebugView({ color: 'red', hitSlop: this.props.hitSlop }));
}
- const style = Touchable.TOUCH_TARGET_DEBUG && child.type && child.type.displayName === 'Text'
- ? [styles.root, this.props.disabled && styles.disabled, child.props.style, { color: 'red' }]
- : [styles.root, this.props.disabled && styles.disabled, child.props.style];
+ const style =
+ Touchable.TOUCH_TARGET_DEBUG && child.type && child.type.displayName === 'Text'
+ ? [styles.root, this.props.disabled && styles.disabled, child.props.style, { color: 'red' }]
+ : [styles.root, this.props.disabled && styles.disabled, child.props.style];
return (React: any).cloneElement(child, {
...other,
accessible: this.props.accessible !== false,
diff --git a/src/components/UnimplementedView/index.js b/src/components/UnimplementedView/index.js
index dbfe057b..48241148 100644
--- a/src/components/UnimplementedView/index.js
+++ b/src/components/UnimplementedView/index.js
@@ -38,12 +38,13 @@ class UnimplementedView extends Component {
}
}
-const unimplementedViewStyles = process.env.NODE_ENV !== 'production'
- ? {
- alignSelf: 'flex-start',
- borderColor: 'red',
- borderWidth: 1
- }
- : {};
+const unimplementedViewStyles =
+ process.env.NODE_ENV !== 'production'
+ ? {
+ alignSelf: 'flex-start',
+ borderColor: 'red',
+ borderWidth: 1
+ }
+ : {};
export default UnimplementedView;
diff --git a/src/components/View/__tests__/index-test.js b/src/components/View/__tests__/index-test.js
index 4a604364..125d44cf 100644
--- a/src/components/View/__tests__/index-test.js
+++ b/src/components/View/__tests__/index-test.js
@@ -14,7 +14,11 @@ describe('components/View', () => {
test('prop "children"', () => {
const children = ;
- const component = shallow({children});
+ const component = shallow(
+
+ {children}
+
+ );
expect(component.contains(children)).toEqual(true);
});
diff --git a/src/vendor/TouchHistoryMath/index.js b/src/vendor/TouchHistoryMath/index.js
index 0a30cfbb..bac290dd 100644
--- a/src/vendor/TouchHistoryMath/index.js
+++ b/src/vendor/TouchHistoryMath/index.js
@@ -22,17 +22,19 @@ var TouchHistoryMath = {
var total = 0;
var count = 0;
- var oneTouchData = touchHistory.numberActiveTouches === 1
- ? touchHistory.touchBank[touchHistory.indexOfSingleActiveTouch]
- : null;
+ var oneTouchData =
+ touchHistory.numberActiveTouches === 1
+ ? touchHistory.touchBank[touchHistory.indexOfSingleActiveTouch]
+ : null;
if (oneTouchData !== null) {
if (oneTouchData.touchActive && oneTouchData.currentTimeStamp > touchesChangedAfter) {
- total += ofCurrent && isXAxis
- ? oneTouchData.currentPageX
- : ofCurrent && !isXAxis
- ? oneTouchData.currentPageY
- : !ofCurrent && isXAxis ? oneTouchData.previousPageX : oneTouchData.previousPageY;
+ total +=
+ ofCurrent && isXAxis
+ ? oneTouchData.currentPageX
+ : ofCurrent && !isXAxis
+ ? oneTouchData.currentPageY
+ : !ofCurrent && isXAxis ? oneTouchData.previousPageX : oneTouchData.previousPageY;
count = 1;
}
} else {
diff --git a/yarn.lock b/yarn.lock
index 3983f03e..3b35a2c1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -180,7 +180,7 @@ ajv@^4.7.0:
co "^4.6.0"
json-stable-stringify "^1.0.1"
-ajv@^5.1.5:
+ajv@^5.1.5, ajv@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.0.tgz#c1735024c5da2ef75cc190713073d44f098bf486"
dependencies:
@@ -743,13 +743,13 @@ babel-plugin-transform-es2015-computed-properties@^6.3.13, babel-plugin-transfor
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-plugin-transform-es2015-destructuring@6.16.0, babel-plugin-transform-es2015-destructuring@^6.6.0:
+babel-plugin-transform-es2015-destructuring@6.16.0:
version "6.16.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.16.0.tgz#050fe0866f5d53b36062ee10cdf5bfe64f929627"
dependencies:
babel-runtime "^6.9.0"
-babel-plugin-transform-es2015-destructuring@^6.18.0, babel-plugin-transform-es2015-destructuring@^6.5.0:
+babel-plugin-transform-es2015-destructuring@^6.18.0, babel-plugin-transform-es2015-destructuring@^6.5.0, babel-plugin-transform-es2015-destructuring@^6.6.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
dependencies:
@@ -822,7 +822,7 @@ babel-plugin-transform-es2015-object-super@^6.3.13:
babel-helper-replace-supers "^6.24.1"
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-parameters@6.17.0, babel-plugin-transform-es2015-parameters@^6.6.0:
+babel-plugin-transform-es2015-parameters@6.17.0:
version "6.17.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.17.0.tgz#e06d30cef897f46adb4734707bbe128a0d427d58"
dependencies:
@@ -833,7 +833,7 @@ babel-plugin-transform-es2015-parameters@6.17.0, babel-plugin-transform-es2015-p
babel-traverse "^6.16.0"
babel-types "^6.16.0"
-babel-plugin-transform-es2015-parameters@^6.18.0, babel-plugin-transform-es2015-parameters@^6.5.0:
+babel-plugin-transform-es2015-parameters@^6.18.0, babel-plugin-transform-es2015-parameters@^6.5.0, babel-plugin-transform-es2015-parameters@^6.6.0:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
dependencies:
@@ -1995,13 +1995,13 @@ debounce@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.0.2.tgz#503cc674d8d7f737099664fb75ddbd36b9626dc6"
-debug@2.6.1:
+debug@2.6.1, debug@^2.2.0:
version "2.6.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351"
dependencies:
ms "0.7.2"
-debug@2.6.3:
+debug@2.6.3, debug@^2.6.3:
version "2.6.3"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d"
dependencies:
@@ -2013,7 +2013,7 @@ debug@^2.1.1:
dependencies:
ms "0.7.2"
-debug@^2.2.0, debug@^2.6.3, debug@^2.6.8:
+debug@^2.6.8:
version "2.6.8"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
dependencies:
@@ -2401,9 +2401,9 @@ escope@^3.6.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"
-eslint-config-prettier@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.2.0.tgz#ca47663852789a75c10feba673e802cc1eff085f"
+eslint-config-prettier@^2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.3.0.tgz#b75b1eabea0c8b97b34403647ee25db349b9d8a0"
dependencies:
get-stdin "^5.0.1"
@@ -2426,10 +2426,11 @@ eslint-scope@^3.7.1:
esrecurse "^4.1.0"
estraverse "^4.1.1"
-eslint@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.0.0.tgz#7277c01437fdf41dccd168d5aa0e49b75ca1f260"
+eslint@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.2.0.tgz#a2b3184111b198e02e9c7f3cca625a5e01c56b3d"
dependencies:
+ ajv "^5.2.0"
babel-code-frame "^6.22.0"
chalk "^1.1.3"
concat-stream "^1.6.0"
@@ -2446,12 +2447,12 @@ eslint@^4.0.0:
ignore "^3.3.3"
imurmurhash "^0.1.4"
inquirer "^3.0.6"
- is-my-json-valid "^2.16.0"
is-resolvable "^1.0.0"
js-yaml "^3.8.4"
json-stable-stringify "^1.0.1"
levn "^0.3.0"
lodash "^4.17.4"
+ minimatch "^3.0.2"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
optionator "^0.8.2"
@@ -2936,7 +2937,7 @@ glob-parent@^2.0.0:
dependencies:
is-glob "^2.0.0"
-glob@^7.0.0:
+glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies:
@@ -2947,7 +2948,7 @@ glob@^7.0.0:
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2:
+glob@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
@@ -3359,7 +3360,7 @@ is-glob@^2.0.0, is-glob@^2.0.1:
dependencies:
is-extglob "^1.0.0"
-is-my-json-valid@^2.12.4, is-my-json-valid@^2.16.0:
+is-my-json-valid@^2.12.4:
version "2.16.0"
resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693"
dependencies:
@@ -3941,9 +3942,9 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
-lint-staged@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.0.0.tgz#c15669f598614a6e68090303e175a799d48e0d85"
+lint-staged@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.0.1.tgz#05365469898439dbade8a455893cf11e24d12b0f"
dependencies:
app-root-path "^2.0.0"
cosmiconfig "^1.1.0"
@@ -4372,13 +4373,13 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
-minimatch@^3.0.0, minimatch@^3.0.2:
+minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
dependencies:
brace-expansion "^1.0.0"
-minimatch@^3.0.3, minimatch@^3.0.4:
+minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
@@ -5206,9 +5207,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
-prettier@^1.4.4:
- version "1.4.4"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.4.4.tgz#a8d1447b14c9bf67e6d420dcadd10fb9a4fad65a"
+prettier@^1.5.2:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.2.tgz#7ea0751da27b93bfb6cecfcec509994f52d83bb3"
pretty-format@^20.0.3:
version "20.0.3"
@@ -6276,16 +6277,7 @@ ua-parser-js@^0.7.9:
version "0.7.12"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb"
-uglify-js@^2.6, uglify-js@~2.7.3:
- version "2.7.4"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.4.tgz#a295a0de12b6a650c031c40deb0dc40b14568bd2"
- dependencies:
- async "~0.2.6"
- source-map "~0.5.1"
- uglify-to-browserify "~1.0.0"
- yargs "~3.10.0"
-
-uglify-js@^2.8.29:
+uglify-js@^2.6, uglify-js@^2.8.29:
version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
dependencies:
@@ -6294,6 +6286,15 @@ uglify-js@^2.8.29:
optionalDependencies:
uglify-to-browserify "~1.0.0"
+uglify-js@~2.7.3:
+ version "2.7.4"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.4.tgz#a295a0de12b6a650c031c40deb0dc40b14568bd2"
+ dependencies:
+ async "~0.2.6"
+ source-map "~0.5.1"
+ uglify-to-browserify "~1.0.0"
+ yargs "~3.10.0"
+
uglify-to-browserify@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"