Skip to content

Commit 36fcbaa

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Prettier the rest of ReactNative
Reviewed By: yungsters Differential Revision: D7974340 fbshipit-source-id: 5fe457a8a9be4bd360fc3af9acb5c1136b2be0d7
1 parent aba4ec0 commit 36fcbaa

File tree

170 files changed

+5130
-3993
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+5130
-3993
lines changed

RNTester/RNTesterUnitTests/RNTesterUnitTestsBundle.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7+
* @format
78
*/
9+
810
'use strict';
911

10-
const __fbBatchedBridge = { // eslint-disable-line no-unused-vars
12+
const __fbBatchedBridge = {
13+
// eslint-disable-line no-unused-vars
1114
flushedQueue: function() {
1215
return null;
13-
}
16+
},
1417
};

RNTester/js/ARTExample.js

+71-55
Original file line numberDiff line numberDiff line change
@@ -4,76 +4,92 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7+
* @format
78
* @flow
89
*/
10+
911
'use strict';
1012

1113
var React = require('react');
1214
var ReactNative = require('react-native');
13-
var {
14-
ART,
15-
Platform,
16-
View,
17-
} = ReactNative;
18-
19-
const {
20-
Surface,
21-
Path,
22-
Group,
23-
Transform,
24-
Shape,
25-
} = ART;
15+
var {ART, Platform, View} = ReactNative;
2616

17+
const {Surface, Path, Group, Transform, Shape} = ART;
2718

2819
var scale = Platform.isTVOS ? 4 : 1;
2920

3021
class ARTExample extends React.Component<{}> {
31-
render(){
32-
const pathRect = new Path()
33-
.moveTo(scale * 0,scale * 0)
34-
.lineTo(scale * 0,scale * 110)
35-
.lineTo(scale * 110,scale * 110)
36-
.lineTo(scale * 110,scale * 0)
37-
.close();
22+
render() {
23+
const pathRect = new Path()
24+
.moveTo(scale * 0, scale * 0)
25+
.lineTo(scale * 0, scale * 110)
26+
.lineTo(scale * 110, scale * 110)
27+
.lineTo(scale * 110, scale * 0)
28+
.close();
3829

39-
const pathCircle0 = new Path()
40-
.moveTo(scale * 30,scale * 5)
41-
.arc(scale * 0,scale * 50,scale * 25)
42-
.arc(scale * 0,-scale * 50,scale * 25)
43-
.close();
30+
const pathCircle0 = new Path()
31+
.moveTo(scale * 30, scale * 5)
32+
.arc(scale * 0, scale * 50, scale * 25)
33+
.arc(scale * 0, -scale * 50, scale * 25)
34+
.close();
4435

45-
const pathCircle1 = new Path()
46-
.moveTo(scale * 30,scale * 55)
47-
.arc(scale * 0,scale * 50,scale * 25)
48-
.arc(scale * 0,-scale * 50,scale * 25)
49-
.close();
36+
const pathCircle1 = new Path()
37+
.moveTo(scale * 30, scale * 55)
38+
.arc(scale * 0, scale * 50, scale * 25)
39+
.arc(scale * 0, -scale * 50, scale * 25)
40+
.close();
5041

51-
const pathCircle2 = new Path()
52-
.moveTo(scale * 55,scale * 30)
53-
.arc(scale * 50,scale * 0,scale * 25)
54-
.arc(-scale * 50,scale * 0,scale * 25)
55-
.close();
42+
const pathCircle2 = new Path()
43+
.moveTo(scale * 55, scale * 30)
44+
.arc(scale * 50, scale * 0, scale * 25)
45+
.arc(-scale * 50, scale * 0, scale * 25)
46+
.close();
5647

57-
const pathCircle3 = new Path()
58-
.moveTo(scale * 55,scale * 80)
59-
.arc(scale * 50,scale * 0,scale * 25)
60-
.arc(-scale * 50,scale * 0,scale * 25)
61-
.close();
48+
const pathCircle3 = new Path()
49+
.moveTo(scale * 55, scale * 80)
50+
.arc(scale * 50, scale * 0, scale * 25)
51+
.arc(-scale * 50, scale * 0, scale * 25)
52+
.close();
6253

63-
return (
64-
<View>
65-
<Surface width={scale * 200} height={scale * 200}>
66-
<Group>
67-
<Shape d={pathRect} stroke="#000080" fill="#000080" strokeWidth={scale}/>
68-
<Shape d={pathCircle0} stroke="#FF0000" fill="#FF0000" strokeWidth={scale}/>
69-
<Shape d={pathCircle1} stroke="#00FF00" fill="#00FF00" strokeWidth={scale}/>
70-
<Shape d={pathCircle2} stroke="#00FFFF" fill="#00FFFF" strokeWidth={scale}/>
71-
<Shape d={pathCircle3} stroke="#FFFFFF" fill="#FFFFFF" strokeWidth={scale}/>
72-
</Group>
73-
</Surface>
74-
</View>
75-
);
76-
}
54+
return (
55+
<View>
56+
<Surface width={scale * 200} height={scale * 200}>
57+
<Group>
58+
<Shape
59+
d={pathRect}
60+
stroke="#000080"
61+
fill="#000080"
62+
strokeWidth={scale}
63+
/>
64+
<Shape
65+
d={pathCircle0}
66+
stroke="#FF0000"
67+
fill="#FF0000"
68+
strokeWidth={scale}
69+
/>
70+
<Shape
71+
d={pathCircle1}
72+
stroke="#00FF00"
73+
fill="#00FF00"
74+
strokeWidth={scale}
75+
/>
76+
<Shape
77+
d={pathCircle2}
78+
stroke="#00FFFF"
79+
fill="#00FFFF"
80+
strokeWidth={scale}
81+
/>
82+
<Shape
83+
d={pathCircle3}
84+
stroke="#FFFFFF"
85+
fill="#FFFFFF"
86+
strokeWidth={scale}
87+
/>
88+
</Group>
89+
</Surface>
90+
</View>
91+
);
92+
}
7793
}
7894

7995
exports.title = '<ART>';
@@ -84,6 +100,6 @@ exports.examples = [
84100
title: 'ART Example',
85101
render(): React.Element<any> {
86102
return <ARTExample />;
87-
}
103+
},
88104
},
89105
];

0 commit comments

Comments
 (0)