mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[lint] convert to single quotes
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -152,7 +152,7 @@ function extractEvents(
|
||||
return null;
|
||||
}
|
||||
|
||||
var analyticsEventsArr = analyticsEventsStr.split(",");
|
||||
var analyticsEventsArr = analyticsEventsStr.split(',');
|
||||
if (!analyticsData.hasOwnProperty(analyticsID)) {
|
||||
initAnalyticsDataForID(analyticsID, analyticsEventsArr);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ var Danger = {
|
||||
|
||||
} else if (__DEV__) {
|
||||
console.error(
|
||||
"Danger: Discarding unexpected node:",
|
||||
'Danger: Discarding unexpected node:',
|
||||
renderNode
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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 ' +
|
||||
|
||||
@@ -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.'
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
'use strict';
|
||||
|
||||
var ESCAPE_LOOKUP = {
|
||||
"&": "&",
|
||||
">": ">",
|
||||
"<": "<",
|
||||
"\"": """,
|
||||
"'": "'"
|
||||
'&': '&',
|
||||
'>': '>',
|
||||
'<': '<',
|
||||
'"': '"',
|
||||
'\'': '''
|
||||
};
|
||||
|
||||
var ESCAPE_REGEX = /[&><"']/g;
|
||||
|
||||
Reference in New Issue
Block a user