Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/prettierrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 80,
"trailingComma": "es5",
"ignorePatterns": [],
"sortImports": {
"groups": [
["builtin", "external"],
["internal", "subpath"]
],
"newlinesBetween": false
},
"sortPackageJson": true
}
39 changes: 13 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,33 +365,20 @@ entries.

<!-- References -->

[Dependency Dashboard]:
https://github.com/microsoft/react-native-test-app/issues/492
[Dependency Dashboard]: https://github.com/microsoft/react-native-test-app/issues/492
[Patches page]: https://github.com/microsoft/react-native-test-app/wiki/Patches
[Renovate]: https://docs.renovatebot.com
[`@rnx-kit/align-deps`]:
https://github.com/microsoft/rnx-kit/tree/main/packages/align-deps#contribution
[`@rnx-kit/react-native-host`]:
https://github.com/microsoft/rnx-kit/tree/main/packages/react-native-host#readme
[`dependencies.gradle`]:
https://github.com/microsoft/react-native-test-app/blob/trunk/android/dependencies.gradle
[`generate-schema.mjs`]:
https://github.com/microsoft/react-native-test-app/blob/trunk/scripts/internal/generate-schema.mjs
[`package.json`]:
https://github.com/microsoft/react-native-test-app/blob/trunk/package.json
[`react-native-releases`]:
https://github.com/reactwg/react-native-releases/discussions
[`scripts/docs/`]:
https://github.com/microsoft/react-native-test-app/tree/trunk/scripts/docs
[`test:matrix`]:
https://github.com/microsoft/react-native-test-app/blob/trunk/scripts/testing/test-matrix.mjs
[`@rnx-kit/align-deps`]: https://github.com/microsoft/rnx-kit/tree/main/packages/align-deps#contribution
[`@rnx-kit/react-native-host`]: https://github.com/microsoft/rnx-kit/tree/main/packages/react-native-host#readme
[`dependencies.gradle`]: https://github.com/microsoft/react-native-test-app/blob/trunk/android/dependencies.gradle
[`generate-schema.mjs`]: https://github.com/microsoft/react-native-test-app/blob/trunk/scripts/internal/generate-schema.mjs
[`package.json`]: https://github.com/microsoft/react-native-test-app/blob/trunk/package.json
[`react-native-releases`]: https://github.com/reactwg/react-native-releases/discussions
[`scripts/docs/`]: https://github.com/microsoft/react-native-test-app/tree/trunk/scripts/docs
[`test:matrix`]: https://github.com/microsoft/react-native-test-app/blob/trunk/scripts/testing/test-matrix.mjs
[`uuid`]: https://github.com/uuidjs/uuid
[commitlint-lite]:
https://github.com/microsoft/rnx-kit/tree/main/incubator/commitlint-lite#readme
[commitlint-lite]: https://github.com/microsoft/rnx-kit/tree/main/incubator/commitlint-lite#readme
[conventional commit format]: https://conventionalcommits.org
[every Monday morning]:
https://github.com/microsoft/react-native-test-app/blob/trunk/.github/renovate.json
[link to the issue]:
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
[supported versions table]:
https://github.com/microsoft/react-native-test-app/wiki#react-native-versions
[every Monday morning]: https://github.com/microsoft/react-native-test-app/blob/trunk/.github/renovate.json
[link to the issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
[supported versions table]: https://github.com/microsoft/react-native-test-app/wiki#react-native-versions
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"format": "nx run-many --target format:c,format:js,format:swift",
"lint": "nx run-many --target lint:js,lint:kt,lint:rb,lint:swift",
"format:js": "prettier --write --log-level error $(git ls-files '.github/*.json' '.github/*.yml' '.yarn/plugins/*' '.yarnrc.yml' 'CONTRIBUTING.md' 'README.md' 'nx.json')",
"format:js": "oxfmt $(git ls-files '.github/*.json' '.github/*.yml' '.yarn/plugins/*' '.yarnrc.yml' 'CONTRIBUTING.md' 'README.md' 'nx.json')",
"lint:commit": "git log --format='%s' origin/trunk..HEAD | tail -1 | npx @rnx-kit/commitlint-lite@2.0.0",
"release-notes": "node scripts/release-notes.mts",
"show-affected": "node scripts/affected.mts"
Expand All @@ -28,8 +28,7 @@
"js-yaml": "^4.1.0",
"minimatch": "^10.0.0",
"nx": "^21.0.0",
"prettier": "^3.0.0",
"prettier-plugin-organize-imports": "^4.1.0",
"oxfmt": "^0.35.0",
"typescript": "^5.0.0"
},
"engines": {
Expand Down Expand Up @@ -93,7 +92,6 @@
"packages/app",
"packages/app/example"
],
"prettier": "./.github/prettierrc.json",
"rnx-kit": {
"lint": {
"lockfile": {
Expand Down
10 changes: 5 additions & 5 deletions packages/app/example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ import {
useColorScheme,
View,
} from "react-native";
import { Feature } from "./Feature";
import { LocalStorageStatus } from "./LocalStorage";
import { RemoteDebugging } from "./RemoteDebugging";
import { SafeAreaView } from "./SafeAreaView";
import { Separator } from "./Separator";
import {
getHermesVersion,
isBridgeless,
isFabricInstance,
ReactNativeVersion,
} from "./core";
import { Feature } from "./Feature";
import { LocalStorageStatus } from "./LocalStorage";
import { RemoteDebugging } from "./RemoteDebugging";
import { SafeAreaView } from "./SafeAreaView";
import { Separator } from "./Separator";
import { useStyles } from "./styles";

declare global {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/example/src/RemoteDebugging.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { NativeModules, View } from "react-native";
import { Feature } from "./Feature";
import { getHermesVersion, isBridgeless } from "./core";
import { Feature } from "./Feature";
import { useStyles } from "./styles";

function isRemoteDebuggingAvailable(): boolean {
Expand Down
4 changes: 2 additions & 2 deletions packages/app/example/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export function isFabricInstance<T>(
return Boolean(
// @ts-expect-error — https://github.com/facebook/react-native/blob/0.76-stable/packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js
ref["__nativeTag"] ||
// @ts-expect-error — https://github.com/facebook/react-native/blob/0.76-stable/packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js
ref["_internalInstanceHandle"]?.stateNode?.canonical
// @ts-expect-error — https://github.com/facebook/react-native/blob/0.76-stable/packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js
ref["_internalInstanceHandle"]?.stateNode?.canonical
);
}

Expand Down
8 changes: 3 additions & 5 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"scripts": {
"format:c": "clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm')",
"format:js": "prettier --write --log-level error $(git ls-files '*.[cm][jt]s' '*.[jt]s' '*.tsx' '*.yml' 'README.md' 'test/**/*.json')",
"format:js": "oxfmt $(git ls-files '*.[cm][jt]s' '*.[jt]s' '*.tsx' '*.yml' 'README.md' 'test/**/*.json')",
"format:swift": "swiftformat $(git ls-files '*.swift')",
"generate:code": "node scripts/internal/generate-manifest.mts",
"generate:docs": "node scripts/internal/generate-manifest-docs.mts",
Expand Down Expand Up @@ -143,8 +143,7 @@
"js-yaml": "^4.1.0",
"memfs": "^4.0.0",
"minimatch": "^10.0.0",
"prettier": "^3.0.0",
"prettier-plugin-organize-imports": "^4.1.0",
"oxfmt": "^0.35.0",
"react": "19.1.0",
"react-native": "^0.81.0",
"react-native-macos": "^0.81.1",
Expand All @@ -160,6 +159,5 @@
"macos": "react-native-macos",
"visionos": "@callstack/react-native-visionos",
"windows": "react-native-windows"
},
"prettier": "../../.github/prettierrc.json"
}
}
Loading
Loading