diff --git a/.eslintrc.json b/.eslintrc.json
index 7eb64a72542..39cdbb61165 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -12,6 +12,7 @@
"extends": ["plugin:mdx/recommended"]
}
],
+ "parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest",
diff --git a/.github/workflows/pre-merge.yml b/.github/workflows/pre-merge.yml
index ee2df88a33b..6ec27a89952 100644
--- a/.github/workflows/pre-merge.yml
+++ b/.github/workflows/pre-merge.yml
@@ -9,12 +9,15 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- - name: Set up Node.js
- uses: actions/setup-node@v4
-
- name: Checkout repository
uses: actions/checkout@v4
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: "20"
+ cache: "yarn"
+
- name: Install dependencies
run: yarn install --frozen-lockfile --no-progress --non-interactive
@@ -25,12 +28,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - name: Set up Node.js
- uses: actions/setup-node@v4
-
- name: Checkout repository
uses: actions/checkout@v4
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: "20"
+ cache: "yarn"
+
- name: Install dependencies
run: yarn install --frozen-lockfile --no-progress --non-interactive
@@ -38,4 +44,4 @@ jobs:
run: yarn build
working-directory: website
env:
- NODE_OPTIONS: "--max_old_space_size=4096"
+ NODE_OPTIONS: "--max_old_space_size=8192"
diff --git a/.prettierrc b/.prettierrc.json
similarity index 93%
rename from .prettierrc
rename to .prettierrc.json
index 11998292dbf..8772ae7f1ce 100644
--- a/.prettierrc
+++ b/.prettierrc.json
@@ -1,7 +1,7 @@
{
"overrides": [
{
- "files": "*.js",
+ "files": ["*.js", "*.jsx", "*.ts", "*.tsx"],
"options": {
"arrowParens": "avoid",
"bracketSpacing": false,
diff --git a/docs/_fabric-native-components.jsx b/docs/_fabric-native-components.jsx
index 5efc9bf5945..fc6a3171a4f 100644
--- a/docs/_fabric-native-components.jsx
+++ b/docs/_fabric-native-components.jsx
@@ -1,6 +1,6 @@
-import React from "react";
-import IOSContent from "./fabric-native-components-ios.md";
-import AndroidContent from "./fabric-native-components-android.md";
+import React from 'react';
+import IOSContent from './fabric-native-components-ios.md';
+import AndroidContent from './fabric-native-components-android.md';
export function FabricNativeComponentsIOS() {
return
RCTWebView.m
→ RCTWebView.mm
making it an Objective-C++ file
+5. Repeat step 4 and create a header file named `RCTWebView.h`.
+
+6. Rename RCTWebView.m
→ RCTWebView.mm
making it an Objective-C++ file.
```text title="Demo/ios"
Podfile
@@ -72,7 +74,7 @@ After creating the header file and the implementation file, you can start implem
This is the code for the `RCTWebView.h` file, which declares the component interface.
-```objc title="Demo/RCTWebView/RTNWebView.h"
+```objc title="Demo/RCTWebView/RCTWebView.h"
#import