Skip to content

Commit b5ab849

Browse files
Fix prettier
1 parent acf6aaa commit b5ab849

4 files changed

Lines changed: 44 additions & 28 deletions

File tree

‎packages/react-native/Libraries/Components/View/View.js‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,26 @@ component View(
7373
};
7474
// macOS]
7575

76-
const {
77-
accessibilityState,
78-
accessibilityValue,
79-
'aria-busy': ariaBusy,
80-
'aria-checked': ariaChecked,
81-
'aria-disabled': ariaDisabled,
82-
'aria-expanded': ariaExpanded,
83-
'aria-hidden': ariaHidden,
84-
'aria-label': ariaLabel,
85-
'aria-labelledby': ariaLabelledBy,
86-
'aria-live': ariaLive,
87-
'aria-selected': ariaSelected,
88-
'aria-valuemax': ariaValueMax,
89-
'aria-valuemin': ariaValueMin,
90-
'aria-valuenow': ariaValueNow,
91-
'aria-valuetext': ariaValueText,
92-
id,
93-
tabIndex,
94-
...otherProps
95-
} = props;
76+
const {
77+
accessibilityState,
78+
accessibilityValue,
79+
'aria-busy': ariaBusy,
80+
'aria-checked': ariaChecked,
81+
'aria-disabled': ariaDisabled,
82+
'aria-expanded': ariaExpanded,
83+
'aria-hidden': ariaHidden,
84+
'aria-label': ariaLabel,
85+
'aria-labelledby': ariaLabelledBy,
86+
'aria-live': ariaLive,
87+
'aria-selected': ariaSelected,
88+
'aria-valuemax': ariaValueMax,
89+
'aria-valuemin': ariaValueMin,
90+
'aria-valuenow': ariaValueNow,
91+
'aria-valuetext': ariaValueText,
92+
id,
93+
tabIndex,
94+
...otherProps
95+
} = props;
9696

9797
// Since we destructured props, we can now treat it as mutable
9898
const processedProps = otherProps as {...ViewProps};
@@ -158,10 +158,10 @@ component View(
158158
};
159159
}
160160
// [macOS
161-
if(otherProps.onKeyDown){
161+
if (otherProps.onKeyDown) {
162162
processedProps.onKeyDown = _onKeyDown;
163163
}
164-
if(otherProps.onKeyUp){
164+
if (otherProps.onKeyUp) {
165165
processedProps.onKeyUp = _onKeyUp;
166166
}
167167
// macOS]

‎packages/react-native/Libraries/Utilities/__tests__/Platform-test.js‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,31 @@ describe('Platform', () => {
2929

3030
describe('select', () => {
3131
it('should return platform specific value', () => {
32-
const obj: PlatformSelectSpec<string> = {ios: 'ios', android: 'android', macos: 'macos'}; // [macOS]
32+
const obj: PlatformSelectSpec<string> = {
33+
ios: 'ios',
34+
android: 'android',
35+
macos: 'macos',
36+
}; // [macOS]
3337
expect(PlatformIOS.select(obj)).toEqual(obj.ios);
3438
expect(PlatformAndroid.select(obj)).toEqual(obj.android);
3539
expect(PlatformMacOS.select(obj)).toEqual(obj.macos); // [macOS]
3640
});
3741

3842
// [macOS
3943
it('should return correct platform given partial platform overrides', () => {
40-
const iosSpecific = {ios: 'ios', native: 'native'} as PlatformSelectSpec<string>;
44+
const iosSpecific = {
45+
ios: 'ios',
46+
native: 'native',
47+
} as PlatformSelectSpec<string>;
4148

4249
expect(PlatformIOS.select(iosSpecific)).toEqual(iosSpecific.ios);
4350
expect(PlatformAndroid.select(iosSpecific)).toEqual(iosSpecific.native);
4451
expect(PlatformMacOS.select(iosSpecific)).toEqual(iosSpecific.native);
4552

46-
const androidSpecific = {android: 'android', native: 'native'} as PlatformSelectSpec<string>;
53+
const androidSpecific = {
54+
android: 'android',
55+
native: 'native',
56+
} as PlatformSelectSpec<string>;
4757
expect(PlatformIOS.select(androidSpecific)).toEqual(
4858
androidSpecific.native,
4959
);
@@ -54,7 +64,10 @@ describe('Platform', () => {
5464
androidSpecific.native,
5565
);
5666

57-
const macosSpecific = {macos: 'macos', native: 'native'} as PlatformSelectSpec<string>;
67+
const macosSpecific = {
68+
macos: 'macos',
69+
native: 'native',
70+
} as PlatformSelectSpec<string>;
5871
expect(PlatformIOS.select(macosSpecific)).toEqual(macosSpecific.native);
5972
expect(PlatformAndroid.select(macosSpecific)).toEqual(
6073
macosSpecific.native,

‎packages/rn-tester/js/examples/PlatformColor/PlatformColorExample.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ exports.examples = [
608608
return <VariantColorsExample />;
609609
},
610610
},
611-
{
611+
{
612612
title: 'Reacts to Appearance Changes',
613613
render(): React.MixedElement {
614614
return <ReactsToAppearanceChangesExample />;

‎packages/rn-tester/js/examples/Touchable/TouchableExample.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,10 @@ class TouchableHover extends React.Component<{}, {hoverOver: boolean}> {
533533
};
534534
}
535535

536-
class TouchableMouseEvents extends React.Component<{}, {eventLog: Array<string>}> {
536+
class TouchableMouseEvents extends React.Component<
537+
{},
538+
{eventLog: Array<string>},
539+
> {
537540
state: {eventLog: Array<string>} = {
538541
eventLog: [],
539542
};

0 commit comments

Comments
 (0)