diff --git a/packages/debugger-frontend/index.js b/packages/debugger-frontend/index.js
index 907eb1d74fd..ecd558a5d28 100644
--- a/packages/debugger-frontend/index.js
+++ b/packages/debugger-frontend/index.js
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
- * @noformat
+ * @format
*/
const path = require('path');
@@ -33,4 +33,4 @@ if (process.env.REACT_NATIVE_DEBUGGER_FRONTEND_PATH != null) {
);
}
-module.exports = (frontEndPath /*: string */);
+module.exports = frontEndPath /*:: as string */;
diff --git a/packages/helloworld/.prettierrc.js b/packages/helloworld/.prettierrc.js
index 27d8bb6e9ae..e7f500b19a6 100644
--- a/packages/helloworld/.prettierrc.js
+++ b/packages/helloworld/.prettierrc.js
@@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
module.exports = {
diff --git a/packages/react-native-babel-preset/src/__tests__/plugin-warn-on-deep-imports-test.js b/packages/react-native-babel-preset/src/__tests__/plugin-warn-on-deep-imports-test.js
index 6858ba18d4f..97eb16d0c8f 100644
--- a/packages/react-native-babel-preset/src/__tests__/plugin-warn-on-deep-imports-test.js
+++ b/packages/react-native-babel-preset/src/__tests__/plugin-warn-on-deep-imports-test.js
@@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
'use strict';
diff --git a/packages/react-native-codegen-typescript-test/scripts/build.js b/packages/react-native-codegen-typescript-test/scripts/build.js
index e52efdd0461..8148f26408d 100644
--- a/packages/react-native-codegen-typescript-test/scripts/build.js
+++ b/packages/react-native-codegen-typescript-test/scripts/build.js
@@ -3,25 +3,45 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
+ * @lint-ignore-every LICENSELINT
*/
const fs = require('fs');
const path = require('path');
-const tsComponentFixturePath = path.join(__dirname, '../../react-native-codegen/src/parsers/typescript/components/__test_fixtures__/fixtures.js');
-const tsComponentSnapshotPath = path.join(__dirname, '../../react-native-codegen/src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap');
-const tsModuleFixturePath = path.join(__dirname, '../../react-native-codegen/src/parsers/typescript/modules/__test_fixtures__/fixtures.js');
-const tsModuleSnapshotPath = path.join(__dirname, '../../react-native-codegen/src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap');
+const tsComponentFixturePath = path.join(
+ __dirname,
+ '../../react-native-codegen/src/parsers/typescript/components/__test_fixtures__/fixtures.js',
+);
+const tsComponentSnapshotPath = path.join(
+ __dirname,
+ '../../react-native-codegen/src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap',
+);
+const tsModuleFixturePath = path.join(
+ __dirname,
+ '../../react-native-codegen/src/parsers/typescript/modules/__test_fixtures__/fixtures.js',
+);
+const tsModuleSnapshotPath = path.join(
+ __dirname,
+ '../../react-native-codegen/src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap',
+);
const snapshotOutputPath = path.join(__dirname, '../__generated__');
-function genereateSnapshotTestCases(name, fixturePath, snapshotPath, outputPath) {
- const fixtures = require(fixturePath);
- const snapshots = require(snapshotPath);
- for (const key of Object.keys(fixtures)) {
- const snapshotName = `RN Codegen TypeScript Parser can generate fixture ${key} 1`;
- const snapshotString = snapshots[snapshotName];
- const snapshot = snapshotString.substring(2, snapshotString.length - 2);
- const tsSourceCode = `
+function genereateSnapshotTestCases(
+ name,
+ fixturePath,
+ snapshotPath,
+ outputPath,
+) {
+ const fixtures = require(fixturePath);
+ const snapshots = require(snapshotPath);
+ for (const key of Object.keys(fixtures)) {
+ const snapshotName = `RN Codegen TypeScript Parser can generate fixture ${key} 1`;
+ const snapshotString = snapshots[snapshotName];
+ const snapshot = snapshotString.substring(2, snapshotString.length - 2);
+ const tsSourceCode = `
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
@@ -34,9 +54,21 @@ import type { SchemaType } from '@react-native/codegen/lib/CodegenSchema';
const snapshot : SchemaType = ${snapshot};
export default snapshot;
`;
- fs.writeFileSync(path.join(outputPath, `${name}_${key}.ts`), tsSourceCode, { encoding: 'utf-8' });
- }
+ fs.writeFileSync(path.join(outputPath, `${name}_${key}.ts`), tsSourceCode, {
+ encoding: 'utf-8',
+ });
+ }
}
-genereateSnapshotTestCases('component', tsComponentFixturePath, tsComponentSnapshotPath, snapshotOutputPath);
-genereateSnapshotTestCases('module', tsModuleFixturePath, tsModuleSnapshotPath, snapshotOutputPath);
+genereateSnapshotTestCases(
+ 'component',
+ tsComponentFixturePath,
+ tsComponentSnapshotPath,
+ snapshotOutputPath,
+);
+genereateSnapshotTestCases(
+ 'module',
+ tsModuleFixturePath,
+ tsModuleSnapshotPath,
+ snapshotOutputPath,
+);
diff --git a/packages/react-native-popup-menu-android/react-native.config.js b/packages/react-native-popup-menu-android/react-native.config.js
index 2fed1e155b5..a23cfdb6674 100644
--- a/packages/react-native-popup-menu-android/react-native.config.js
+++ b/packages/react-native-popup-menu-android/react-native.config.js
@@ -3,13 +3,15 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
module.exports = {
dependency: {
platforms: {
android: {
- 'cmakeListsPath': '../android/src/main/jni/CMakeLists.txt',
+ cmakeListsPath: '../android/src/main/jni/CMakeLists.txt',
},
},
},
diff --git a/packages/react-native-popup-menu-android/scripts/prepublish-popup-menu-android.js b/packages/react-native-popup-menu-android/scripts/prepublish-popup-menu-android.js
index b810625e774..97e9551e2b3 100644
--- a/packages/react-native-popup-menu-android/scripts/prepublish-popup-menu-android.js
+++ b/packages/react-native-popup-menu-android/scripts/prepublish-popup-menu-android.js
@@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
/*
@@ -26,7 +28,9 @@ const fs = require('fs');
const buildGradleKtsPath = 'android/build.gradle.kts';
const libsVersionsTomlPath = '../react-native/gradle/libs.versions.toml';
-console.log(`Updating ${buildGradleKtsPath} with versions from ${libsVersionsTomlPath}...`);
+console.log(
+ `Updating ${buildGradleKtsPath} with versions from ${libsVersionsTomlPath}...`,
+);
let gradleContent = fs.readFileSync(buildGradleKtsPath, 'utf8');
const tomlContent = fs.readFileSync(libsVersionsTomlPath, 'utf8');
@@ -39,7 +43,10 @@ gradleContent = gradleContent
.replace('libs.versions.compileSdk.get().toInt()', compileSdk)
.replace('libs.versions.minSdk.get().toInt()', minSdk)
.replace('libs.versions.buildTools.get()', `"${buildTools}"`)
- .replace('project(":packages:react-native:ReactAndroid")', '"com.facebook.react:react-android"');
+ .replace(
+ 'project(":packages:react-native:ReactAndroid")',
+ '"com.facebook.react:react-android"',
+ );
fs.writeFileSync(buildGradleKtsPath, gradleContent);
diff --git a/packages/react-native-test-library/babel.config.js b/packages/react-native-test-library/babel.config.js
index 3bcc1e3d56e..489b9c61277 100644
--- a/packages/react-native-test-library/babel.config.js
+++ b/packages/react-native-test-library/babel.config.js
@@ -3,8 +3,15 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
module.exports = {
- presets: [['module:@react-native/babel-preset', {disableStaticViewConfigsCodegen: false}]],
+ presets: [
+ [
+ 'module:@react-native/babel-preset',
+ {disableStaticViewConfigsCodegen: false},
+ ],
+ ],
};
diff --git a/packages/react-native-test-library/react-native.config.js b/packages/react-native-test-library/react-native.config.js
index 2fed1e155b5..a23cfdb6674 100644
--- a/packages/react-native-test-library/react-native.config.js
+++ b/packages/react-native-test-library/react-native.config.js
@@ -3,13 +3,15 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
module.exports = {
dependency: {
platforms: {
android: {
- 'cmakeListsPath': '../android/src/main/jni/CMakeLists.txt',
+ cmakeListsPath: '../android/src/main/jni/CMakeLists.txt',
},
},
},
diff --git a/packages/react-native/Libraries/Components/__tests__/Button-test.js b/packages/react-native/Libraries/Components/__tests__/Button-test.js
index f4386d93c5a..11aab60d7c2 100644
--- a/packages/react-native/Libraries/Components/__tests__/Button-test.js
+++ b/packages/react-native/Libraries/Components/__tests__/Button-test.js
@@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
import {create} from '../../../jest/renderer';
@@ -14,46 +16,84 @@ describe('', () => {
expect(await create()).toMatchSnapshot();
});
- it('should be disabled and it should set accessibilityState to disabled when disabled={true}', async() => {
+ it('should be disabled and it should set accessibilityState to disabled when disabled={true}', async () => {
expect(
- await create()
+ await create(),
).toMatchSnapshot();
});
- it('should be disabled when disabled={true} and accessibilityState={{disabled: true}}', async() => {
+ it('should be disabled when disabled={true} and accessibilityState={{disabled: true}}', async () => {
expect(
- await create()
+ await create(
+ ,
+ ),
).toMatchSnapshot();
});
- it('should be disabled when disabled is empty and accessibilityState={{disabled: true}}',async () => {
+ it('should be disabled when disabled is empty and accessibilityState={{disabled: true}}', async () => {
expect(
- await create()
+ await create(
+ ,
+ ),
).toMatchSnapshot();
});
- it('should overwrite accessibilityState with value of disabled prop', async() => {
- expect(await create()
+ it('should overwrite accessibilityState with value of disabled prop', async () => {
+ expect(
+ await create(
+ ,
+ ),
).toMatchSnapshot();
});
- it('should not be disabled when disabled={false} and accessibilityState={{disabled: true}}', async() => {
- expect(await create()
+ it('should not be disabled when disabled={false} and accessibilityState={{disabled: true}}', async () => {
+ expect(
+ await create(
+ ,
+ ),
).toMatchSnapshot();
});
- it('should not be disabled when disabled={false} and accessibilityState={{disabled: false}}', async() => {
- expect(await create( )
+ it('should not be disabled when disabled={false} and accessibilityState={{disabled: false}}', async () => {
+ expect(
+ await create(
+ ,
+ ),
).toMatchSnapshot();
});
- it('should be set importantForAccessibility={no-hide-descendants} when importantForAccessibility={no-hide-descendants}', async() => {
- expect(await create( )
+ it('should be set importantForAccessibility={no-hide-descendants} when importantForAccessibility={no-hide-descendants}', async () => {
+ expect(
+ await create(
+ ,
+ ),
).toMatchSnapshot();
});
- it('should be set importantForAccessibility={no-hide-descendants} when importantForAccessibility={no}', async() => {
- expect( await create( )
+ it('should be set importantForAccessibility={no-hide-descendants} when importantForAccessibility={no}', async () => {
+ expect(
+ await create(
+ ,
+ ),
).toMatchSnapshot();
});
});
diff --git a/packages/react-native/Libraries/Core/ReactNativeVersion.js b/packages/react-native/Libraries/Core/ReactNativeVersion.js
index 9cd4e18ab47..cfee63f4dae 100644
--- a/packages/react-native/Libraries/Core/ReactNativeVersion.js
+++ b/packages/react-native/Libraries/Core/ReactNativeVersion.js
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @flow strict
+ * @noformat
* @generated by scripts/releases/set-version.js
*/
diff --git a/packages/react-native/scripts/featureflags/templates/js/NativeReactNativeFeatureFlags.js-template.js b/packages/react-native/scripts/featureflags/templates/js/NativeReactNativeFeatureFlags.js-template.js
index 1dd5459514d..1710550a3fe 100644
--- a/packages/react-native/scripts/featureflags/templates/js/NativeReactNativeFeatureFlags.js-template.js
+++ b/packages/react-native/scripts/featureflags/templates/js/NativeReactNativeFeatureFlags.js-template.js
@@ -22,6 +22,7 @@ export default function (definitions: FeatureFlagDefinitions): string {
*
* ${signedsource.getSigningToken()}
* @flow strict
+ * @noformat
*/
${DO_NOT_MODIFY_COMMENT}
diff --git a/packages/react-native/scripts/featureflags/templates/js/ReactNativeFeatureFlags.js-template.js b/packages/react-native/scripts/featureflags/templates/js/ReactNativeFeatureFlags.js-template.js
index 5bf488ba9fb..a31f082caa0 100644
--- a/packages/react-native/scripts/featureflags/templates/js/ReactNativeFeatureFlags.js-template.js
+++ b/packages/react-native/scripts/featureflags/templates/js/ReactNativeFeatureFlags.js-template.js
@@ -22,6 +22,7 @@ export default function (definitions: FeatureFlagDefinitions): string {
*
* ${signedsource.getSigningToken()}
* @flow strict
+ * @noformat
*/
${DO_NOT_MODIFY_COMMENT}
diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js
index 815d0801079..5bc924dec8f 100644
--- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js
+++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js
@@ -4,8 +4,9 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
- * @generated SignedSource<<2dc9ec2ea173f10586a67940720f1d37>>
+ * @generated SignedSource<<29691b2062c240377834a01ced24c71c>>
* @flow strict
+ * @noformat
*/
/**
diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js
index 589bc4ddcae..48f06fd308b 100644
--- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js
+++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js
@@ -4,8 +4,9 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
- * @generated SignedSource<>
+ * @generated SignedSource<<59ebee6019b99a8c6a29dfc1eb036194>>
* @flow strict
+ * @noformat
*/
/**
diff --git a/packages/rn-tester/js/examples/ScrollView/ScrollViewIndicatorInsetsIOSExample.js b/packages/rn-tester/js/examples/ScrollView/ScrollViewIndicatorInsetsIOSExample.js
index 7b4faf11d33..cdfbbb73361 100644
--- a/packages/rn-tester/js/examples/ScrollView/ScrollViewIndicatorInsetsIOSExample.js
+++ b/packages/rn-tester/js/examples/ScrollView/ScrollViewIndicatorInsetsIOSExample.js
@@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
'use strict';
@@ -21,54 +23,78 @@ import {
} from 'react-native';
export function ScrollViewIndicatorInsetsExample() {
- const [automaticallyAdjustsScrollIndicatorInsets, setAutomaticallyAdjustsScrollIndicatorInsets] = useState(true);
+ const [
+ automaticallyAdjustsScrollIndicatorInsets,
+ setAutomaticallyAdjustsScrollIndicatorInsets,
+ ] = useState(true);
const [modalVisible, setModalVisible] = useState(false);
- const { height, width } = useWindowDimensions();
+ const {height, width} = useWindowDimensions();
- return (
-
- setModalVisible(false)}
- presentationStyle="fullScreen"
- statusBarTranslucent={false}
- supportedOrientations={['portrait', 'landscape']}>
-
-
-
- When automaticallyAdjustsScrollIndicatorInsets is true, the scrollbar is inset to the status bar. When false, it reaches the edge of the modal.
- Check out the UIScrollView docs to learn more about automaticallyAdjustsScrollIndicatorInsets
-
-
- automaticallyAdjustsScrollIndicatorInsets is {automaticallyAdjustsScrollIndicatorInsets + ''}
+ return (
+
+ setModalVisible(false)}
+ presentationStyle="fullScreen"
+ statusBarTranslucent={false}
+ supportedOrientations={['portrait', 'landscape']}>
+
+
+
+
+ When{' '}
+
+ automaticallyAdjustsScrollIndicatorInsets
+ {' '}
+ is true, the scrollbar is inset to the status bar. When false,
+ it reaches the edge of the modal.
+
+
+ Check out the UIScrollView docs to learn more about{' '}
+
+ automaticallyAdjustsScrollIndicatorInsets
+
+
+
+
+
+
+ automaticallyAdjustsScrollIndicatorInsets
+ {' '}
+ is {automaticallyAdjustsScrollIndicatorInsets + ''}
+
setAutomaticallyAdjustsScrollIndicatorInsets(v)}
+ onValueChange={v =>
+ setAutomaticallyAdjustsScrollIndicatorInsets(v)
+ }
value={automaticallyAdjustsScrollIndicatorInsets}
- style={styles.switch}/>
-
-
-
-
-
-
- );
- }
+ style={styles.switch}
+ />
+
+
+
+
+
+
+ );
+}
const styles = StyleSheet.create({
modal: {
@@ -87,7 +113,7 @@ const styles = StyleSheet.create({
switch: {
marginBottom: 40,
},
- toggle:{
+ toggle: {
margin: 20,
alignItems: 'center',
},
@@ -107,6 +133,6 @@ exports.description =
exports.examples = [
{
title: ' automaticallyAdjustsScrollIndicatorInsets Example',
- render: (): React.Node => ,
+ render: (): React.Node => ,
},
];
diff --git a/packages/rn-tester/js/examples/ScrollView/ScrollViewKeyboardInsetsIOSExample.js b/packages/rn-tester/js/examples/ScrollView/ScrollViewKeyboardInsetsIOSExample.js
index e664c12ea9a..276da99e475 100644
--- a/packages/rn-tester/js/examples/ScrollView/ScrollViewKeyboardInsetsIOSExample.js
+++ b/packages/rn-tester/js/examples/ScrollView/ScrollViewKeyboardInsetsIOSExample.js
@@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
'use strict';
@@ -20,7 +22,10 @@ import {
} from 'react-native';
export function ScrollViewKeyboardInsetsExample() {
- const [automaticallyAdjustKeyboardInsets, setAutomaticallyAdjustKeyboardInsets] = useState(true);
+ const [
+ automaticallyAdjustKeyboardInsets,
+ setAutomaticallyAdjustKeyboardInsets,
+ ] = useState(true);
const [flatList, setFlatList] = useState(false);
const [inverted, setInverted] = useState(false);
const [heightRestricted, setHeightRestricted] = useState(false);
@@ -33,13 +38,15 @@ export function ScrollViewKeyboardInsetsExample() {
};
const data = [...Array(20).keys()];
- const renderItem = ({ item, index }) => {
- const largeInput = (index % 5) === 4;
+ const renderItem = ({item, index}) => {
+ const largeInput = index % 5 === 4;
return (
-
+
);
};
@@ -47,52 +54,67 @@ export function ScrollViewKeyboardInsetsExample() {
return (
- automaticallyAdjustKeyboardInsets is {automaticallyAdjustKeyboardInsets + ''}
+
+ automaticallyAdjustKeyboardInsets is{' '}
+ {automaticallyAdjustKeyboardInsets + ''}
+
setAutomaticallyAdjustKeyboardInsets(v)}
value={automaticallyAdjustKeyboardInsets}
- style={styles.controlSwitch}/>
+ style={styles.controlSwitch}
+ />
- FlatList is {flatList + ''}
+
+ FlatList is {flatList + ''}
+
setFlatList(v)}
value={flatList}
- style={styles.controlSwitch}/>
+ style={styles.controlSwitch}
+ />
{flatList && (
- inverted is {inverted + ''}
+
+ inverted is {inverted + ''}
+
setInverted(v)}
value={inverted}
- style={styles.controlSwitch}/>
+ style={styles.controlSwitch}
+ />
)}
- HeightRestricted is {heightRestricted + ''}
+
+ HeightRestricted is{' '}
+ {heightRestricted + ''}
+
setHeightRestricted(v)}
value={heightRestricted}
- style={styles.controlSwitch}/>
+ style={styles.controlSwitch}
+ />
-
+
- {flatList
- ? (
-
- )
- : (
-
- {data.map((item, index) => renderItem({ item, index }))}
-
- )
- }
+ {flatList ? (
+
+ ) : (
+
+ {data.map((item, index) => renderItem({item, index}))}
+
+ )}
);
}
@@ -137,8 +159,7 @@ const styles = StyleSheet.create({
borderBottomWidth: 1,
borderBottomColor: '#ccc',
},
- controlSwitch: {
- },
+ controlSwitch: {},
controlTextInput: {
flex: 1,
paddingVertical: 10,
@@ -160,6 +181,6 @@ exports.description =
exports.examples = [
{
title: ' automaticallyAdjustKeyboardInsets Example',
- render: (): React.Node => ,
+ render: (): React.Node => ,
},
];
diff --git a/scripts/releases/__tests__/__snapshots__/set-rn-artifacts-version-test.js.snap b/scripts/releases/__tests__/__snapshots__/set-rn-artifacts-version-test.js.snap
index 2209f4aeab7..8868ff21b1c 100644
--- a/scripts/releases/__tests__/__snapshots__/set-rn-artifacts-version-test.js.snap
+++ b/scripts/releases/__tests__/__snapshots__/set-rn-artifacts-version-test.js.snap
@@ -8,6 +8,7 @@ exports[`updateReactNativeArtifacts should set nightly version: packages/react-n
* LICENSE file in the root directory of this source tree.
*
* @flow strict
+ * @noformat
* << GENERATED >>
*/
@@ -135,6 +136,7 @@ exports[`updateReactNativeArtifacts should set release version: packages/react-n
* LICENSE file in the root directory of this source tree.
*
* @flow strict
+ * @noformat
* << GENERATED >>
*/
diff --git a/scripts/releases/templates/ReactNativeVersion.js-template.js b/scripts/releases/templates/ReactNativeVersion.js-template.js
index 841ad65f282..5100c3930cf 100644
--- a/scripts/releases/templates/ReactNativeVersion.js-template.js
+++ b/scripts/releases/templates/ReactNativeVersion.js-template.js
@@ -20,6 +20,7 @@ module.exports = ({version} /*: {version: Version} */) /*: string */ => `/**
* LICENSE file in the root directory of this source tree.
*
* @flow strict
+ * @noformat
* ${'@'}generated by scripts/releases/set-version.js
*/