@samitouri / QOS-React-2 / commits / e2a57920da

lint whitespace , trailing comma

Henry Zhu committed Feb 13, 2015 at 23:13 UTC e2a57920daace826f8249db373dbb1bc1ef7184b
12 files changed +18 -18
src/addons/__tests__/update-test.js
+1 -1
@@ -42,7 +42,7 @@ describe('update', function() {
42 expect(update([1, 4, 3], {$splice: [[1, 1, 2]]})).toEqual([1, 2, 3]);
43 expect(update.bind(null, [], {$splice: 1})).toThrow(
44 'Invariant Violation: update(): expected spec of $splice to be an ' +
45 - 'array of arrays; got 1. Did you forget to wrap your parameters in an '+
45 + 'array of arrays; got 1. Did you forget to wrap your parameters in an ' +
46 'array?'
47 );
48 expect(update.bind(null, [], {$splice: [1]})).toThrow(
src/browser/__tests__/findDOMNode-test.js
+1 -1
@@ -41,7 +41,7 @@ describe('findDOMNode', function() {
41 });
42
43 it('findDOMNode should reject unmounted objects with render func', function() {
44 - expect(function() {React.findDOMNode({render: function(){}});})
44 + expect(function() {React.findDOMNode({render: function() {}});})
45 .toThrow('Invariant Violation: Component (with keys: render) ' +
46 'contains `render` method but is not mounted in the DOM'
47 );
src/browser/ui/__tests__/ReactDOMComponent-test.js
+3 -3
@@ -213,7 +213,7 @@ describe('ReactDOMComponent', function() {
213 var genMarkup;
214
215 function quoteRegexp(str) {
216 - return (str+'').replace(/([.?*+\^$\[\]\\(){}|-])/g, "\\$1");
216 + return (str + '').replace(/([.?*+\^$\[\]\\(){}|-])/g, "\\$1");
217 }
218
219 beforeEach(function() {
@@ -266,7 +266,7 @@ describe('ReactDOMComponent', function() {
266 var genMarkup;
267
268 function quoteRegexp(str) {
269 - return (str+'').replace(/([.?*+\^$\[\]\\(){}|-])/g, "\\$1");
269 + return (str + '').replace(/([.?*+\^$\[\]\\(){}|-])/g, "\\$1");
270 }
271
272 beforeEach(function() {
@@ -491,7 +491,7 @@ describe('ReactDOMComponent', function() {
491 var ReactTestUtils = require('ReactTestUtils');
492
493 spyOn(console, 'warn');
494 - ReactTestUtils.renderIntoDocument(<div onScroll={function(){}} />);
494 + ReactTestUtils.renderIntoDocument(<div onScroll={function() {}} />);
495 expect(console.warn.calls.length).toBe(1);
496 expect(console.warn.mostRecentCall.args[0]).toBe(
497 'Warning: This browser doesn\'t support the `onScroll` event'
src/core/__tests__/ReactCompositeComponent-test.js
+2 -2
@@ -623,8 +623,8 @@ describe('ReactCompositeComponent', function() {
623
624 expect(console.warn.argsForCall.length).toBe(1);
625 expect(console.warn.argsForCall[0][0]).toBe(
626 - 'Warning: owner-based and parent-based contexts differ '+
627 - '(values: `bar` vs `undefined`) for key (foo) '+
626 + 'Warning: owner-based and parent-based contexts differ ' +
627 + '(values: `bar` vs `undefined`) for key (foo) ' +
628 'while mounting Component (see: http://fb.me/react-context-by-parent)'
629 );
630
src/core/__tests__/ReactCompositeComponentNestedState-test.js
+1 -1
@@ -109,7 +109,7 @@ describe('ReactCompositeComponentNestedState-state', function() {
109 [ 'setState-args', 'dark blue', 'green' ],
110 [ 'render', 'light green', 'green' ],
111 [ 'parent-after-setState', 'green' ],
112 - [ 'after-setState', 'light green', 'green' ],
112 + [ 'after-setState', 'light green', 'green' ]
113 ]);
114 });
115 });
src/core/__tests__/ReactMultiChildReconcile-test.js
+1 -1
@@ -192,7 +192,7 @@ function verifyDomOrderingAccurate(parentInstance, statusDisplays) {
192 var statusDisplayNodes = containerNode.childNodes;
193 var i;
194 var orderedDomIds = [];
195 - for (i=0; i < statusDisplayNodes.length; i++) {
195 + for (i = 0; i < statusDisplayNodes.length; i++) {
196 orderedDomIds.push(ReactMount.getID(statusDisplayNodes[i]));
197 }
198
src/core/__tests__/refs-destruction-test.js
+1 -1
@@ -13,7 +13,7 @@
13
14 var React = require('React');
15 var ReactTestUtils = require('ReactTestUtils');
16 -var reactComponentExpect= require('reactComponentExpect');
16 +var reactComponentExpect = require('reactComponentExpect');
17
18 var TestComponent = React.createClass({
19 render: function() {
src/core/__tests__/refs-test.js
+2 -2
@@ -14,7 +14,7 @@
14 var React = require('React');
15 var ReactTestUtils = require('ReactTestUtils');
16
17 -var reactComponentExpect= require('reactComponentExpect');
17 +var reactComponentExpect = require('reactComponentExpect');
18
19
20 /**
@@ -34,7 +34,7 @@ var ClickCounter = React.createClass({
34 render: function() {
35 var children = [];
36 var i;
37 - for (i=0; i < this.state.count; i++) {
37 + for (i = 0; i < this.state.count; i++) {
38 children.push(
39 <div
40 className="clickLogDiv"
src/test/ReactTestUtils.js
+1 -1
@@ -170,7 +170,7 @@ var ReactTestUtils = {
170 var all =
171 ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className);
172 if (all.length !== 1) {
173 - throw new Error('Did not find exactly one match '+
173 + throw new Error('Did not find exactly one match ' +
174 '(found: ' + all.length + ') for class:' + className
175 );
176 }
src/test/worker.js
+2 -2
@@ -3,14 +3,14 @@
3
4 if (typeof console == 'undefined') {
5 this.console = {
6 - error: function(e){
6 + error: function(e) {
7 postMessage(JSON.stringify({
8 type: 'error',
9 message: e.message,
10 stack: e.stack
11 }));
12 },
13 - log: function(message){
13 + log: function(message) {
14 postMessage(JSON.stringify({
15 type: 'log',
16 message: message
src/utils/__tests__/OrderedMap-test.js
+1 -1
@@ -78,7 +78,7 @@ var hasUndefinedStringKey = [
78 var hasPositiveNumericKey = [
79 {uniqueID: 'notANumber', data: []},
80 {uniqueID: '5', data: []},
81 - {uniqueID: 'notAnotherNumber',data: []}
81 + {uniqueID: 'notAnotherNumber', data: []}
82 ];
83
84 var hasZeroStringKey = [
src/utils/__tests__/traverseAllChildren-test.js
+2 -2
@@ -351,7 +351,7 @@ describe('traverseAllChildren', function() {
351 return {
352 next: function() {
353 if (i++ < 3) {
354 - return { value: <div key={'#'+i} />, done: false };
354 + return { value: <div key={'#' + i} />, done: false };
355 } else {
356 return { value: undefined, done: true };
357 }
@@ -402,7 +402,7 @@ describe('traverseAllChildren', function() {
402 return {
403 next: function() {
404 if (i++ < 3) {
405 - return { value: ['#'+i, <div />], done: false };
405 + return { value: ['#' + i, <div />], done: false };
406 } else {
407 return { value: undefined, done: true };
408 }