From 4237a27ec9bff8632b9603929a511dcbe06ec0fe Mon Sep 17 00:00:00 2001 From: trave7er Date: Mon, 15 Feb 2016 15:13:42 -0800 Subject: [PATCH] pick up some easy-to-fix lint warnings Reviewed By: svcscm Differential Revision: D2938097 fb-gh-sync-id: e3373bd44267251d8351d5203be1c88676aa8685 shipit-source-id: e3373bd44267251d8351d5203be1c88676aa8685 --- .../DatePickerAndroid/DatePickerAndroid.android.js | 2 +- .../Components/DatePickerAndroid/DatePickerAndroid.ios.js | 2 +- Libraries/Components/Picker/PickerAndroid.android.js | 3 ++- Libraries/Components/Switch/Switch.js | 2 +- .../TimePickerAndroid/TimePickerAndroid.android.js | 2 +- .../Components/TimePickerAndroid/TimePickerAndroid.ios.js | 2 +- Libraries/Components/Touchable/TouchableHighlight.js | 6 +++--- Libraries/Components/Touchable/TouchableWithoutFeedback.js | 2 +- Libraries/Components/View/View.js | 2 +- Libraries/Components/WebView/WebView.android.js | 2 +- Libraries/Components/WebView/WebView.ios.js | 2 +- 11 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js b/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js index d446544c6..64ae4a506 100644 --- a/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +++ b/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js @@ -52,7 +52,7 @@ class DatePickerAndroid { * * `date` (`Date` object or timestamp in milliseconds) - date to show by default * * `minDate` (`Date` or timestamp in milliseconds) - minimum date that can be selected * * `maxDate` (`Date` object or timestamp in milliseconds) - minimum date that can be selected - * + * * Returns a Promise which will be invoked an object containing `action`, `year`, `month` (0-11), * `day` if the user picked a date. If the user dismissed the dialog, the Promise will * still be resolved with action being `DatePickerAndroid.dismissedAction` and all the other keys diff --git a/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js b/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js index b0ab643fa..784bc2c82 100644 --- a/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +++ b/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js @@ -19,6 +19,6 @@ const DatePickerAndroid = { message: 'DatePickerAndroid is not supported on this platform.' }); }, -} +}; module.exports = DatePickerAndroid; diff --git a/Libraries/Components/Picker/PickerAndroid.android.js b/Libraries/Components/Picker/PickerAndroid.android.js index 2e95b32f1..71d7b35e8 100644 --- a/Libraries/Components/Picker/PickerAndroid.android.js +++ b/Libraries/Components/Picker/PickerAndroid.android.js @@ -134,7 +134,8 @@ var cfg = { items: true, selected: true, } -} +}; + var DropdownPicker = requireNativeComponent('AndroidDropdownPicker', PickerAndroid, cfg); var DialogPicker = requireNativeComponent('AndroidDialogPicker', PickerAndroid, cfg); diff --git a/Libraries/Components/Switch/Switch.js b/Libraries/Components/Switch/Switch.js index 9816db385..273139e71 100644 --- a/Libraries/Components/Switch/Switch.js +++ b/Libraries/Components/Switch/Switch.js @@ -44,7 +44,7 @@ var Switch = React.createClass({ * Used to locate this view in end-to-end tests. */ testID: React.PropTypes.string, - + /** * Background color when the switch is turned off. * @platform ios diff --git a/Libraries/Components/TimePickerAndroid/TimePickerAndroid.android.js b/Libraries/Components/TimePickerAndroid/TimePickerAndroid.android.js index 98bf034a8..14480040c 100644 --- a/Libraries/Components/TimePickerAndroid/TimePickerAndroid.android.js +++ b/Libraries/Components/TimePickerAndroid/TimePickerAndroid.android.js @@ -62,6 +62,6 @@ class TimePickerAndroid { * The dialog has been dismissed. */ static get dismissedAction() { return 'dismissedAction'; } -}; +} module.exports = TimePickerAndroid; diff --git a/Libraries/Components/TimePickerAndroid/TimePickerAndroid.ios.js b/Libraries/Components/TimePickerAndroid/TimePickerAndroid.ios.js index df993ba92..02eae1e1f 100644 --- a/Libraries/Components/TimePickerAndroid/TimePickerAndroid.ios.js +++ b/Libraries/Components/TimePickerAndroid/TimePickerAndroid.ios.js @@ -19,6 +19,6 @@ const TimePickerAndroid = { message: 'TimePickerAndroid is not supported on this platform.' }); }, -} +}; module.exports = TimePickerAndroid; diff --git a/Libraries/Components/Touchable/TouchableHighlight.js b/Libraries/Components/Touchable/TouchableHighlight.js index ca9412666..9a514e46b 100644 --- a/Libraries/Components/Touchable/TouchableHighlight.js +++ b/Libraries/Components/Touchable/TouchableHighlight.js @@ -213,9 +213,9 @@ var TouchableHighlight = React.createClass({ _hasPressHandler: function() { return !!( - this.props.onPress || - this.props.onPressIn || - this.props.onPressOut || + this.props.onPress || + this.props.onPressIn || + this.props.onPressOut || this.props.onLongPress ); }, diff --git a/Libraries/Components/Touchable/TouchableWithoutFeedback.js b/Libraries/Components/Touchable/TouchableWithoutFeedback.js index 5a578a205..5312c1f87 100755 --- a/Libraries/Components/Touchable/TouchableWithoutFeedback.js +++ b/Libraries/Components/Touchable/TouchableWithoutFeedback.js @@ -29,7 +29,7 @@ var PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30}; * 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 several child components, wrap them in a View. diff --git a/Libraries/Components/View/View.js b/Libraries/Components/View/View.js index a7f31f9a0..8dc695341 100644 --- a/Libraries/Components/View/View.js +++ b/Libraries/Components/View/View.js @@ -53,7 +53,7 @@ const AccessibilityComponentType = [ const forceTouchAvailable = (UIManager.RCTView.Constants && UIManager.RCTView.Constants.forceTouchAvailable) || false; - + const statics = { AccessibilityTraits, AccessibilityComponentType, diff --git a/Libraries/Components/WebView/WebView.android.js b/Libraries/Components/WebView/WebView.android.js index 44ad8a925..2c8e2312d 100644 --- a/Libraries/Components/WebView/WebView.android.js +++ b/Libraries/Components/WebView/WebView.android.js @@ -186,7 +186,7 @@ var WebView = React.createClass({ } else if (this.props.url) { source.uri = this.props.url; } - + if (source.method === 'POST' && source.headers) { console.warn('WebView: `source.headers` is not supported when using POST.'); } else if (source.method === 'GET' && source.body) { diff --git a/Libraries/Components/WebView/WebView.ios.js b/Libraries/Components/WebView/WebView.ios.js index 7714d383d..3b37331ae 100644 --- a/Libraries/Components/WebView/WebView.ios.js +++ b/Libraries/Components/WebView/WebView.ios.js @@ -18,7 +18,7 @@ var StyleSheet = require('StyleSheet'); var Text = require('Text'); var UIManager = require('UIManager'); var View = require('View'); -var ScrollView = require('ScrollView') +var ScrollView = require('ScrollView'); var deprecatedPropType = require('deprecatedPropType'); var invariant = require('invariant');