mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Fix ESLint warnings using 'yarn lint --fix'
Summary: Hi! I would like to contribute to React Native, and I am just starting out. I forked the repo and found that it has quite a lot of ESLint warnings – many of which were automatically fixable. This PR is simply the result of running `yarn lint --fix` from the root folder. Most changes are removing trailing spaces from comments. Haven't really done any manual testing, since I haven't done any code changes manually. `yarn test` runs fine, `yarn flow` runs fine, `yarn prettier` is satisfied. N/A [INTERNAL][MINOR][] - Fix ESLint warnings Closes https://github.com/facebook/react-native/pull/18047 Differential Revision: D7054948 Pulled By: hramos fbshipit-source-id: d53e692698d1687de5821c3fb5cdb76a5e03b71e
This commit is contained in:
committed by
Facebook Github Bot
parent
47e57ef8c1
commit
edb6ca72fd
@@ -45,8 +45,8 @@ class AppState extends NativeEventEmitter {
|
||||
let eventUpdated = false;
|
||||
|
||||
// TODO: this is a terrible solution - in order to ensure `currentState`
|
||||
// prop is up to date, we have to register an observer that updates it
|
||||
// whenever the state changes, even if nobody cares. We should just
|
||||
// prop is up to date, we have to register an observer that updates it
|
||||
// whenever the state changes, even if nobody cares. We should just
|
||||
// deprecate the `currentState` property and get rid of this.
|
||||
this.addListener(
|
||||
'appStateDidChange',
|
||||
@@ -70,14 +70,14 @@ class AppState extends NativeEventEmitter {
|
||||
}
|
||||
|
||||
// TODO: now that AppState is a subclass of NativeEventEmitter, we could
|
||||
// deprecate `addEventListener` and `removeEventListener` and just use
|
||||
// addListener` and `listener.remove()` directly. That will be a breaking
|
||||
// deprecate `addEventListener` and `removeEventListener` and just use
|
||||
// addListener` and `listener.remove()` directly. That will be a breaking
|
||||
// change though, as both the method and event names are different
|
||||
// (addListener events are currently required to be globally unique).
|
||||
/**
|
||||
* Add a handler to AppState changes by listening to the `change` event type
|
||||
* and providing the handler.
|
||||
*
|
||||
*
|
||||
* See http://facebook.github.io/react-native/docs/appstate.html#addeventlistener
|
||||
*/
|
||||
addEventListener(
|
||||
@@ -105,7 +105,7 @@ class AppState extends NativeEventEmitter {
|
||||
|
||||
/**
|
||||
* Remove a handler by passing the `change` event type and the handler.
|
||||
*
|
||||
*
|
||||
* See http://facebook.github.io/react-native/docs/appstate.html#removeeventlistener
|
||||
*/
|
||||
removeEventListener(
|
||||
|
||||
Reference in New Issue
Block a user