Skip to content

Commit

Permalink
[ReactNative] clean lint for Libraries/Components
Browse files Browse the repository at this point in the history
  • Loading branch information
sahrens committed May 18, 2015
1 parent 33ac55b commit 1c70f33
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers
"no-wrap-func": 1, // disallow wrapping of non-IIFE statements in parens
"no-mixed-spaces-and-tabs": 1, // disallow mixed spaces and tabs for indentation
"quotes": [1, "single"], // specify whether double or single quotes should be used
"quotes": [1, "single", "avoid-escape"], // specify whether double or single quotes should be used
"quote-props": 0, // require quotes around object literal property names (off by default)
"semi": 1, // require or disallow use of semicolons instead of ASI
"sort-vars": 0, // sort variables within the same declaration block (off by default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
'use strict';

var NativeMethodsMixin = require('NativeMethodsMixin');
var NativeModules = require('NativeModules');
var PropTypes = require('ReactPropTypes');
var React = require('React');
var StyleSheet = require('StyleSheet');
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Components/ScrollResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ var ScrollResponderMixin = {
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
if (!this.props.keyboardShouldPersistTaps &&
currentlyFocusedTextInput != null &&
e.target != currentlyFocusedTextInput) {
e.target !== currentlyFocusedTextInput) {
return true;
}
return this.scrollResponderIsAnimating();
Expand Down Expand Up @@ -244,7 +244,7 @@ var ScrollResponderMixin = {
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
if (!this.props.keyboardShouldPersistTaps &&
currentlyFocusedTextInput != null &&
e.target != currentlyFocusedTextInput &&
e.target !== currentlyFocusedTextInput &&
!this.state.observedScrollSinceBecomingResponder &&
!this.state.becameResponderWhileAnimating) {
this.props.onScrollResponderKeyboardDismissed &&
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Subscribable.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
'use strict';

var EventEmitter = require('EventEmitter');
import type EventEmitter from 'EventEmitter';

/**
* Subscribable provides a mixin for safely subscribing a component to an
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Components/WebView/WebView.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var WebView = React.createClass({
errorEvent.code,
errorEvent.description);
} else if (this.state.viewState !== WebViewState.IDLE) {
console.error("RCTWebView invalid state encountered: " + this.state.loading);
console.error('RCTWebView invalid state encountered: ' + this.state.loading);
}

var webViewStyles = [styles.container, this.props.style];
Expand Down Expand Up @@ -152,7 +152,7 @@ var WebView = React.createClass({

onLoadingError: function(event) {
event.persist(); // persist this event because we need to store it
console.error("encountered an error loading page", event.nativeEvent);
console.error('Encountered an error loading page', event.nativeEvent);

this.setState({
lastErrorEvent: event.nativeEvent,
Expand Down
3 changes: 1 addition & 2 deletions Libraries/Components/WebView/WebView.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
var ActivityIndicatorIOS = require('ActivityIndicatorIOS');
var EdgeInsetsPropType = require('EdgeInsetsPropType');
var React = require('React');
var ReactNativeViewAttributes = require('ReactNativeViewAttributes');
var StyleSheet = require('StyleSheet');
var Text = require('Text');
var View = require('View');
Expand Down Expand Up @@ -198,7 +197,7 @@ var WebView = React.createClass({

onLoadingError: function(event: Event) {
event.persist(); // persist this event because we need to store it
console.error("encountered an error loading page", event.nativeEvent);
console.error('Encountered an error loading page', event.nativeEvent);

this.setState({
lastErrorEvent: event.nativeEvent,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
],
"scripts": {
"test": "jest",
"lint": "node linter.js Examples/",
"lint": "node linter.js Examples/ Libraries/Components",
"start": "./packager/packager.sh"
},
"bin": {
Expand Down

0 comments on commit 1c70f33

Please sign in to comment.