From 0a3694ce48be8991839c42aab2586202a12d43aa Mon Sep 17 00:00:00 2001 From: Huang Yu Date: Tue, 1 Dec 2015 07:24:14 -0800 Subject: [PATCH] fix several lint warnings Summary: fix some ling warnings from several files Closes https://github.com/facebook/react-native/pull/4450 Reviewed By: svcscm Differential Revision: D2707606 Pulled By: mkonicek fb-gh-sync-id: 410ccacf061ac7b0f6e44d1a5e4621a9d1d606fc --- Libraries/Components/MapView/MapView.js | 2 +- Libraries/Components/View/ViewStylePropTypes.js | 2 +- .../Initialization/InitializeJavaScriptAppEngine.js | 2 +- Libraries/LinkingIOS/LinkingIOS.js | 2 +- Libraries/Network/XMLHttpRequest.ios.js | 1 - Libraries/Picker/PickerIOS.ios.js | 2 -- Libraries/RCTTest/SnapshotViewIOS.ios.js | 1 - 7 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Libraries/Components/MapView/MapView.js b/Libraries/Components/MapView/MapView.js index 2dc4fdf30..74f2774d6 100644 --- a/Libraries/Components/MapView/MapView.js +++ b/Libraries/Components/MapView/MapView.js @@ -232,7 +232,7 @@ var MapView = React.createClass({ * @platform ios */ image: Image.propTypes.source, - + /** * annotation id */ diff --git a/Libraries/Components/View/ViewStylePropTypes.js b/Libraries/Components/View/ViewStylePropTypes.js index 9f7ba776a..957679705 100644 --- a/Libraries/Components/View/ViewStylePropTypes.js +++ b/Libraries/Components/View/ViewStylePropTypes.js @@ -48,7 +48,7 @@ var ViewStylePropTypes = { shadowOpacity: ReactPropTypes.number, shadowRadius: ReactPropTypes.number, /** - * (Android-only) Sets the elevation of a view, using Android's underlying + * (Android-only) Sets the elevation of a view, using Android's underlying * [elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation). * This adds a drop shadow to the item and affects z-order for overlapping views. * Only supported on Android 5.0+, has no effect on earlier versions. diff --git a/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js b/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js index 9c2b7f584..141ea7045 100644 --- a/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js +++ b/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js @@ -53,7 +53,7 @@ function setUpConsole() { * For more info on that particular case, see: * https://github.com/facebook/react-native/issues/934 */ -function polyfillGlobal(name, newValue, scope=GLOBAL) { +function polyfillGlobal(name, newValue, scope = GLOBAL) { var descriptor = Object.getOwnPropertyDescriptor(scope, name) || { // jest for some bad reasons runs the polyfill code multiple times. In jest // environment, XmlHttpRequest doesn't exist so getOwnPropertyDescriptor diff --git a/Libraries/LinkingIOS/LinkingIOS.js b/Libraries/LinkingIOS/LinkingIOS.js index 0ee8367df..7ee6ace38 100644 --- a/Libraries/LinkingIOS/LinkingIOS.js +++ b/Libraries/LinkingIOS/LinkingIOS.js @@ -130,7 +130,7 @@ class LinkingIOS { * Determine whether or not an installed app can handle a given URL. * The callback function will be called with `bool supported` as the only argument * - * NOTE: As of iOS 9, your app needs to provide a `LSApplicationQueriesSchemes` key + * NOTE: As of iOS 9, your app needs to provide a `LSApplicationQueriesSchemes` key * inside `Info.plist`. */ static canOpenURL(url: string, callback: Function) { diff --git a/Libraries/Network/XMLHttpRequest.ios.js b/Libraries/Network/XMLHttpRequest.ios.js index 56b319a25..21614ff36 100644 --- a/Libraries/Network/XMLHttpRequest.ios.js +++ b/Libraries/Network/XMLHttpRequest.ios.js @@ -13,7 +13,6 @@ var FormData = require('FormData'); var RCTNetworking = require('RCTNetworking'); -var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter'); var XMLHttpRequestBase = require('XMLHttpRequestBase'); diff --git a/Libraries/Picker/PickerIOS.ios.js b/Libraries/Picker/PickerIOS.ios.js index 924f13573..5c245397d 100644 --- a/Libraries/Picker/PickerIOS.ios.js +++ b/Libraries/Picker/PickerIOS.ios.js @@ -15,13 +15,11 @@ var NativeMethodsMixin = require('NativeMethodsMixin'); var React = require('React'); var ReactChildren = require('ReactChildren'); -var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); var RCTPickerIOSConsts = require('NativeModules').UIManager.RCTPicker.Constants; var StyleSheet = require('StyleSheet'); var View = require('View'); var requireNativeComponent = require('requireNativeComponent'); -var merge = require('merge'); var PICKER = 'picker'; diff --git a/Libraries/RCTTest/SnapshotViewIOS.ios.js b/Libraries/RCTTest/SnapshotViewIOS.ios.js index 7b6294be1..3ecefdc3d 100644 --- a/Libraries/RCTTest/SnapshotViewIOS.ios.js +++ b/Libraries/RCTTest/SnapshotViewIOS.ios.js @@ -11,7 +11,6 @@ */ 'use strict'; -var Platform = require('Platform'); var React = require('React'); var StyleSheet = require('StyleSheet'); var { TestModule, UIManager } = require('NativeModules');