Make code spacing more consistent
I'm a little surprised we don't have lint rules for this.
Ben Alpert committed
Apr 12, 2014 at 16:39 UTC
f923933ef370c10b0b59b1b699a5ed4786c3015c
6 files changed
+18
-18
src/addons/transitions/__tests__/ReactCSSTransitionGroup-test.js
+2
-2
@@ -126,7 +126,7 @@ describe('ReactCSSTransitionGroup', function() {
126
expect(a.getDOMNode().childNodes[1].id).toBe('two');
127
});
128
129
- it('should work with no children', function () {
129
+ it('should work with no children', function() {
130
React.renderComponent(
131
<ReactCSSTransitionGroup transitionName="yolo">
132
</ReactCSSTransitionGroup>,
@@ -134,7 +134,7 @@ describe('ReactCSSTransitionGroup', function() {
134
);
135
});
136
137
- it('should work with a null child', function () {
137
+ it('should work with a null child', function() {
138
React.renderComponent(
139
<ReactCSSTransitionGroup transitionName="yolo">
140
{[null]}
src/addons/transitions/__tests__/ReactTransitionChildMapping-test.js
+1
-1
@@ -117,7 +117,7 @@ describe('ReactTransitionChildMapping', function() {
117
});
118
});
119
120
- it('should support mergeChildMappings with undefined input', function () {
120
+ it('should support mergeChildMappings with undefined input', function() {
121
var prev = {
122
one: true,
123
two: true
src/browser/eventPlugins/AnalyticsEventPluginFactory.js
+1
-1
@@ -155,7 +155,7 @@ function extractEvents(
155
156
var analyticsIDAttribute = topLevelTarget.attributes[ANALYTICS_ID];
157
var analyticsEventsAttribute = topLevelTarget.attributes[ANALYTICS_EVENTS];
158
- if(!analyticsIDAttribute || !analyticsEventsAttribute) {
158
+ if (!analyticsIDAttribute || !analyticsEventsAttribute) {
159
return null;
160
}
161
src/utils/__tests__/LegacyImmutableObject-test.js
+1
-1
@@ -42,7 +42,7 @@ describe('LegacyImmutableObject', function() {
42
toBeSeriallyEqualTo: function(expected) {
43
var actual = this.actual;
44
var notText = this.isNot ? " not" : "";
45
- this.message = function () {
45
+ this.message = function() {
46
return "Expected " + JSON.stringify(actual) + notText +
47
" to be serially equal to " + JSON.stringify(expected);
48
};
src/utils/__tests__/ReactChildren-test.js
+7
-7
@@ -30,7 +30,7 @@ describe('ReactChildren', function() {
30
31
32
it('should support identity for simple', function() {
33
- var callback = jasmine.createSpy().andCallFake(function (kid, index) {
33
+ var callback = jasmine.createSpy().andCallFake(function(kid, index) {
34
return kid;
35
});
36
@@ -49,7 +49,7 @@ describe('ReactChildren', function() {
49
});
50
51
it('should treat single arrayless child as being in array', function() {
52
- var callback = jasmine.createSpy().andCallFake(function (kid, index) {
52
+ var callback = jasmine.createSpy().andCallFake(function(kid, index) {
53
return kid;
54
});
55
@@ -64,7 +64,7 @@ describe('ReactChildren', function() {
64
});
65
66
it('should treat single child in array as expected', function() {
67
- var callback = jasmine.createSpy().andCallFake(function (kid, index) {
67
+ var callback = jasmine.createSpy().andCallFake(function(kid, index) {
68
return kid;
69
});
70
@@ -79,7 +79,7 @@ describe('ReactChildren', function() {
79
});
80
81
it('should pass key to returned component', function() {
82
- var mapFn = function (kid, index) {
82
+ var mapFn = function(kid, index) {
83
return <div>{kid}</div>;
84
};
85
@@ -97,7 +97,7 @@ describe('ReactChildren', function() {
97
98
it('should invoke callback with the right context', function() {
99
var lastContext;
100
- var callback = function (kid, index) {
100
+ var callback = function(kid, index) {
101
lastContext = this;
102
return this;
103
};
@@ -130,7 +130,7 @@ describe('ReactChildren', function() {
130
var threeMapped = <span />; // Map from null to something.
131
var fourMapped = <div key="keyFour" />;
132
133
- var callback = jasmine.createSpy().andCallFake(function (kid, index) {
133
+ var callback = jasmine.createSpy().andCallFake(function(kid, index) {
134
return index === 0 ? zeroMapped :
135
index === 1 ? oneMapped :
136
index === 2 ? twoMapped :
@@ -202,7 +202,7 @@ describe('ReactChildren', function() {
202
var fourMapped = <div key="keyFour" />;
203
var fiveMapped = <div />;
204
205
- var callback = jasmine.createSpy().andCallFake(function (kid, index) {
205
+ var callback = jasmine.createSpy().andCallFake(function(kid, index) {
206
return index === 0 ? zeroMapped :
207
index === 1 ? oneMapped :
208
index === 2 ? twoMapped :
src/utils/__tests__/traverseAllChildren-test.js
+6
-6
@@ -31,7 +31,7 @@ describe('traverseAllChildren', function() {
31
it('should support identity for simple', function() {
32
var traverseContext = [];
33
var traverseFn =
34
- jasmine.createSpy().andCallFake(function (context, kid, key, index) {
34
+ jasmine.createSpy().andCallFake(function(context, kid, key, index) {
35
context.push(true);
36
});
37
@@ -52,7 +52,7 @@ describe('traverseAllChildren', function() {
52
it('should treat single arrayless child as being in array', function() {
53
var traverseContext = [];
54
var traverseFn =
55
- jasmine.createSpy().andCallFake(function (context, kid, key, index) {
55
+ jasmine.createSpy().andCallFake(function(context, kid, key, index) {
56
context.push(true);
57
});
58
@@ -71,7 +71,7 @@ describe('traverseAllChildren', function() {
71
it('should treat single child in array as expected', function() {
72
var traverseContext = [];
73
var traverseFn =
74
- jasmine.createSpy().andCallFake(function (context, kid, key, index) {
74
+ jasmine.createSpy().andCallFake(function(context, kid, key, index) {
75
context.push(true);
76
});
77
@@ -96,7 +96,7 @@ describe('traverseAllChildren', function() {
96
97
var traverseContext = [];
98
var traverseFn =
99
- jasmine.createSpy().andCallFake(function (context, kid, key, index) {
99
+ jasmine.createSpy().andCallFake(function(context, kid, key, index) {
100
context.push(true);
101
});
102
@@ -151,7 +151,7 @@ describe('traverseAllChildren', function() {
151
152
var traverseContext = [];
153
var traverseFn =
154
- jasmine.createSpy().andCallFake(function (context, kid, key, index) {
154
+ jasmine.createSpy().andCallFake(function(context, kid, key, index) {
155
context.push(true);
156
});
157
@@ -212,7 +212,7 @@ describe('traverseAllChildren', function() {
212
var oneForceKey = <div key="keyOne" />;
213
var traverseContext = [];
214
var traverseFn =
215
- jasmine.createSpy().andCallFake(function (context, kid, key, index) {
215
+ jasmine.createSpy().andCallFake(function(context, kid, key, index) {
216
context.push(true);
217
});
218