Skip to content

Commit f689a3c

Browse files
SamChou19815meta-codesync[bot]
authored andcommitted
Bump to latest prettier (#57473)
Summary: Pull Request resolved: #57473 Changelog: [Internal] Differential Revision: D110952668
1 parent b67b7ba commit f689a3c

51 files changed

Lines changed: 388 additions & 746 deletions

Some content is hidden

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@
106106
"micromatch": "^4.0.4",
107107
"node-fetch": "^2.2.0",
108108
"nullthrows": "^1.1.1",
109-
"prettier": "3.6.2",
110-
"prettier-plugin-hermes-parser": "0.36.0",
109+
"prettier": "3.9.4",
110+
"prettier-plugin-hermes-parser": "0.37.0",
111111
"react": "19.2.3",
112112
"react-test-renderer": "19.2.3",
113113
"rimraf": "^3.0.2",

packages/debugger-frontend/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010

1111
const path = require('path');
1212

13-
let frontEndPath = path.join(__dirname, 'dist', 'third-party', 'front_end');
13+
let frontEndPath /*:string */ = path.join(
14+
__dirname,
15+
'dist',
16+
'third-party',
17+
'front_end',
18+
);
1419

1520
if (process.env.REACT_NATIVE_DEBUGGER_FRONTEND_PATH != null) {
1621
frontEndPath = process.env.REACT_NATIVE_DEBUGGER_FRONTEND_PATH;
@@ -33,4 +38,4 @@ if (process.env.REACT_NATIVE_DEBUGGER_FRONTEND_PATH != null) {
3338
);
3439
}
3540

36-
module.exports = frontEndPath /*:: as string */;
41+
module.exports = frontEndPath;

packages/eslint-config-react-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"eslint": "^8.57.0",
46-
"prettier": "3.6.2"
46+
"prettier": "3.9.4"
4747
}
4848
}

packages/react-native-codegen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"babel-plugin-syntax-hermes-parser": "0.36.1",
4949
"hermes-estree": "0.36.1",
5050
"micromatch": "^4.0.4",
51-
"prettier": "3.6.2",
51+
"prettier": "3.9.4",
5252
"rimraf": "^3.0.2"
5353
},
5454
"peerDependencies": {

packages/react-native/Libraries/Alert/Alert.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ export interface AlertStatic {
8585
}
8686

8787
export type AlertType =
88-
| 'default'
89-
| 'plain-text'
90-
| 'secure-text'
91-
| 'login-password';
88+
'default' | 'plain-text' | 'secure-text' | 'login-password';
9289

9390
export const Alert: AlertStatic;
9491
export type Alert = AlertStatic;

packages/react-native/Libraries/Animated/Animated.d.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ export namespace Animated {
7878
};
7979

8080
type AnimatedColorInputValue =
81-
| RgbaValue
82-
| RgbaAnimatedValue
83-
| ColorValue
84-
| null
85-
| undefined;
81+
RgbaValue | RgbaAnimatedValue | ColorValue | null | undefined;
8682

8783
class AnimatedColor extends AnimatedWithChildren {
8884
r: AnimatedValue;
@@ -542,8 +538,7 @@ export namespace Animated {
542538
): (...args: any[]) => void;
543539

544540
export type ComponentProps<T> = T extends
545-
| React.ComponentType<infer P>
546-
| React.Component<infer P>
541+
React.ComponentType<infer P> | React.Component<infer P>
547542
? P
548543
: never;
549544

@@ -586,8 +581,9 @@ export namespace Animated {
586581
: WithAnimatedValue<T[key]>;
587582
};
588583

589-
export interface AnimatedComponent<T extends React.ComponentType<any>>
590-
extends React.FC<AnimatedProps<React.ComponentPropsWithRef<T>>> {}
584+
export interface AnimatedComponent<
585+
T extends React.ComponentType<any>,
586+
> extends React.FC<AnimatedProps<React.ComponentPropsWithRef<T>>> {}
591587

592588
export type AnimatedComponentOptions = {
593589
collapsable?: boolean | undefined;

packages/react-native/Libraries/AppState/AppState.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ import {NativeEventSubscription} from '../EventEmitter/RCTNativeAppEventEmitter'
3737
*/
3838
export type AppStateEvent = 'change' | 'memoryWarning' | 'blur' | 'focus';
3939
export type AppStateStatus =
40-
| 'active'
41-
| 'background'
42-
| 'inactive'
43-
| 'unknown'
44-
| 'extension';
40+
'active' | 'background' | 'inactive' | 'unknown' | 'extension';
4541

4642
export interface AppStateStatic {
4743
currentState: AppStateStatus;

packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ type AccessibilityAnnouncementFinishedEventHandler = (
4646
) => void;
4747

4848
type AccessibilityEventTypes =
49-
| 'click'
50-
| 'focus'
51-
| 'viewHoverEnter'
52-
| 'windowStateChange';
49+
'click' | 'focus' | 'viewHoverEnter' | 'windowStateChange';
5350

5451
/**
5552
* @see https://reactnative.dev/docs/accessibilityinfo

packages/react-native/Libraries/Components/Button.d.ts

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,21 @@ import {ColorValue} from '../StyleSheet/StyleSheet';
1212
import {TouchableNativeFeedbackProps} from './Touchable/TouchableNativeFeedback';
1313
import {TouchableOpacityProps} from './Touchable/TouchableOpacity';
1414

15-
export interface ButtonProps
16-
extends Pick<
17-
TouchableNativeFeedbackProps & TouchableOpacityProps,
18-
| 'accessibilityLabel'
19-
| 'accessibilityState'
20-
| 'hasTVPreferredFocus'
21-
| 'nextFocusDown'
22-
| 'nextFocusForward'
23-
| 'nextFocusLeft'
24-
| 'nextFocusRight'
25-
| 'nextFocusUp'
26-
| 'testID'
27-
| 'disabled'
28-
| 'onPress'
29-
| 'touchSoundDisabled'
30-
> {
15+
export interface ButtonProps extends Pick<
16+
TouchableNativeFeedbackProps & TouchableOpacityProps,
17+
| 'accessibilityLabel'
18+
| 'accessibilityState'
19+
| 'hasTVPreferredFocus'
20+
| 'nextFocusDown'
21+
| 'nextFocusForward'
22+
| 'nextFocusLeft'
23+
| 'nextFocusRight'
24+
| 'nextFocusUp'
25+
| 'testID'
26+
| 'disabled'
27+
| 'onPress'
28+
| 'touchSoundDisabled'
29+
> {
3130
/**
3231
* Text to display inside the button. On Android the given title will be converted to the uppercased form.
3332
*/

packages/react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import {
1717
} from '../../Types/CoreEventTypes';
1818
import {ViewProps} from '../View/ViewPropTypes';
1919

20-
export interface DrawerSlideEvent
21-
extends NativeSyntheticEvent<NativeTouchEvent> {}
20+
export interface DrawerSlideEvent extends NativeSyntheticEvent<NativeTouchEvent> {}
2221

2322
/**
2423
* DrawerLayoutAndroid is deprecated and will be removed in a future release.
@@ -101,8 +100,7 @@ export interface DrawerLayoutAndroidProps extends ViewProps {
101100
* it's closing or opening animation
102101
*/
103102
onDrawerStateChanged?:
104-
| ((event: 'Idle' | 'Dragging' | 'Settling') => void)
105-
| undefined;
103+
((event: 'Idle' | 'Dragging' | 'Settling') => void) | undefined;
106104

107105
/**
108106
* The navigation view that will be rendered to the side of the

0 commit comments

Comments
 (0)