diff --git a/src/browser/ReactBrowserEventEmitter.js b/src/browser/ReactBrowserEventEmitter.js index 44353fdfcc..a3fa84f73e 100644 --- a/src/browser/ReactBrowserEventEmitter.js +++ b/src/browser/ReactBrowserEventEmitter.js @@ -126,7 +126,7 @@ var topEventMapping = { /** * To ensure no conflicts with other potential React instances on the page */ -var topListenersIDKey = "_reactListenersID" + String(Math.random()).slice(2); +var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); function getListeningForDocument(mountAt) { // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` diff --git a/src/browser/eventPlugins/AnalyticsEventPluginFactory.js b/src/browser/eventPlugins/AnalyticsEventPluginFactory.js index 074ec3bbaa..858e3d5525 100644 --- a/src/browser/eventPlugins/AnalyticsEventPluginFactory.js +++ b/src/browser/eventPlugins/AnalyticsEventPluginFactory.js @@ -152,7 +152,7 @@ function extractEvents( return null; } - var analyticsEventsArr = analyticsEventsStr.split(","); + var analyticsEventsArr = analyticsEventsStr.split(','); if (!analyticsData.hasOwnProperty(analyticsID)) { initAnalyticsDataForID(analyticsID, analyticsEventsArr); } diff --git a/src/browser/ui/dom/Danger.js b/src/browser/ui/dom/Danger.js index 2b4dcf6121..9dc56d278f 100644 --- a/src/browser/ui/dom/Danger.js +++ b/src/browser/ui/dom/Danger.js @@ -124,7 +124,7 @@ var Danger = { } else if (__DEV__) { console.error( - "Danger: Discarding unexpected node:", + 'Danger: Discarding unexpected node:', renderNode ); } diff --git a/src/core/ReactCompositeComponent.js b/src/core/ReactCompositeComponent.js index a45fb0b883..1c5112a439 100644 --- a/src/core/ReactCompositeComponent.js +++ b/src/core/ReactCompositeComponent.js @@ -746,7 +746,7 @@ var ReactCompositeComponentMixin = assign({}, inst.shouldComponentUpdate(nextProps, nextState, nextContext); if (__DEV__) { - if (typeof shouldUpdate === "undefined") { + if (typeof shouldUpdate === 'undefined') { console.warn( (this.getName() || 'ReactCompositeComponent') + '.shouldComponentUpdate(): Returned undefined instead of a ' + diff --git a/src/core/ReactUpdates.js b/src/core/ReactUpdates.js index 9ed5ba0957..3bbb40215f 100644 --- a/src/core/ReactUpdates.js +++ b/src/core/ReactUpdates.js @@ -192,7 +192,7 @@ flushBatchedUpdates = ReactPerf.measure( */ function enqueueUpdate(component, callback) { invariant( - !callback || typeof callback === "function", + !callback || typeof callback === 'function', 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.' diff --git a/src/utils/CallbackQueue.js b/src/utils/CallbackQueue.js index 96b86ba3da..8268312993 100644 --- a/src/utils/CallbackQueue.js +++ b/src/utils/CallbackQueue.js @@ -60,7 +60,7 @@ assign(CallbackQueue.prototype, { if (callbacks) { invariant( callbacks.length === contexts.length, - "Mismatched list of contexts in callback queue" + 'Mismatched list of contexts in callback queue' ); this._callbacks = null; this._contexts = null; diff --git a/src/utils/escapeTextForBrowser.js b/src/utils/escapeTextForBrowser.js index 92416edf9a..8f8b435b39 100644 --- a/src/utils/escapeTextForBrowser.js +++ b/src/utils/escapeTextForBrowser.js @@ -13,11 +13,11 @@ 'use strict'; var ESCAPE_LOOKUP = { - "&": "&", - ">": ">", - "<": "<", - "\"": """, - "'": "'" + '&': '&', + '>': '>', + '<': '<', + '"': '"', + '\'': ''' }; var ESCAPE_REGEX = /[&><"']/g;